Global Payments

Global payments gateway

Coverage across Latin America, Asia and Africa. You integrate a single API. Baanko routes automatically by country, currency and payment method.

Supported Countries and Methods

Latin America

CountryCurrencyCodePay-in MethodPayout Method
BrazilRealBRLPIXPIX (CPF/CNPJ/Email/Phone/EVP)
MexicoMexican pesoMXNLocal transferSPEI (CLABE)
PeruPeruvian solPENLocal transferBank transfer
ChileChilean pesoCLPLocal transferBank transfer
ColombiaColombian pesoCOPPSE / TransferBank account
VenezuelaBolivarVESLocal transferBank transfer
EcuadorDollar (local)USDLocal transferBank transfer
ArgentinaArgentine pesoARSLocal transferBank transfer

Asia

CountryCurrencyCodePay-in MethodPayout Method
IndiaRupeeINRUPI / IMPSUPI (VPA) / IMPS / NEFT (IFSC)
IndonesiaRupiahIDRVirtual AccountBank transfer
RussiaRubleRUBLocal transferBank transfer
PhilippinesPesoPHPLocal transferCard / GCash
MalaysiaRinggitMYRFPX / Online bankingBank transfer
PakistanRupeePKREasyPaisa / JazzCashEasyPaisa / JazzCash
BangladeshTakaBDTbKash / NagadbKash / Nagad

Africa

CountryCurrencyCodePay-in MethodPayout Method
KenyaShillingKESM-PesaM-Pesa
NigeriaNairaNGNBank transferBank account (CBN)
TanzaniaShillingTZSTigo Pesa / AirtelMobile Money

Authentication

All endpoints accept API Key authentication (recommended for server-to-server).

HeaderDescription
X-Client-IdYour account's client ID
X-API-KeySecret API key

Both headers must be sent together. Sending only one results in a 403 Forbidden error.

Create Charge (Pay-in)

POSThttps://baanko.app/api/transaction/create

Example - Brazil (BRL / PIX)

bash
curl --location 'https://baanko.app/api/transaction/create' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: order-BR-00451' \
--data '{
"amount": 25000,
"paymentMethod": "PIX",
"currency": "BRL",
"postbackUrl": "https://yoursite.com/webhook",
"customer": {
"name": "Maria Souza",
"email": "maria@email.com",
"externalRef": "usr_789",
"document": { "number": "98765432100", "type": "CPF" }
},
"items": [{ "title": "Balance top-up", "unitPrice": 25000, "quantity": 1 }]
}'

Example - Mexico (MXN)

bash
curl --location 'https://baanko.app/api/transaction/create' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: order-MX-00452' \
--data '{
"amount": 50000,
"paymentMethod": "TRANSFER",
"currency": "MXN",
"postbackUrl": "https://yoursite.com/webhook",
"customer": {
"name": "Carlos Mendez",
"email": "carlos@email.com",
"document": { "number": "MEMC801201AB4", "type": "CURP" }
}
}'

Example - India (INR / UPI)

bash
curl --location 'https://baanko.app/api/transaction/create' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: order-IN-00453' \
--data '{
"amount": 100000,
"paymentMethod": "UPI",
"currency": "INR",
"postbackUrl": "https://yoursite.com/webhook",
"customer": {
"name": "Raj Kumar",
"email": "raj@email.com"
}
}'

Example - Kenya (KES / M-Pesa)

bash
curl --location 'https://baanko.app/api/transaction/create' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: order-KE-00466' \
--data '{
"amount": 1000000,
"paymentMethod": "MPESA",
"currency": "KES",
"postbackUrl": "https://yoursite.com/webhook",
"customer": {
"name": "John Mwangi",
"email": "john@email.com",
"phone": "+254712345678"
}
}'

Response (200 OK)

json
{
"data": {
"id": "202304151647256461949132800",
"externalRef": "usr_789",
"amount": 25000,
"companyId": 42,
"paymentMethod": "PIX",
"status": "WAITING_PAYMENT",
"pix": {
"brcode": "00020126580014br.gov.bcb.pix...",
"qrcode": "data:image/png;base64,iVBORw0KGgo...",
"txId": "202304151647256461949132800",
"expiresAt": "2023-04-16T15:47:25Z"
}
},
"status": 200,
"message": "Transacao criada e registrada com sucesso."
}

