Skip to content

Logo

CrystalBank

The goal of CrystalBank is the transparent and successful operation of a socially responsible bank trusted by citizens and a real partner for Ukrainian business representatives.

Supports in this guide: Payments

Provider website: crystalbank.com.ua


What you need to do for start processing transactions (brief summary)

  1. Get your credentials (from CrystalBank)
  2. Connect in Dashboard
  3. Send an API request

Prerequisites: get from CrystalBank

Send a connection request at crystalbank.com.ua/ua/contacts or contact your CrystalBank manager directly to get your account verified and receive the following credentials.

  • External system ID -> Corefy field ext_system_id.
  • Login -> Corefy field login.
  • Password -> Corefy field password.
  • SSL certificate -> Corefy field ssl_certificate -> uploaded as a file; requested from CrystalBank/UkrCard and sent to you by email once generated.
  • SSL certificate private key -> Corefy field ssl_private_key -> uploaded as a file; generated the same way as the certificate.
  • API URL (optional) -> Corefy field api_url -> leave as default unless your account manager tells you otherwise.
  • Google Pay Merchant ID (optional) -> Corefy field google_pay_mid -> only needed if you use Google Pay.

UAH only.


Payments processing (connect H2H Merchant account, create payment-invoice)

Connect H2H Merchant account in Corefy Dashboard

Step 1 - Open connection form

Open CrystalBank in the provider directory and press Connect at CrystalBank Provider Overview page in the New connection section.

Step 2 - Fill in fields and select settings

  • External system ID
  • Login
  • Password
  • SSL certificate
  • SSL certificate private key
  • API URL (optional)
  • Google Pay Merchant ID (optional)
  • Test Mode -> (enable if you are using sandbox credentials)

Success

You have connected CrystalBank H2H Merchant account!


First request to Corefy API (MIN)

What it does: creates a payment-invoice; card data itself is collected and submitted separately by Corefy's checkout/SDK layer, not as part of this request. Card, Apple Pay, and Google Pay are all supported on this same connection. CrystalBank may return a 3D Secure challenge redirect depending on the card.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "1709718547",
      "service": "payment_card_uah_hpp",
      "currency": "UAH",
      "amount": 100
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "1709718211",
      "service": "payment_card_uah_hpp",
      "currency": "UAH",
      "amount": 100,
      "customer": {
        "reference_id": "1709718211",
        "name": "Vlad Ivanov",
        "address": {
          "full_address": "7 rue dissoire-22",
          "country": "UA",
          "city": "Kyiv",
          "post_code": "65001"
        }
      }
    }
  }
}

Important

  • By default, customer.name takes priority over the card's own embossed cardholder name when both are available; see the priority_send_customer_name option below to change this.
  • customer.reference_id is sent to CrystalBank only when the send_reference_id option is enabled.

Extended request (MAX)

Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow


Options

  • flow_type -> optional, enum (ecom, c2a) - ecom (default) is a standard card payment; c2a (card-to-account) additionally sends recipient account details (see Constants below) with the transaction.
  • priority_send_customer_name -> optional, enum (customer_name, cardholder) - which name source wins when both are available: customer_name (default) prefers customer.name, falling back to the card's embossed name; cardholder does the opposite.
  • customer_name_format -> optional, enum (LAST, FIRST, MIDDLE, FIRST, MIDDLE, LAST, LAST, MIDDLE, FIRST, LAST, FIRST, FIRST, LAST) - how to split the resolved name into parts; defaults to LAST, FIRST, MIDDLE.
  • send_reference_id -> optional, boolean - sends customer.reference_id (or the REFERENCE_ID Constant) to CrystalBank; always sent automatically when flow_type is c2a.
  • send_fm_data_on_refund -> exposed in the Dashboard, but currently has no effect on requests.

Constants (fallback fields)

Constants are static values that Corefy can send to the provider instead of dynamic data from your API request, when those fields are missing in the request.

Priority (predictable rule): 1. If a value is present in the request -> Corefy uses the request value 2. Else if the constant is set -> Corefy uses the constant 3. Else -> provider may reject the request or apply its defaults (depends on provider)

Currently available constants (constant -> Corefy API field)

  • LANGUAGE -> 2-letter language code
  • REFERENCE_ID -> fallback for customer.reference_id when send_reference_id is enabled (or always, in c2a mode)
  • IBAN -> recipient account number for c2a mode; falls back to your own Corefy merchant profile IBAN if not set
  • RECIPIENT_NAME -> recipient name for c2a mode - there is no request field for this, so it must be set here if you use c2a
  • RECIPIENT_ACCOUNT_TYPE -> recipient account type for c2a mode; default 02
  • RECIPIENT_COUNTRY -> recipient country (numeric ISO 3166-1) for c2a mode; default 804 (Ukraine)
  • FUNDING_OR_PAYMENT_TRANSACTION_TYPE_INDICATOR -> transaction type indicator for c2a mode; default F52

Used only for Apple Pay / Google Pay: LANGUAGE, REFERENCE_ID, IBAN, RECIPIENT_NAME, RECIPIENT_ACCOUNT_TYPE - same meaning as above.


Refunds

CrystalBank supports partial and multiple refunds, with one exception: a refund requested on the same day as the original payment must be for the full amount (it's processed as a same-day reversal); partial refunds are only possible from the next day onward.


Additional info

  1. CrystalBank supports Apple Pay and Google Pay with decryption on the Corefy side.

FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify the login, password, SSL certificate and key pair for the selected environment (test_mode)
  • Same-day partial refund is rejected -> same-day refunds must be for the full amount; request a partial refund the next day instead
  • c2a payment rejected for missing recipient details -> set the RECIPIENT_NAME Constant (and optionally IBAN/RECIPIENT_ACCOUNT_TYPE/RECIPIENT_COUNTRY) before using flow_type: c2a
  • Currency or service is not supported -> confirm allowed currencies/features in your CrystalBank account and in Corefy - only UAH is available

Question

Still looking for help connecting your CrystalBank account? Please contact our support team!