Skip to content

Logo

AlliancePay

Supports in this guide: Payments, Payouts

Provider website: bankalliance.ua


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

  1. Choose account type
  2. Get your credentials (from AlliancePay)
  3. Connect in Dashboard
  4. Send an API request

Choose account type

AlliancePay can be connected in different ways (depending on your needs):

  • If you do card, Apple Pay, or Google Pay payments -> choose H2H Merchant account
  • If you do card payouts -> choose Provider account

AlliancePay does not currently support payments through a Provider account, or payouts through the H2H Merchant account. If you're not sure which one to use, confirm with your Corefy account manager.

Note

If you need to whitelist IPs on AlliancePay's side, ask your account manager and provide Corefy's IP list from the integration docs.


Prerequisites: get from AlliancePay

Contact your AlliancePay account manager to get your account verified and receive the following credentials. H2H Merchant account and Provider account are separate connections with independent credentials.

For H2H Merchant account:

  • Merchant ID -> Corefy field merchant_id.
  • Service Code (optional) -> Corefy field service_code -> needed only for the legacy authorization.
  • API Type -> Corefy field api_type -> currently only Purchase is available.
  • Payment Key -> Corefy field payment_key -> uploaded as a file; used to encrypt card data.
  • Private Key (optional) -> Corefy field private_key -> uploaded as a file; needed only for the legacy authorization.
  • KID (optional) -> Corefy field kid -> key ID issued by AlliancePay after they register your public key; enables JWS Authorization 2.0.
  • JWS Private Key (optional) -> Corefy field jws_private_key -> uploaded as a file; your own ES256 private key in PEM format, required together with KID.
  • Device ID (optional) -> Corefy field device_id.
  • API URL (optional) -> Corefy field api_url -> leave as default unless your account manager tells you otherwise.

For Provider account:

  • Merchant ID -> Corefy field merchant_id.
  • Payment Key -> Corefy field payment_key -> uploaded as a file.
  • Private Key (optional) -> Corefy field private_key -> uploaded as a file; needed only for the legacy authorization.
  • Service Code (optional) -> Corefy field service_code -> needed only for the legacy authorization.
  • KID (optional) -> Corefy field kid -> key ID issued by AlliancePay for your payout terminal; enables JWS Authorization 2.0.
  • JWS Private Key (optional) -> Corefy field jws_private_key -> uploaded as a file; your own ES256 private key in PEM format, required together with KID.
  • API URL (optional) -> Corefy field api_url.

Note

AlliancePay has moved its API to JWS Authorization 2.0. For both payments and payouts, fill in KID and JWS Private Key - when KID is set, Corefy uses JWS Authorization 2.0, and Private Key and Service Code are not needed. Without KID, the legacy authorization (Private Key + Service Code) is used. Merchant ID and Payment Key are required in both cases. The payout terminal's Merchant ID, Payment Key, and KID are issued separately from your H2H Merchant account values - don't reuse those.

Tip

You generate the JWS key pair yourself, following AlliancePay's JWS Authorization 2.0 guide. Send only the public key to AlliancePay and keep the private key on your side - it goes into JWS Private Key. AlliancePay then issues the KID for that key.

UAH only.


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

Connect H2H Merchant account in Corefy Dashboard

Step 1 - Open connection form

Open AlliancePay in the provider directory and press Connect at AlliancePay Provider Overview page in the New connection section. Choose H2H Merchant account.

Step 2 - Fill in fields and select settings

  • Merchant ID
  • Service Code (optional)
  • API Type
  • Payment Key
  • Private Key (optional)
  • KID (optional)
  • JWS Private Key (optional)
  • Device ID (optional)
  • API URL (optional)
  • Test Mode -> (enable if you are using sandbox credentials)

Success

You have connected AlliancePay 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. AlliancePay may return a 3D Secure challenge redirect depending on the card.

Payment - MIN

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "1a2b3c4d-5e6f-4a7b-8c91-2d3e4f5a6b7c",
      "service": "payment_card_uah_hpp",
      "currency": "UAH",
      "amount": 10
    }
  }
}

Payment - MAX

POST /api/payment-invoices

{
  "data": {
    "type": "payment-invoice",
    "attributes": {
      "reference_id": "2b3c4d5e-6f7a-4b8c-8d02-3e4f5a6b7c8d",
      "service": "payment_card_uah_hpp",
      "currency": "UAH",
      "amount": 10,
      "customer": {
        "reference_id": "cus_123",
        "name": "Ivanov Ivan Ivanovych",
        "individual_tax_id": "1234567890"
      },
      "metadata": {
        "order_purpose": "Order #123"
      }
    }
  }
}

