{"openapi":"3.0.1","info":{"title":"ekash API","description":"Send payments from your ekash wallets — single or in batches — and track them to settlement.\n\n**Authentication.** Every request needs your API key: `Authorization: Bearer ek_live_…` (or `X-API-Key`). Keys are issued per company by an ekash administrator, carry scopes, and are shown exactly once. A key beginning `ek_test_` belongs to the sandbox.\n\n**Errors.** Failures use real HTTP status codes and a single error shape: `{ \"error\": { type, code, message, fields, request_id } }`. Branch on `code`, not on `message`.\n\n**Idempotency.** `POST /v1/payments` requires an `Idempotency-Key` header. Replaying it returns the original payment with `Idempotent-Replayed: true`.\n\n**Rate limits.** Per key, per minute. Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`; a 429 carries `Retry-After`.\n\n**Money** is always a string with 2 decimals next to an ISO currency code. Timestamps are RFC 3339 UTC.","contact":{"name":"ekash support","email":"support@ekash.ai"},"version":"v1"},"servers":[{"url":"https://stage.ekash.ai/dev","description":"sandbox"},{"url":"https://ekash.ai","description":"production"}],"security":[{"apiKey":[]}],"tags":[{"name":"Webhooks","description":"Register endpoints, inspect deliveries and retry failures"},{"name":"Payments","description":"Create, price, approve, reject and track payments"},{"name":"Wallets","description":"Balances of the company's currency wallets"},{"name":"Batches","description":"Upload, validate, submit and approve batches of payments"},{"name":"Reference","description":"Supported currencies and per-country bank field requirements"},{"name":"Events","description":"Replay the webhook event history"},{"name":"Recipients","description":"Saved payees you can pay by id"}],"paths":{"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List your webhook endpoints","description":"Never includes the signing secret.","operationId":"list","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/List"}}}}}},"post":{"tags":["Webhooks"],"summary":"Register a webhook endpoint","description":"Registers an https endpoint and returns its signing `secret` — the ONLY time the secret\nis ever returned. Store it now; ekash cannot show it again, and you need it to verify\nthe `ekash-signature` header on every delivery.\n\nEach delivery is POSTed as `{ \"id\", \"type\", \"created_at\", \"data\" }`, where `data` is the\nsame object the corresponding REST resource returns. Delivery is at-least-once:\ndeduplicate on `id`, and treat the events as idempotent state reports.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"403":{"description":"Missing the webhooks:manage scope","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"201":{"description":"Created — the response contains the secret","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}},"409":{"description":"This url is already registered, or the endpoint limit is reached","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Not an https url, or an unknown event type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test delivery","description":"Queues a `ping` event to this endpoint alone, whatever it is subscribed to. Use it to\nprove the url is reachable and your signature verification works before you rely on it.\n\nThe response is the queued delivery, not its outcome — the dispatcher sends it within a\nfew seconds. Poll `GET /v1/webhooks/{id}/deliveries` to see how it went.","operationId":"test","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"202":{"description":"Test delivery queued","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}},"409":{"description":"The endpoint is disabled","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/deliveries/{deliveryId}/retry":{"post":{"tags":["Webhooks"],"summary":"Retry a delivery","description":"Re-queues a `dead` or `failed` delivery: attempt count back to 0, sent again within a few\nseconds, with the ORIGINAL payload — the snapshot taken when the event happened, not a\nfresh read. A delivery that already succeeded cannot be retried.","operationId":"retry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"409":{"description":"That delivery already succeeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such delivery on this endpoint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"202":{"description":"Re-queued","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}}}}},"/v1/recipients":{"get":{"tags":["Recipients"],"summary":"List recipients","description":"Newest first, cursor-paginated. `search` matches the name or the email.","operationId":"list_2","parameters":[{"name":"search","in":"query","description":"Matches name or email","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"next_cursor from the previous page","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-100, default 25","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"A page of saved payees","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RecipientListResponse"}}}}}},"post":{"tags":["Recipients"],"summary":"Add a recipient","description":"Validated against the destination's real requirements. The returned `id` can be used as `recipient_id` when creating a payment, so you never have to re-send bank details.","operationId":"add","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipientRequest"}}},"required":true},"responses":{"409":{"description":"An identical recipient already exists","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RecipientResponse"}}}}}}},"/v1/payments":{"get":{"tags":["Payments"],"summary":"List payments","description":"Newest first, cursor-paginated. Batch members are listed individually and carry their `batch_id`. All filters are optional.","operationId":"list_3","parameters":[{"name":"status","in":"query","description":"ready_to_process | processing | sent | received | refunded | canceled | unclaimed | on_hold","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","description":"in | out","required":false,"schema":{"type":"string"}},{"name":"rail","in":"query","description":"bank | email","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","description":"ISO currency of the payment amount","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"yyyy-MM-dd, inclusive","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","description":"yyyy-MM-dd, inclusive","required":false,"schema":{"type":"string"}},{"name":"batch_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"reference","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"next_cursor from the previous page","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-100, default 25","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"A page of payments","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentListResponse"}}}}}},"post":{"tags":["Payments"],"summary":"Create a payment","description":"Creates one payment and, if this API key auto-approves, dispatches it in the same request.\nOtherwise the payment is left in the ekash approval queue with status `ready_to_process`.\n\nThe `Idempotency-Key` header is REQUIRED: retrying a create with the same key returns the\nORIGINAL payment (HTTP 200 and `Idempotent-Replayed: true`) instead of paying twice.\nRe-using a key with a different body is a 409 `idempotency_key_reused`.","operationId":"create_1","parameters":[{"name":"Idempotency-Key","in":"header","description":"Unique per payment attempt; required","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"Replay of a previous create with this Idempotency-Key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"429":{"description":"Rate limit or daily payment cap reached","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"Idempotency-Key missing","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed or insufficient balance, or the payment cannot be priced: `country_blocked`, `route_unavailable`, `fee_bearer_not_offered`, `amount_too_low`, `pricing_unavailable`","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key re-used with a different body","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"403":{"description":"Missing scope, unverified company, or frozen subscription","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}/reject":{"post":{"tags":["Payments"],"summary":"Reject a payment","description":"Cancels a prepared payment. A payment that is already approved is a 409.","operationId":"reject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rejected","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}}}}},"/v1/payments/{id}/approve":{"post":{"tags":["Payments"],"summary":"Approve a payment","description":"Approves and dispatches a payment that is waiting in the approval queue. A payment that is already approved or rejected is a 409 `invalid_state`. If its price was locked more than 48 hours ago, or the exchange rate moved by more than 0.5 %, it is re-priced first; when the total debited would change nothing is approved and the answer is 409 `price_changed` with the new figures in `error.fields` (`new_total_debited`, `new_fees`, `new_sender_fee`, `new_recipient_fee`, `new_conversion_fee`, `new_expected_received`, `fee_currency`, `rate`, `reason`). Approve again with `confirm_price_change=true` and `expected_debit` = the `new_total_debited` you were shown: if the price moved again, you get `price_changed` again instead of an approval.","operationId":"approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirm_price_change","in":"query","description":"Set to true to accept the new price after a 409 `price_changed`.","required":false,"schema":{"type":"boolean","default":false}},{"name":"expected_debit","in":"query","description":"The total debited you were shown (the quote's `you_pay`, or `new_total_debited` of the 409 `price_changed` body), e.g. `1255.00`. When it is sent and the payment would now debit another amount, nothing is approved and you get 409 `price_changed` again with the new figures.","required":false,"schema":{"type":"string"}}],"responses":{"409":{"description":"`invalid_state` (already approved or rejected) or `price_changed` (the price moved; nothing was approved)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"200":{"description":"Approved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"`expected_debit` is not a positive decimal, or insufficient balance","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/quote":{"post":{"tags":["Payments"],"summary":"Price a payment","description":"Dry run: what the wallet would be debited, what the recipient would receive and what it costs, broken down into `sender_fee` (you pay it on top), `recipient_fee` (taken off what the recipient receives) and `conversion_fee`, all in `fee_currency`. Creates nothing and moves no money. The answer carries a `quote_ref`: send it as `quote_ref` on the create within `quote_valid_until`, with the same inputs, to be priced at exactly these rates.","operationId":"quote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}},"required":true},"responses":{"200":{"description":"The price","content":{"*/*":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"The payment cannot be priced: `country_blocked`, `route_unavailable`, `fee_bearer_not_offered`, `amount_too_low`, `pricing_unavailable`, or `validation_failed`","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches":{"post":{"tags":["Batches"],"summary":"Upload a batch","description":"Posts a filled xlsx template as `multipart/form-data` (part name `file`).\n\nThe response already contains every parsed row with its per-field errors. For the email\nrail, recipients are verified against the payout provider in the BACKGROUND, so poll\n`GET /v1/batches/{id}` until `validation.complete` is true before submitting.\n\nLimits are the ones the apps enforce: 50 rows per bank batch, one platform per email\nbatch (and one target currency for PayPal).","operationId":"upload","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"422":{"description":"Not a valid template, or too many rows","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"201":{"description":"Batch accepted (rows may still carry errors)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}}}}},"/v1/batches/{id}/submit":{"post":{"tags":["Batches"],"summary":"Submit a batch","description":"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.","operationId":"submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Submitted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"409":{"description":"Recipient validation still running, or the batch was already submitted, approved or rejected","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Rows still have errors","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}/reject":{"post":{"tags":["Batches"],"summary":"Reject a batch","description":"Cancels every row of a batch that has not been approved. 409 `invalid_state` when it was already approved or rejected.","operationId":"reject_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rejected","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"409":{"description":"Already approved or rejected","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}/approve":{"post":{"tags":["Batches"],"summary":"Approve a batch","description":"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).","operationId":"approve_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirm_price_change","in":"query","description":"Set to true to accept the new price after a 409 `price_changed`.","required":false,"schema":{"type":"boolean","default":false}},{"name":"expected_debit","in":"query","description":"The batch `total_debited` you were shown (or `new_total_debited` of the 409 `price_changed` body), e.g. `3045.00`. When it is sent and the batch would now debit another total, nothing is approved and you get 409 `price_changed` again with the new figures.","required":false,"schema":{"type":"string"}},{"name":"expected_debits","in":"query","description":"Recommended. The `expected_debits` string of the 409 `price_changed` body: `<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 over `expected_debit`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Approved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"409":{"description":"`invalid_state` (already approved or rejected) or `price_changed` (the batch price moved; nothing was approved)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Read one webhook endpoint","operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The endpoint (never includes its secret)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}},"404":{"description":"No such endpoint for your company","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Removes the endpoint and its delivery log. Your event history is NOT deleted — it stays\nreadable through `GET /v1/events`.","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Deleted"}}},"patch":{"tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Changes the subscribed events, enables or disables the endpoint, or updates the\ndescription. Re-enabling also clears the consecutive-failure count.\n\nDisabling stops deliveries without losing the endpoint: anything queued for it while it\nis disabled is marked `failed` rather than retried, and can be retried by hand once you\nenable it again.","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List an endpoint's deliveries","description":"Newest first. Each row carries the attempt count, the status code the endpoint returned,\nthe first 500 characters of its response and, while a retry is scheduled,\n`next_attempt_at`.\n\nA delivery that fails every attempt in the schedule (1m, 5m, 30m, 2h, 6h, 12h, 24h)\nends as `dead` and is not retried automatically.","operationId":"deliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"next_cursor from the previous page","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Page size, max 100","required":false,"schema":{"type":"integer","format":"int32","default":25}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/List"}}}}}}},"/v1/webhooks/event-types":{"get":{"tags":["Webhooks"],"summary":"List the webhook event types","description":"Every value that can appear in `type` and be subscribed to.","operationId":"eventTypes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Data"}}}}}}},"/v1/wallets":{"get":{"tags":["Wallets"],"summary":"List wallet balances","description":"Every wallet the company holds, with its available balance. Topping a wallet up is done in the ekash apps, not through this API.","operationId":"list_1","responses":{"200":{"description":"The balances","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WalletListResponse"}}}}}}},"/v1/recipients/{id}":{"get":{"tags":["Recipients"],"summary":"Get a recipient","operationId":"get_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RecipientResponse"}}}},"404":{"description":"No such recipient for this API key's company","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Recipients"],"summary":"Delete a recipient","description":"Removes the saved payee. Payments already made to it are untouched.","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"No such recipient for this API key's company","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payments/{id}":{"get":{"tags":["Payments"],"summary":"Get a payment","operationId":"get_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"No such payment for this API key's company","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"200":{"description":"Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}}}}},"/v1/payments/{id}/remittance":{"get":{"tags":["Payments"],"summary":"Download the remittance advice","description":"The PDF confirmation of transfer, once the payout has been successfully dispatched to the provider, on rails that issue one. Exactly when `remittance_available` is true on the payment; otherwise 409 `remittance_not_available`. Every failure is returned in the standard error envelope.","operationId":"remittance","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"503":{"description":"The payout provider could not supply the advice; retry","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"200":{"description":"PDF bytes","content":{"application/pdf":{}}},"409":{"description":"No remittance advice for this payment (not yet dispatched, or its rail does not issue one)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"tags":["Events"],"summary":"List events","description":"Newest first, cursor-paginated. Filter with `type` and `since`.\n\nEach row is exactly what a webhook delivery carries, so a replay and a live delivery can\nbe handled by the same code. Events are the record of what happened, not of what was\ndelivered: an event appears here whether or not any endpoint received it, and appears\nonce no matter how many endpoints it went to.","operationId":"list_4","parameters":[{"name":"type","in":"query","description":"Only this event type, e.g. payment.sent","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","description":"Only events at or after this RFC 3339 UTC timestamp","required":false,"schema":{"type":"string"},"example":"2026-09-22T09:00:00Z"},{"name":"cursor","in":"query","description":"next_cursor from the previous page","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, max 100","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"400":{"description":"Unknown event type, malformed since, or a cursor ekash did not issue","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"200":{"description":"A page of events, newest first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/List"}}}}}}},"/v1/currencies":{"get":{"tags":["Reference"],"summary":"List supported currencies","description":"The currencies ekash holds wallets in and prices payments against.","operationId":"currencies","responses":{"200":{"description":"The supported currencies","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CurrencyListResponse"}}}}}}},"/v1/countries/{code}/bank-requirements":{"get":{"tags":["Reference"],"summary":"Bank fields required for a country","description":"What a bank payout to this country and currency needs. Several `account_types` can be\noffered for one corridor (IBAN vs sort code vs SWIFT) — supply the fields of any ONE of\nthem in `recipient` when you create the payment.\n\nUse this instead of hard-coding a country matrix: a corridor ekash adds then works with\nno change on your side.","operationId":"bankRequirements","parameters":[{"name":"code","in":"path","description":"ISO 3166-1 alpha-2 country code, e.g. GB","required":true,"schema":{"type":"string"}},{"name":"currency","in":"query","description":"Currency the recipient is paid in, e.g. GBP","required":true,"schema":{"type":"string"}},{"name":"source_currency","in":"query","description":"Wallet the payment is funded from; defaults to USD","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Requirements for this corridor","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BankRequirementsResponse"}}}},"404":{"description":"ekash does not pay out to this country","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}":{"get":{"tags":["Batches"],"summary":"Get a batch","description":"Poll this until `validation.complete` is true and `validation.error_count` is 0, then submit.","operationId":"get_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The batch and its rows","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}}}},"delete":{"tags":["Batches"],"summary":"Delete a batch","description":"Permanently removes an UNSUBMITTED batch. A submitted or approved batch cannot be deleted (409) — reject it instead.","operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"409":{"description":"Already submitted or approved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"204":{"description":"Deleted"}}}},"/v1/batches/templates/{rail}":{"get":{"tags":["Batches"],"summary":"Download a batch template","description":"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.","operationId":"template","parameters":[{"name":"rail","in":"path","description":"bank | email","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Unknown template","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/Error"}}}},"200":{"description":"xlsx bytes","content":{"application/octet-stream":{}}}}}}},"components":{"schemas":{"CreateWebhookRequest":{"required":["url"],"type":"object","properties":{"url":{"type":"string","description":"https url ekash will POST to. http://localhost is accepted outside production.","example":"https://merchant.example.com/ekash/webhooks"},"events":{"type":"array","description":"Event types to receive. Omit (or send an empty array) to receive every event.","example":["payment.sent","payment.refunded"],"items":{"type":"string","description":"Event types to receive. Omit (or send an empty array) to receive every event.","example":"[\"payment.sent\",\"payment.refunded\"]"}},"description":{"type":"string","description":"Your own note, shown in the ekash admin portal","example":"production ledger sync"}}},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"description":"Error envelope returned by every failing ekash API call"},"ErrorBody":{"type":"object","properties":{"type":{"type":"string","description":"Coarse error family","example":"validation","enum":["authentication","permission","invalid_request","validation","not_found","conflict","rate_limited","server"]},"code":{"type":"string","description":"Stable machine-readable code — branch on this, not on the message","example":"validation_failed"},"message":{"type":"string","description":"Human-readable explanation, safe to log","example":"Please correct the highlighted fields."},"fields":{"type":"object","additionalProperties":{"type":"string","description":"Per-field errors, present for validation failures"},"description":"Per-field errors, present for validation failures"},"request_id":{"type":"string","description":"Echo of the X-Request-Id header — quote it in a support request"}}},"Data":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"object"}}}},"CreateRecipientRequest":{"required":["payment_method"],"type":"object","properties":{"name":{"type":"string","description":"Beneficiary name. Required for a bank payee; optional for an e-wallet payee."},"email":{"type":"string","description":"Identifier for an e-wallet payee (email, @wisetag or phone depending on the rail)"},"payment_method":{"type":"string","enum":["BANK","E_WALLET"]},"country_code":{"type":"string"},"currency":{"type":"string"},"iban":{"type":"string"},"swift_code":{"type":"string"},"account_number":{"type":"string"},"routing_number":{"type":"string"},"sort_code":{"type":"string"},"address_city":{"type":"string"},"address_state":{"type":"string"},"address_line1":{"type":"string"},"address_postal_code":{"type":"string"},"receiver_type":{"type":"string","enum":["PRIVATE","BUSINESS"]}}},"Recipient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"payment_method":{"type":"string","enum":["BANK","E_WALLET"]},"country_code":{"type":"string"},"currency":{"type":"string"},"masked_account_number":{"type":"string","description":"Masked account number, e.g. 12*******89"},"masked_iban":{"type":"string","description":"Masked IBAN, e.g. GB29****1234"},"swift_code":{"type":"string"},"sort_code":{"type":"string"},"routing_number":{"type":"string"},"receiver_type":{"type":"string","enum":["PRIVATE","BUSINESS"]},"source":{"type":"string","description":"MANUAL, or BATCH_PAYMENT when ekash saved it automatically from a sent batch payment"},"created_at":{"type":"string"}}},"RecipientResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Recipient"}},"description":"A single saved payee"},"CreatePaymentRequest":{"required":["amount","currency","rail"],"type":"object","properties":{"rail":{"type":"string","description":"\"bank\" for a bank transfer, \"email\" for a wallet payout keyed by the recipient's email","example":"bank","enum":["bank","email"]},"amount":{"type":"string","description":"Amount to send, up to 2 decimals","example":"1250.00"},"currency":{"type":"string","description":"ISO currency the amount is expressed in","example":"USD"},"source_currency":{"type":"string","description":"Wallet to debit. Defaults to currency when omitted.","example":"USD"},"target_currency":{"type":"string","description":"Currency the recipient is paid in. Defaults to currency when omitted.","example":"GBP"},"fee_bearer":{"type":"string","description":"Who carries the ekash fee. Defaults to \"sender\".","example":"sender","enum":["sender","receiver","shared"]},"reference":{"type":"string","description":"Your own reference, stored and shown on the remittance","example":"INV-2026-0417"},"platform":{"type":"string","description":"Wallet rail for rail = \"email\". Required there, and the ONLY way to give it when paying a\nsaved payee by recipient_id — a saved recipient records the account, not which wallet\nnetwork to pay it on. With an inline recipient it may also be given as recipient.platform;\nthis field wins if both are present. Ignored for rail = \"bank\".","example":"wise wallet","enum":["wise wallet","payoneer wallet","paypal wallet","e-kash wallet"]},"recipient":{"$ref":"#/components/schemas/RecipientInput"},"recipient_id":{"type":"string","description":"Id of a saved recipient (see GET /v1/recipients). Mutually exclusive with recipient."},"quote_ref":{"type":"string","description":"The `quote_ref` returned by POST /v1/payments/quote. Send it on the create within the quote's validity window (`quote_valid_until`, 15 minutes by default) with exactly the same amount, currencies, fee bearer, rail and destination country and the payment is priced at the rates you were quoted. Anything else (an expired, unknown or mismatching ref) is not an error: the payment is simply priced at the current rates.","example":"qt_4f9k2m7x1c8p0d3s6h5j2a9b"}}},"RecipientInput":{"type":"object","properties":{"name":{"type":"string","description":"Beneficiary name. Required for the bank rail; optional for an e-wallet payout."},"email":{"type":"string","description":"Recipient identifier for the email rail: an email, a @wisetag or a phone number depending on the platform"},"platform":{"type":"string","description":"Wallet rail — required when rail = \"email\"","enum":["wise wallet","payoneer wallet","paypal wallet","e-kash wallet"]},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2 country of the recipient's bank","example":"GB"},"iban":{"type":"string"},"swift_code":{"type":"string"},"account_number":{"type":"string"},"routing_number":{"type":"string"},"sort_code":{"type":"string"},"bank_code":{"type":"string"},"ifsc_code":{"type":"string"},"bsb_code":{"type":"string"},"branch_code":{"type":"string"},"clabe":{"type":"string"},"cpf":{"type":"string"},"institution_number":{"type":"string"},"transit_number":{"type":"string"},"phone_number":{"type":"string"},"date_of_birth":{"type":"string","description":"YYYY-MM-DD, required for some destinations (e.g. Korea)"},"card_number":{"type":"string"},"address_city":{"type":"string"},"address_state":{"type":"string"},"address_line1":{"type":"string"},"address_postal_code":{"type":"string"},"receiver_type":{"type":"string","enum":["PRIVATE","BUSINESS"]}},"description":"Inline recipient. Mutually exclusive with recipient_id."},"Payment":{"type":"object","properties":{"id":{"type":"string","description":"ekash payment id","example":"48210"},"rail":{"type":"string","description":"\"bank\" for a bank transfer, \"email\" for a wallet payout keyed by the recipient's email","example":"bank","enum":["bank","email"]},"status":{"type":"string","description":"Customer-facing status","example":"processing","enum":["ready_to_process","processing","sent","received","refunded","canceled","unclaimed","on_hold"]},"direction":{"type":"string","description":"\"out\" for money leaving the company, \"in\" for money arriving","example":"out","enum":["in","out"]},"amount":{"type":"string","description":"Amount requested, 2 decimals","example":"1250.00"},"currency":{"type":"string","description":"ISO currency of amount","example":"USD"},"source_currency":{"type":"string","description":"Wallet the money is taken from","example":"USD"},"target_currency":{"type":"string","description":"Currency the recipient is paid in","example":"GBP"},"fees":{"type":"string","description":"ekash service fee (includes the conversion component)","example":"5.00"},"fees_currency":{"type":"string"},"fee_bearer":{"type":"string","description":"Who carries the fee","enum":["sender","receiver","shared"]},"total_debited":{"type":"string","description":"Total debited from the wallet, when it has been computed","example":"1255.00"},"recipient_gets":{"type":"string","description":"Amount the recipient receives, when known","example":"1250.00"},"recipient":{"$ref":"#/components/schemas/PaymentRecipient"},"reference":{"type":"string","description":"Your reference, echoed back","example":"INV-2026-0417"},"transaction_id":{"type":"string","description":"ekash transaction id shown to the customer in the apps"},"batch_id":{"type":"string","description":"Batch id when this payment came from an uploaded batch; null for a single payment"},"validation":{"$ref":"#/components/schemas/PaymentValidation"},"errors":{"type":"object","additionalProperties":{"type":"string","description":"Per-field problems that must be fixed before this payment can be approved"},"description":"Per-field problems that must be fixed before this payment can be approved"},"remittance_available":{"type":"boolean","description":"True exactly when GET /v1/payments/{id}/remittance will return the PDF: the payout was dispatched successfully and its rail issues a remittance advice"},"created_at":{"type":"string","description":"RFC 3339 UTC","example":"2026-09-22T09:14:03Z"},"approved_at":{"type":"string"},"idempotency_key":{"type":"string","description":"The Idempotency-Key this payment was created with"},"sender_fee":{"type":"string","description":"The part of the ekash fee the sender pays on top of the amount, in fee_currency. Present on payments priced by the fees v2 engine; on older payments it is the part of `fees` charged to the wallet.","example":"15.00"},"recipient_fee":{"type":"string","description":"The part of the ekash fee taken off what the recipient receives, in fee_currency. v2 payments only.","example":"15.00"},"conversion_fee":{"type":"string","description":"The whole ekash conversion fee, in fee_currency (zero without a conversion). The sender pays its share on top, the rest is taken off what the recipient receives. v2 payments only.","example":"10.00"},"fee_currency":{"type":"string","description":"Currency of sender_fee, recipient_fee and conversion_fee: the wallet that was debited","example":"USD"},"recipient_gets_is_exact":{"type":"boolean","description":"False when expected_received is an estimate (the recipient's bank or the provider can still take a fee). v2 payments only."},"expected_received":{"type":"string","description":"What the recipient is expected to get, in target_currency, as locked when the payment was priced. v2 payments only; recipient_gets is the provider-confirmed figure once the payout settled.","example":"985.00"},"rate":{"type":"string","description":"Locked conversion rate (units of target_currency per 1 unit of source_currency); absent without a conversion","example":"3.6725"},"price_locked_at":{"type":"string","description":"When the price and the exchange rate were locked (RFC 3339 UTC). v2 payments only.","example":"2026-11-02T12:00:00.000Z"},"price_ref":{"type":"string","description":"Opaque reference of the price that was applied. v2 payments only.","example":"pr_9c1f0a47b2d83e55"}}},"PaymentRecipient":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"platform":{"type":"string","description":"Wallet rail for an email payout","enum":["wise wallet","payoneer wallet","paypal wallet","e-kash wallet"]},"country_code":{"type":"string"},"masked_account":{"type":"string","description":"Masked account number / IBAN — ekash never returns a full account identifier"}}},"PaymentResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Payment"}},"description":"A single payment"},"PaymentValidation":{"type":"object","properties":{"status":{"type":"string","enum":["validating","valid","invalid","unverified"]},"message":{"type":"string","description":"The backend's own explanation, shown verbatim in the apps"}}},"Quote":{"type":"object","properties":{"you_pay":{"type":"string","description":"Total debited from the source wallet: the same figure a payment created from this body reports as total_debited","example":"1255.00"},"amount":{"type":"string","description":"The amount being sent, as requested","example":"1250.00"},"currency":{"type":"string"},"source_currency":{"type":"string"},"target_currency":{"type":"string"},"fees":{"type":"string","description":"ekash service fee (conversion component included)","example":"5.00"},"provider_fees":{"type":"string","description":"Provider rail fee when the provider quoted one","example":"2.50"},"provider_fees_currency":{"type":"string"},"provider_fees_estimated":{"type":"boolean","description":"True when the provider fee is ekash's estimate rather than a live provider quote"},"recipient_gets":{"type":"string","description":"What the recipient receives","example":"1250.00"},"recipient_gets_is_exact":{"type":"boolean","description":"False when recipient_gets can still move at dispatch time"},"rate":{"type":"string","description":"Conversion rate applied (units of target_currency per 1 unit of source_currency) when source and target currency differ; absent when they are the same","example":"3.6725"},"fee_bearer":{"type":"string","enum":["sender","receiver","shared"]},"sender_fee":{"type":"string","description":"The part of the ekash fee you pay on top of the amount, in fee_currency. Present on payments priced by the fees v2 engine; absent otherwise.","example":"15.00"},"recipient_fee":{"type":"string","description":"The part of the ekash fee taken off what the recipient receives, in fee_currency","example":"15.00"},"conversion_fee":{"type":"string","description":"The ekash conversion fee (whole), in fee_currency; zero when no conversion is needed. You pay your share of it on top (inside `fees` and `you_pay`), the rest is taken off what the recipient receives.","example":"10.00"},"fee_currency":{"type":"string","description":"Currency of sender_fee, recipient_fee and conversion_fee: the wallet that is debited","example":"USD"},"expected_received":{"type":"string","description":"What the recipient is expected to get, in target_currency. The same figure as recipient_gets on a quote; use recipient_gets_is_exact to know whether it can still move.","example":"985.00"},"price_locked_at":{"type":"string","description":"When the price and the exchange rate were locked (RFC 3339 UTC)","example":"2026-11-02T12:00:00.000Z"},"price_ref":{"type":"string","description":"Opaque reference of the price that was applied","example":"pr_9c1f0a47b2d83e55"},"quote_ref":{"type":"string","description":"Pass this as `quote_ref` on POST /v1/payments within `quote_valid_until`, with the same inputs, to be priced at exactly these rates. Absent when the quote cannot be honoured later.","example":"qt_4f9k2m7x1c8p0d3s6h5j2a9b"},"quote_valid_until":{"type":"string","description":"Last instant `quote_ref` is honoured (RFC 3339 UTC)","example":"2026-11-02T12:15:00.000Z"}}},"QuoteResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"description":"The price of a payment that was not created"},"Batch":{"type":"object","properties":{"id":{"type":"string","description":"Batch id — use it for GET/submit/approve/reject/delete"},"rail":{"type":"string","enum":["bank","email"]},"status":{"type":"string","description":"Batch lifecycle state","example":"draft","enum":["draft","submitted","approved","rejected"]},"row_count":{"type":"integer","format":"int32"},"validation":{"$ref":"#/components/schemas/BatchValidation"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/BatchRow"}},"created_at":{"type":"string"},"total_fees":{"type":"string","description":"What the sender pays on top of the amounts over all rows (fees and the sender's share of the conversion), in fee_currency","example":"45.00"},"total_debited":{"type":"string","description":"What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes","example":"3045.00"},"fee_currency":{"type":"string","description":"Currency of total_fees and total_debited; absent when the rows do not share a wallet currency","example":"USD"}}},"BatchResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Batch"}},"description":"An uploaded batch with its rows"},"BatchRow":{"type":"object","properties":{"row":{"type":"integer","description":"1-based row number in the uploaded sheet (excluding the header)","format":"int32","example":3},"payment_id":{"type":"string"},"recipient":{"$ref":"#/components/schemas/PaymentRecipient"},"amount":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string","enum":["ready_to_process","processing","sent","received","refunded","canceled","unclaimed","on_hold"]},"validation":{"$ref":"#/components/schemas/PaymentValidation"},"errors":{"type":"object","additionalProperties":{"type":"string","description":"Field -> problem. A row with errors blocks the whole batch from being submitted."},"description":"Field -> problem. A row with errors blocks the whole batch from being submitted."},"sender_fee":{"type":"string","description":"The part of the ekash fee the sender pays on top of this row's amount, in fee_currency (v2 rows)","example":"15.00"},"recipient_fee":{"type":"string","description":"The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)","example":"15.00"},"conversion_fee":{"type":"string","description":"The whole conversion fee of this row, in fee_currency (v2 rows)","example":"10.00"},"fee_currency":{"type":"string","description":"Currency of the row's fees and total_debited: the wallet that is debited","example":"USD"},"total_debited":{"type":"string","description":"What this row debits from the wallet; the rows' total_debited add up to the batch's","example":"1015.00"},"recipient_gets_is_exact":{"type":"boolean","description":"False when expected_received is an estimate (v2 rows)"},"expected_received":{"type":"string","description":"What this row's recipient is expected to get, in the row's target currency (v2 rows)","example":"985.00"},"rate":{"type":"string","description":"Locked conversion rate; absent without a conversion","example":"3.6725"},"price_locked_at":{"type":"string","description":"When the row's price and rate were locked (RFC 3339 UTC; v2 rows)","example":"2026-11-02T12:00:00.000Z"},"price_ref":{"type":"string","description":"Opaque reference of the price that was applied (v2 rows)","example":"pr_9c1f0a47b2d83e55"}}},"BatchValidation":{"type":"object","properties":{"complete":{"type":"boolean","description":"False while any row is still being verified — keep polling GET /v1/batches/{id}"},"validating_count":{"type":"integer","format":"int32"},"error_count":{"type":"integer","description":"Rows that cannot be submitted until they are fixed","format":"int32"}}},"UpdateWebhookRequest":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Disable to stop deliveries without losing the endpoint or its history"},"description":{"type":"string"}}},"List":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"next_cursor":{"type":"string","description":"Pass back as ?cursor= to fetch the next page; null at the end of the list"},"has_more":{"type":"boolean"}}},"Wallet":{"type":"object","properties":{"currency":{"type":"string","example":"USD"},"balance":{"type":"string","description":"Available balance, 2 decimals","example":"14320.55"}}},"WalletListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}},"description":"The company's wallet balances"},"RecipientListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}},"next_cursor":{"type":"string","description":"Pass back as ?cursor= for the next page; null at the end of the list"},"has_more":{"type":"boolean"}},"description":"A cursor-paginated page of saved payees"},"PaymentListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"next_cursor":{"type":"string","description":"Pass back as ?cursor= for the next page; null at the end of the list"},"has_more":{"type":"boolean"}},"description":"A cursor-paginated page of payments"},"CurrencyListResponse":{"type":"object","properties":{"data":{"type":"array","example":["AED","EUR","GBP","SAR","USD"],"items":{"type":"string","example":"[\"AED\",\"EUR\",\"GBP\",\"SAR\",\"USD\"]"}}},"description":"The currencies ekash prices payments against"},"BankAccountType":{"type":"object","properties":{"type":{"type":"string","example":"sort_code"},"title":{"type":"string","example":"Local bank account"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/BankRequirementField"}}}},"BankRequirementAllowedValue":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"description":"For a select field, the values accepted"},"BankRequirementField":{"type":"object","properties":{"key":{"type":"string","description":"The field name to send in recipient{}","example":"sort_code"},"name":{"type":"string"},"type":{"type":"string","example":"text"},"required":{"type":"boolean"},"example":{"type":"string"},"allowed_values":{"type":"array","description":"For a select field, the values accepted","items":{"$ref":"#/components/schemas/BankRequirementAllowedValue"}}}},"BankRequirements":{"type":"object","properties":{"country_code":{"type":"string"},"currency":{"type":"string"},"source_currency":{"type":"string"},"provider":{"type":"string","description":"The payout provider ekash routes this corridor to","example":"Wise"},"account_types":{"type":"array","items":{"$ref":"#/components/schemas/BankAccountType"}}}},"BankRequirementsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BankRequirements"}},"description":"The bank fields a corridor needs"}},"securitySchemes":{"apiKey":{"type":"http","description":"Your ekash API key, e.g. ek_live_… — sent as a bearer token","scheme":"bearer"}}}}