Create Payout (Pay-out)

POSThttps://baanko.app/api/withdraw/request

Idempotency-Key is required for payouts. It ensures that retrying the same request does not create two payouts.

Example - Brazil (PIX)

bash
curl --location 'https://baanko.app/api/withdraw/request' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: wd-BR-user789-001' \
--data '{
"companyId": 42,
"amount": 5000,
"currency": "BRL",
"pixKey": "98765432100",
"pixKeyType": "CPF",
"creditorDocument": "98765432100",
"description": "User payout"
}'

Example - Mexico (SPEI)

bash
curl --location 'https://baanko.app/api/withdraw/request' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: wd-MX-user790-001' \
--data '{
"companyId": 42,
"amount": 80000,
"currency": "MXN",
"description": "Pago al usuario",
"metadata": {
"beneficiaryName": "Carlos Mendez",
"accountNum": "032180000118359719",
"bankCode": "032",
"channel": "SPEI"
}
}'

Example - India (UPI)

bash
curl --location 'https://baanko.app/api/withdraw/request' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: wd-IN-user792-001' \
--data '{
"companyId": 42,
"amount": 100000,
"currency": "INR",
"description": "User payout",
"metadata": {
"beneficiaryName": "Raj Kumar",
"vpa": "raj@oksbi",
"channel": "UPI"
}
}'

Example - Kenya (M-Pesa)

bash
curl --location 'https://baanko.app/api/withdraw/request' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: cli_abc123' \
--header 'X-API-Key: sk_live_xxxx' \
--header 'Idempotency-Key: wd-KE-user794-001' \
--data '{
"companyId": 42,
"amount": 50000,
"currency": "KES",
"description": "User payout",
"metadata": {
"beneficiaryName": "John Mwangi",
"accountNum": "254712345678",
"channel": "MPESA"
}
}'

Fields per Country - Pay-out (metadata)

Latin America

CountryCurrencyFields in metadata
BrazilBRLpixKey, pixKeyType (top-level)
MexicoMXNbeneficiaryName, accountNum (CLABE), bankCode, channel: "SPEI"
ColombiaCOPbeneficiaryName, accountNum, bankCode, accountType, channel: "PSE"
ArgentinaARSbeneficiaryName, accountNum (CBU/CVU 22 digits), channel: "BANK_TRANSFER"

Asia

CountryCurrencyFields in metadata
India (UPI)INRbeneficiaryName, vpa (e.g. user@oksbi), channel: "UPI"
India (IMPS)INRbeneficiaryName, accountNum, ifscCode, channel: "IMPS"
PhilippinesPHPbeneficiaryName, cardNo (GCash phone), channel: "GCASH"
PakistanPKRbeneficiaryName, accountNum, channel: "EASYPAISA" | "JAZZCASH"

Africa

CountryCurrencyFields in metadata
KenyaKESbeneficiaryName, accountNum (phone), channel: "MPESA"
NigeriaNGNbeneficiaryName, accountNum (10 digits), bankCode (CBN), channel: "BANK_TRANSFER"
TanzaniaTZSbeneficiaryName, accountNum (phone), channel: "TIGOPESA" | "AIRTEL"

Status Mapping

Charge (Pay-in)

StatusMeaningAction
WAITING_PAYMENTAwaiting paymentShow the QR code / instructions
successfulPayment confirmedCredit the balance / release the order
failurePayment failedNotify the user
refundedPayment refundedReverse the credit

Payout (Pay-out)

StatusMeaningAction
processingProcessing (not final)Wait for the webhook with the final status
successfulPayout completedConfirm to the user
failurePayout failed (final)Release the reserved balance. A failed payout never changes to successful
refundedPayout reversedCredit it back

Best Practices

Always use idempotency

Send an Idempotency-Key on every charge and payout. Use a unique ID from your system.

Amounts in cents

amount is always an integer in cents. R$ 10.50 = 1050, MXN 500 = 50000.

Implement the webhook

Don't rely on polling. The final status always arrives through the callback.

Only processing is temporary

processing is not final: wait for the webhook. successful, failure and refunded are final, and a payout that failed never changes to successful later.

Handle duplicate webhooks

The same event can arrive more than once. Store the processed IDs and ignore repeats.