Important

  • customer.name is parsed into first/last/middle name parts according to the Customer Name Format option below (AlliancePay expects a Ukrainian-style full name, including a patronymic/middle name).
  • customer.individual_tax_id is forwarded as the customer's own tax ID (ITN).
  • No Constants are configured for this connector - if a customer field is missing, it's simply not sent.
  • Your own merchant details (company name, registration number, IBAN - taken automatically from your Corefy merchant profile) are included in the request as a comment, unless send_prid_in_comment 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

  • customer_name_format -> optional, enum (LAST, FIRST, MIDDLE, FIRST, MIDDLE, LAST, LAST, MIDDLE, FIRST, LAST, FIRST, FIRST, LAST) - how to split customer.name into first/last/middle name parts; defaults to LAST, FIRST, MIDDLE.
  • forced_rejection_delay -> optional, number - card payments only; delays reporting a rejection by this many seconds.
  • payment_purpose -> optional, string - the name of a metadata key; whatever value you send under that key in metadata is forwarded to AlliancePay as the payment purpose. For example, setting this to order_purpose and sending metadata.order_purpose in your request forwards that value.
  • final_reconcile_callback_only -> optional, boolean - relies only on the asynchronous callback to finalize the payment, instead of also allowing an active status request to do so.
  • send_prid_in_comment -> optional, boolean - sends your own payment reference ID as the transaction comment, instead of your merchant company details.

Refunds

AlliancePay supports partial refunds, but only one refund per payment (no multiple partial refunds against the same payment).


Payouts processing (connect Provider account, create payout-invoice)

Connect Provider account in Corefy Dashboard

Step 1 - Open connection form

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

Step 2 - Fill in fields and select settings

  • Merchant ID
  • Payment Key
  • Private Key (optional, legacy authorization only)
  • Service Code (optional, legacy authorization only)
  • KID (optional)
  • JWS Private Key (optional)
  • API URL (optional)
  • Test Mode -> (enable if you are using sandbox credentials)

Success

You have connected AlliancePay Provider account!


First request to Corefy API (MIN)

What it does: creates a payout-invoice and sends funds directly to a card.

Payout - MIN

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "reference_id": "3c4d5e6f-7a8b-4c9d-8e02-3f4a5b6c7d8e",
      "service": "payment_card_uah",
      "currency": "UAH",
      "amount": 10,
      "fields": {
        "card_number": "4111111111111111"
      }
    }
  }
}

Important

fields.card_number is required.

Payout - MAX

POST /api/payout-invoices

{
  "data": {
    "type": "payout-invoice",
    "attributes": {
      "reference_id": "4d5e6f7a-8b9c-4d0e-8f13-4a5b6c7d8e9f",
      "service": "payment_card_uah",
      "currency": "UAH",
      "amount": 10,
      "customer": {
        "reference_id": "cus_123",
        "name": "Ivanov Ivan Ivanovych",
        "individual_tax_id": "1234567890",
        "address": {
          "country": "UA",
          "city": "Kyiv",
          "street": "Main street 1"
        }
      },
      "fields": {
        "card_number": "4111111111111111"
      }
    }
  }
}

customer.name is parsed the same way as on the H2H Merchant account, per the Customer Name Format option.


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

  • customer_name_format -> optional, enum - same values and default as on the H2H Merchant account.
  • payout_purpose -> optional, string - same metadata key-lookup mechanism as payment_purpose above, for the payout purpose.
  • send_recipient_passport -> optional, boolean - additionally sends the recipient's passport series+number (from customer.passport_series+customer.passport_number, or the passport Constant) - required by AlliancePay for some payout amounts/profiles.
  • send_prid_in_comment -> optional, boolean - sends your own payout reference ID as the transaction comment, instead of your merchant company details.
  • final_reconcile_callback_only -> optional, boolean - relies only on the asynchronous callback to finalize the payout.
  • finalize_on_invalid_itn -> optional, boolean - treats an invalid recipient tax ID (ITN) response from AlliancePay as a final failure immediately, instead of leaving it pending.

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)

  • first_name -> customer.name (first part, per the name format option)
  • last_name -> customer.name (second part)
  • middle_name -> customer.name (third part)
  • country -> customer.address.country
  • city -> customer.address.city
  • street -> customer.address.street
  • reference_id -> customer.reference_id
  • individual_tax_id -> customer.individual_tax_id
  • passport -> fallback for customer.passport_series+customer.passport_number, used only when send_recipient_passport is enabled

Additional info

  1. Callback routing is automatic - Corefy generates the callback/return URLs per transaction, nothing to configure in AlliancePay's own back-office. With JWS Authorization 2.0, AlliancePay signs callbacks instead of encrypting them, and Corefy checks the signature with AlliancePay's public key.
  2. Active reconciliation is available - both Payments and Payouts support an active status request, in addition to the asynchronous callback, unless final_reconcile_callback_only is enabled.
  3. No recurring - this connector does not support saving/charging a token through Corefy.

FAQ / Troubleshooting

  • Invalid credentials / auth error -> verify the credentials for the selected account type and environment - H2H Merchant account and Provider account use entirely different credential sets
  • JWS verification failed (401) -> check that KID matches the public key you registered with AlliancePay, and that JWS Private Key is the matching ES256 private key in PEM format
  • Payout auth error after switching to JWS Authorization 2.0 -> check that kid, jws_private_key, merchant_id, and payment_key all belong to your payout terminal, not to the H2H Merchant account
  • Refund fails with multiple attempts -> only one refund per payment is allowed
  • Payout fails with an invalid tax ID error -> double-check customer.individual_tax_id, or enable finalize_on_invalid_itn to fail such payouts immediately instead of leaving them pending
  • Currency or service is not supported -> confirm allowed currencies/features in your AlliancePay account and in Corefy - only UAH is available
  • Not sure which account type to use? -> H2H Merchant account is for Payments (card, Apple Pay, Google Pay); Provider account is for card Payouts

Question

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