Split Payments
Create and track temporary NGN virtual accounts for split payments. Yara returns a funding account immediately, and once funded, Yara credits the developer fee share to the caller wallet and pays the recipient bank account in NGN.
Create Split Payment Virtual Account
Create a temporary NGN virtual account for a split payment.
POST /api/v1/split-payments/virtual-accounts
curl -X POST "https://api.yara.cash/api/v1/split-payments/virtual-accounts" \
-H "Content-Type: application/json" \
-H "x-yara-api-key: <secret-key>" \
-d '{
"amount": 100000,
"currency": "NGN",
"recipient": {
"account_number": "0123456789",
"bank_code": "058"
},
"developer_fee_percentage": 2.5,
"reference": "split-test-001",
"payment_remarks": "Split payment test"
}'Request body:
amount— recipient payout amount in NGNcurrency— must beNGNrecipient.account_number— recipient bank account numberrecipient.bank_code— recipient bank codedeveloper_fee_percentage— percentage credited to the API caller after successful fundingreference— optional client reference for idempotent create requestspayment_remarks— optional remarks stored with the split payment
Response
{
"data": {
"id": "split-payment-uuid",
"reference": "split-va-abc123",
"virtual_account": {
"bank_name": "Partner Bank",
"bank_code": "000",
"bank_account_number": "1234567890",
"bank_beneficiary_name": "Yara customer"
},
"recipient": {
"account_number": "0123456789",
"bank_code": "058",
"account_name": "Resolved Recipient Name"
},
"pricing": {
"base_amount": 100000,
"provider_fee": 600,
"developer_fee_percentage": 2.5,
"developer_fee_amount": 2500,
"total_expected_amount": 103100
},
"recipient_payout_amount": 100000,
"status": "ACTIVE",
"expires_at": "2026-05-20T18:00:00Z"
},
"message": "success"
}Notes:
referencein the response is the system funding reference used for status lookuppricing.total_expected_amountis the exact amount that must be paid into the virtual accountrecipient_payout_amountis the amount that will be sent to the recipient bank account
Get Split Payment Virtual Account
Fetch a split payment virtual account by reference.
GET /api/v1/split-payments/virtual-accounts?reference=<reference>
curl -X GET "https://api.yara.cash/api/v1/split-payments/virtual-accounts?reference=split-va-abc123" \
-H "x-yara-api-key: <secret-key>" \
-H "Content-Type: application/json"Response
{
"data": {
"id": "split-payment-uuid",
"reference": "split-va-abc123",
"virtual_account": {
"bank_name": "Partner Bank",
"bank_code": "000",
"bank_account_number": "1234567890",
"bank_beneficiary_name": "Yara customer"
},
"recipient": {
"account_number": "0123456789",
"bank_code": "058",
"account_name": "Resolved Recipient Name"
},
"pricing": {
"base_amount": 100000,
"provider_fee": 600,
"developer_fee_percentage": 2.5,
"developer_fee_amount": 2500,
"total_expected_amount": 103100
},
"recipient_payout_amount": 100000,
"status": "ACTIVE",
"expires_at": "2026-05-20T18:00:00Z"
},
"message": "success"
}Authentication
All split-payment endpoints require the x-yara-api-key header with a valid secret key.
Common errors
400 Bad Request
Returned when:
currencyis notNGNamountis less than or equal to zerodeveloper_fee_percentageis less than0or greater than or equal to100- recipient account details are invalid or cannot be resolved
referenceis missing on theGETrequest
Example:
{
"error": "currency must be NGN"
}401 Unauthorized
Returned when the x-yara-api-key header is missing or invalid.
Example:
Unauthorized