API reference
Batches
Upload, validate, submit and approve batches of payments.
Endpoints
Download a batch template#
GET/v1/batches/templates/{rail}
Required scope payments:read
The xlsx template to fill in: bank for bank transfers, email for wallet payouts keyed by the recipient's email. Fill the rows and POST the file to /v1/batches.
Path parameters
railstringrequiredbank | email
Responses
200xlsx bytes
application/octet-stream
404Unknown template
application/octet-stream
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "not_found",
"code": "unknown_template",
"message": "Unknown template.",
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl https://stage.ekash.ai/dev/v1/batches/templates/bank \
-H "Authorization: Bearer $EKASH_API_KEY" \
-o template.xlsxHTTP/1.1 200 OK
Content-Type: application/octet-stream
<binary application/octet-stream body>Upload a batch#
POST/v1/batches
Required scope payments:write
Posts a filled xlsx template as multipart/form-data (part name file).
The response already contains every parsed row with its per-field errors. For the email rail, recipients are verified against the payout provider in the BACKGROUND, so poll GET /v1/batches/{id} until validation.complete is true before submitting.
Limits are the ones the apps enforce: 50 rows per bank batch, one platform per email batch (and one target currency for PayPal).
Request body
multipart/form-data
filestring (binary)required
Responses
201Batch accepted (rows may still carry errors)
application/json
Schema BatchResponse
dataBatch10 child attributes
idstringBatch id — use it for GET/submit/approve/reject/delete
railstringstatusstringBatch lifecycle state
row_countintegervalidationBatchValidation3 child attributes
completebooleanFalse while any row is still being verified — keep polling GET /v1/batches/{id}
validating_countintegererror_countintegerRows that cannot be submitted until they are fixed
rowsarray of BatchRow18 child attributes
rowinteger1-based row number in the uploaded sheet (excluding the header)
payment_idstringrecipientPaymentRecipient5 child attributes
namestringemailstringplatformstringWallet rail for an email payout
country_codestringmasked_accountstringMasked account number / IBAN — ekash never returns a full account identifier
amountstringcurrencystringstatusstringvalidationPaymentValidation2 child attributes
statusstringmessagestringThe backend's own explanation, shown verbatim in the apps
errorsmap of stringField -> problem. A row with errors blocks the whole batch from being submitted.
sender_feestringThe part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)
recipient_feestringThe part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)
conversion_feestringThe whole conversion fee of this row, in fee_currency (v2 rows)
fee_currencystringCurrency of the row's fees and total_debited: the wallet that is debited
total_debitedstringWhat this row debits from the wallet; the rows' total_debited add up to the batch's
recipient_gets_is_exactbooleanFalse when expected_received is an estimate (v2 rows)
expected_receivedstringWhat this row's recipient is expected to get, in the row's target currency (v2 rows)
ratestringLocked conversion rate; absent without a conversion
price_locked_atstringWhen the row's price and rate were locked (RFC 3339 UTC; v2 rows)
price_refstringOpaque reference of the price that was applied (v2 rows)
created_atstringtotal_feesstringWhat the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency
total_debitedstringWhat the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes
fee_currencystringCurrency of total_fees and total_debited; absent when the rows do not share a wallet currency
422Not a valid template, or too many rows
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "validation",
"code": "invalid_template",
"message": "Not a valid template, or too many rows.",
"fields": {
"recipient.iban": "Invalid IBAN for GB"
},
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl -X POST https://stage.ekash.ai/dev/v1/batches \
-H "Authorization: Bearer $EKASH_API_KEY" \
-F "file=@payouts.xlsx"{
"data": {
"id": "b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41",
"rail": "bank",
"status": "draft",
"row_count": 3,
"validation": {
"complete": true,
"validating_count": 0,
"error_count": 0
},
"rows": [
{
"row": 3,
"payment_id": "48210",
"recipient": {},
"amount": "string",
"currency": "USD",
"status": "ready_to_process",
"validation": {},
"errors": {
"recipient.iban": "Invalid IBAN for GB"
},
"sender_fee": "15.00",
"recipient_fee": "15.00",
"conversion_fee": "10.00",
"fee_currency": "USD",
"total_debited": "1015.00",
"recipient_gets_is_exact": false,
"expected_received": "985.00",
"rate": "3.6725",
"price_locked_at": "2026-11-02T12:00:00.000Z",
"price_ref": "pr_9c1f0a47b2d83e55"
}
],
"created_at": "2026-09-22T09:14:03Z",
"total_fees": "45.00",
"total_debited": "3045.00",
"fee_currency": "USD"
}
}Get a batch#
GET/v1/batches/{id}
Required scope payments:read
Poll this until validation.complete is true and validation.error_count is 0, then submit.
Path parameters
idstringrequired
Responses
200The batch and its rows
application/json
Schema BatchResponse
dataBatch10 child attributes
idstringBatch id — use it for GET/submit/approve/reject/delete
railstringstatusstringBatch lifecycle state
row_countintegervalidationBatchValidation3 child attributes
completebooleanFalse while any row is still being verified — keep polling GET /v1/batches/{id}
validating_countintegererror_countintegerRows that cannot be submitted until they are fixed
rowsarray of BatchRow18 child attributes
rowinteger1-based row number in the uploaded sheet (excluding the header)
payment_idstringrecipientPaymentRecipient5 child attributes
namestringemailstringplatformstringWallet rail for an email payout
country_codestringmasked_accountstringMasked account number / IBAN — ekash never returns a full account identifier
amountstringcurrencystringstatusstringvalidationPaymentValidation2 child attributes
statusstringmessagestringThe backend's own explanation, shown verbatim in the apps
errorsmap of stringField -> problem. A row with errors blocks the whole batch from being submitted.
sender_feestringThe part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)
recipient_feestringThe part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)
conversion_feestringThe whole conversion fee of this row, in fee_currency (v2 rows)
fee_currencystringCurrency of the row's fees and total_debited: the wallet that is debited
total_debitedstringWhat this row debits from the wallet; the rows' total_debited add up to the batch's
recipient_gets_is_exactbooleanFalse when expected_received is an estimate (v2 rows)
expected_receivedstringWhat this row's recipient is expected to get, in the row's target currency (v2 rows)
ratestringLocked conversion rate; absent without a conversion
price_locked_atstringWhen the row's price and rate were locked (RFC 3339 UTC; v2 rows)
price_refstringOpaque reference of the price that was applied (v2 rows)
created_atstringtotal_feesstringWhat the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency
total_debitedstringWhat the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes
fee_currencystringCurrency of total_fees and total_debited; absent when the rows do not share a wallet currency
curl https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41 \
-H "Authorization: Bearer $EKASH_API_KEY"{
"data": {
"id": "b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41",
"rail": "bank",
"status": "draft",
"row_count": 3,
"validation": {
"complete": true,
"validating_count": 0,
"error_count": 0
},
"rows": [
{
"row": 3,
"payment_id": "48210",
"recipient": {},
"amount": "string",
"currency": "USD",
"status": "ready_to_process",
"validation": {},
"errors": {
"recipient.iban": "Invalid IBAN for GB"
},
"sender_fee": "15.00",
"recipient_fee": "15.00",
"conversion_fee": "10.00",
"fee_currency": "USD",
"total_debited": "1015.00",
"recipient_gets_is_exact": false,
"expected_received": "985.00",
"rate": "3.6725",
"price_locked_at": "2026-11-02T12:00:00.000Z",
"price_ref": "pr_9c1f0a47b2d83e55"
}
],
"created_at": "2026-09-22T09:14:03Z",
"total_fees": "45.00",
"total_debited": "3045.00",
"fee_currency": "USD"
}
}Submit a batch#
POST/v1/batches/{id}/submit
Required scope payments:write
Hands the batch over for approval. If this key auto-approves, the batch is also approved and dispatched. 409 validation_in_progress while recipients are still being verified; 409 invalid_state when the batch was already submitted, approved or rejected; 422 batch_has_errors when a row still needs fixing.
Path parameters
idstringrequired
Responses
200Submitted
application/json
Schema BatchResponse
dataBatch10 child attributes
idstringBatch id — use it for GET/submit/approve/reject/delete
railstringstatusstringBatch lifecycle state
row_countintegervalidationBatchValidation3 child attributes
completebooleanFalse while any row is still being verified — keep polling GET /v1/batches/{id}
validating_countintegererror_countintegerRows that cannot be submitted until they are fixed
rowsarray of BatchRow18 child attributes
rowinteger1-based row number in the uploaded sheet (excluding the header)
payment_idstringrecipientPaymentRecipient5 child attributes
namestringemailstringplatformstringWallet rail for an email payout
country_codestringmasked_accountstringMasked account number / IBAN — ekash never returns a full account identifier
amountstringcurrencystringstatusstringvalidationPaymentValidation2 child attributes
statusstringmessagestringThe backend's own explanation, shown verbatim in the apps
errorsmap of stringField -> problem. A row with errors blocks the whole batch from being submitted.
sender_feestringThe part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)
recipient_feestringThe part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)
conversion_feestringThe whole conversion fee of this row, in fee_currency (v2 rows)
fee_currencystringCurrency of the row's fees and total_debited: the wallet that is debited
total_debitedstringWhat this row debits from the wallet; the rows' total_debited add up to the batch's
recipient_gets_is_exactbooleanFalse when expected_received is an estimate (v2 rows)
expected_receivedstringWhat this row's recipient is expected to get, in the row's target currency (v2 rows)
ratestringLocked conversion rate; absent without a conversion
price_locked_atstringWhen the row's price and rate were locked (RFC 3339 UTC; v2 rows)
price_refstringOpaque reference of the price that was applied (v2 rows)
created_atstringtotal_feesstringWhat the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency
total_debitedstringWhat the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes
fee_currencystringCurrency of total_fees and total_debited; absent when the rows do not share a wallet currency
409Recipient validation still running, or the batch was already submitted, approved or rejected
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "conflict",
"code": "invalid_state",
"message": "Recipient validation still running, or the batch was already submitted, approved or rejected.",
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}422Rows still have errors
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "validation",
"code": "batch_has_errors",
"message": "Rows still have errors.",
"fields": {
"recipient.iban": "Invalid IBAN for GB"
},
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/submit \
-H "Authorization: Bearer $EKASH_API_KEY"{
"data": {
"id": "b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41",
"rail": "bank",
"status": "draft",
"row_count": 3,
"validation": {
"complete": true,
"validating_count": 0,
"error_count": 0
},
"rows": [
{
"row": 3,
"payment_id": "48210",
"recipient": {},
"amount": "string",
"currency": "USD",
"status": "ready_to_process",
"validation": {},
"errors": {
"recipient.iban": "Invalid IBAN for GB"
},
"sender_fee": "15.00",
"recipient_fee": "15.00",
"conversion_fee": "10.00",
"fee_currency": "USD",
"total_debited": "1015.00",
"recipient_gets_is_exact": false,
"expected_received": "985.00",
"rate": "3.6725",
"price_locked_at": "2026-11-02T12:00:00.000Z",
"price_ref": "pr_9c1f0a47b2d83e55"
}
],
"created_at": "2026-09-22T09:14:03Z",
"total_fees": "45.00",
"total_debited": "3045.00",
"fee_currency": "USD"
}
}Approve a batch#
POST/v1/batches/{id}/approve
Required scope payments:approve
Approves and dispatches a submitted batch. 409 invalid_state when it was already approved or rejected. If any row's price was locked more than 48 hours ago, or its exchange rate moved by more than 0.5 %, the whole batch is re-priced first; when the total changes nothing is approved and the answer is 409 price_changed (batch totals in error.fields, each row as <payment_id>.<field>). Approve again with confirm_price_change=true and expected_debits = the expected_debits you were shown (one figure per row).
Path parameters
idstringrequired
Query parameters
confirm_price_changebooleanoptionalSet to true to accept the new price after a 409
price_changed.expected_debitstringoptionalThe batch
total_debitedyou were shown (ornew_total_debitedof the 409price_changedbody), e.g.3045.00. When it is sent and the batch would now debit another total, nothing is approved and you get 409price_changedagain with the new figures.expected_debitsstringoptionalRecommended. The
expected_debitsstring of the 409price_changedbody:<payment_id>:<new_total_debited>,..., e.g.123:1255.00,124:80.50. Every row is compared with its own figure (a row that was not listed must still cost what it costs now), so two rows moving in opposite directions cannot cancel out. When sent it decides overexpected_debit.
Responses
200Approved
application/json
Schema BatchResponse
dataBatch10 child attributes
idstringBatch id — use it for GET/submit/approve/reject/delete
railstringstatusstringBatch lifecycle state
row_countintegervalidationBatchValidation3 child attributes
completebooleanFalse while any row is still being verified — keep polling GET /v1/batches/{id}
validating_countintegererror_countintegerRows that cannot be submitted until they are fixed
rowsarray of BatchRow18 child attributes
rowinteger1-based row number in the uploaded sheet (excluding the header)
payment_idstringrecipientPaymentRecipient5 child attributes
namestringemailstringplatformstringWallet rail for an email payout
country_codestringmasked_accountstringMasked account number / IBAN — ekash never returns a full account identifier
amountstringcurrencystringstatusstringvalidationPaymentValidation2 child attributes
statusstringmessagestringThe backend's own explanation, shown verbatim in the apps
errorsmap of stringField -> problem. A row with errors blocks the whole batch from being submitted.
sender_feestringThe part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)
recipient_feestringThe part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)
conversion_feestringThe whole conversion fee of this row, in fee_currency (v2 rows)
fee_currencystringCurrency of the row's fees and total_debited: the wallet that is debited
total_debitedstringWhat this row debits from the wallet; the rows' total_debited add up to the batch's
recipient_gets_is_exactbooleanFalse when expected_received is an estimate (v2 rows)
expected_receivedstringWhat this row's recipient is expected to get, in the row's target currency (v2 rows)
ratestringLocked conversion rate; absent without a conversion
price_locked_atstringWhen the row's price and rate were locked (RFC 3339 UTC; v2 rows)
price_refstringOpaque reference of the price that was applied (v2 rows)
created_atstringtotal_feesstringWhat the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency
total_debitedstringWhat the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes
fee_currencystringCurrency of total_fees and total_debited; absent when the rows do not share a wallet currency
409`invalid_state` (already approved or rejected) or `price_changed` (the batch price moved; nothing was approved)
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "conflict",
"code": "price_changed",
"message": "`invalid_state` (already approved or rejected) or `price_changed` (the batch price moved; nothing was approved).",
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/approve \
-H "Authorization: Bearer $EKASH_API_KEY"{
"data": {
"id": "b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41",
"rail": "bank",
"status": "draft",
"row_count": 3,
"validation": {
"complete": true,
"validating_count": 0,
"error_count": 0
},
"rows": [
{
"row": 3,
"payment_id": "48210",
"recipient": {},
"amount": "string",
"currency": "USD",
"status": "ready_to_process",
"validation": {},
"errors": {
"recipient.iban": "Invalid IBAN for GB"
},
"sender_fee": "15.00",
"recipient_fee": "15.00",
"conversion_fee": "10.00",
"fee_currency": "USD",
"total_debited": "1015.00",
"recipient_gets_is_exact": false,
"expected_received": "985.00",
"rate": "3.6725",
"price_locked_at": "2026-11-02T12:00:00.000Z",
"price_ref": "pr_9c1f0a47b2d83e55"
}
],
"created_at": "2026-09-22T09:14:03Z",
"total_fees": "45.00",
"total_debited": "3045.00",
"fee_currency": "USD"
}
}Reject a batch#
POST/v1/batches/{id}/reject
Required scope payments:reject
Cancels every row of a batch that has not been approved. 409 invalid_state when it was already approved or rejected.
Path parameters
idstringrequired
Responses
200Rejected
application/json
Schema BatchResponse
dataBatch10 child attributes
idstringBatch id — use it for GET/submit/approve/reject/delete
railstringstatusstringBatch lifecycle state
row_countintegervalidationBatchValidation3 child attributes
completebooleanFalse while any row is still being verified — keep polling GET /v1/batches/{id}
validating_countintegererror_countintegerRows that cannot be submitted until they are fixed
rowsarray of BatchRow18 child attributes
rowinteger1-based row number in the uploaded sheet (excluding the header)
payment_idstringrecipientPaymentRecipient5 child attributes
namestringemailstringplatformstringWallet rail for an email payout
country_codestringmasked_accountstringMasked account number / IBAN — ekash never returns a full account identifier
amountstringcurrencystringstatusstringvalidationPaymentValidation2 child attributes
statusstringmessagestringThe backend's own explanation, shown verbatim in the apps
errorsmap of stringField -> problem. A row with errors blocks the whole batch from being submitted.
sender_feestringThe part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)
recipient_feestringThe part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)
conversion_feestringThe whole conversion fee of this row, in fee_currency (v2 rows)
fee_currencystringCurrency of the row's fees and total_debited: the wallet that is debited
total_debitedstringWhat this row debits from the wallet; the rows' total_debited add up to the batch's
recipient_gets_is_exactbooleanFalse when expected_received is an estimate (v2 rows)
expected_receivedstringWhat this row's recipient is expected to get, in the row's target currency (v2 rows)
ratestringLocked conversion rate; absent without a conversion
price_locked_atstringWhen the row's price and rate were locked (RFC 3339 UTC; v2 rows)
price_refstringOpaque reference of the price that was applied (v2 rows)
created_atstringtotal_feesstringWhat the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency
total_debitedstringWhat the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes
fee_currencystringCurrency of total_fees and total_debited; absent when the rows do not share a wallet currency
409Already approved or rejected
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "conflict",
"code": "invalid_state",
"message": "Already approved or rejected.",
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/reject \
-H "Authorization: Bearer $EKASH_API_KEY"{
"data": {
"id": "b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41",
"rail": "bank",
"status": "draft",
"row_count": 3,
"validation": {
"complete": true,
"validating_count": 0,
"error_count": 0
},
"rows": [
{
"row": 3,
"payment_id": "48210",
"recipient": {},
"amount": "string",
"currency": "USD",
"status": "ready_to_process",
"validation": {},
"errors": {
"recipient.iban": "Invalid IBAN for GB"
},
"sender_fee": "15.00",
"recipient_fee": "15.00",
"conversion_fee": "10.00",
"fee_currency": "USD",
"total_debited": "1015.00",
"recipient_gets_is_exact": false,
"expected_received": "985.00",
"rate": "3.6725",
"price_locked_at": "2026-11-02T12:00:00.000Z",
"price_ref": "pr_9c1f0a47b2d83e55"
}
],
"created_at": "2026-09-22T09:14:03Z",
"total_fees": "45.00",
"total_debited": "3045.00",
"fee_currency": "USD"
}
}Delete a batch#
DELETE/v1/batches/{id}
Required scope payments:write
Permanently removes an UNSUBMITTED batch. A submitted or approved batch cannot be deleted (409) — reject it instead.
Path parameters
idstringrequired
Responses
204Deleted
No response body.
409Already submitted or approved
application/json
Schema Error
errorErrorBody5 child attributes
typestringCoarse error family
codestringStable machine-readable code — branch on this, not on the message
messagestringHuman-readable explanation, safe to log
fieldsmap of stringPer-field errors, present for validation failures
request_idstringEcho of the X-Request-Id header — quote it in a support request
{
"error": {
"type": "conflict",
"code": "invalid_state",
"message": "Already submitted or approved.",
"request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
}
}curl -X DELETE https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41 \
-H "Authorization: Bearer $EKASH_API_KEY"HTTP/1.1 204 No Content