AlliancePay
Supports in this guide: Payments, Payouts
Provider website: bankalliance.ua
What you need to do for start processing transactions (brief summary)
- Choose account type
- Get your credentials (from AlliancePay)
- Connect in Dashboard
- 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 onlyPurchaseis 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.nameis 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_idis forwarded as the customer's own tax ID (ITN).- No Constants are configured for this connector - if a
customerfield 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_commentis 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 splitcustomer.nameinto first/last/middle name parts; defaults toLAST, 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 ametadatakey; whatever value you send under that key inmetadatais forwarded to AlliancePay as the payment purpose. For example, setting this toorder_purposeand sendingmetadata.order_purposein 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 - samemetadatakey-lookup mechanism aspayment_purposeabove, for the payout purpose.send_recipient_passport-> optional, boolean - additionally sends the recipient's passport series+number (fromcustomer.passport_series+customer.passport_number, or thepassportConstant) - 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.countrycity->customer.address.citystreet->customer.address.streetreference_id->customer.reference_idindividual_tax_id->customer.individual_tax_idpassport-> fallback forcustomer.passport_series+customer.passport_number, used only whensend_recipient_passportis enabled
Additional info
- 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.
- Active reconciliation is available - both Payments and Payouts support an active status request, in addition to the asynchronous callback, unless
final_reconcile_callback_onlyis enabled. - 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, andpayment_keyall 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 enablefinalize_on_invalid_itnto 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
UAHis 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!