Developers

Create — POST /v1/payments#

Scope payments:write. The Idempotency-Key header is required (see Idempotency).

cURL
curl -X POST https://ekash.ai/v1/payments \
  -H "Authorization: Bearer $EKASH_API_KEY" \
  -H "Idempotency-Key: 3f9a1c4e-inv-2026-0417" \
  -H "Content-Type: application/json" \
  -d '{
    "rail": "bank",
    "amount": "1250.00",
    "currency": "USD",
    "source_currency": "USD",
    "target_currency": "GBP",
    "fee_bearer": "sender",
    "reference": "INV-2026-0417",
    "recipient": {
      "name": "Jane Contractor",
      "country_code": "GB",
      "sort_code": "231470",
      "account_number": "28821822",
      "receiver_type": "PRIVATE",
      "address_line1": "1 Example Street",
      "address_city": "London",
      "address_postal_code": "EC1A 1BB"
    }
  }'

Some corridors need more than the bank fields. A GBP payout, for example, needs the recipient's address; a missing one comes back as 422 validation_failed with the exact field under fields (recipient.address_line1). GET /v1/countries/{code}/bank-requirements lists what each corridor needs.

rail is bank (a bank transfer) or email (a wallet payout keyed by the recipient's email). For email, give recipient.platform — one of wise wallet, payoneer wallet, paypal wallet, e-kash wallet — and recipient.email.

fee_bearer is sender (default), receiver or shared.

quote_ref (optional) is the reference a quote returned (see Price below). Send it within its validity (quote_valid_until, 15 minutes by default) with exactly the same amount, currency, source_currency, target_currency, fee_bearer, rail, platform and destination country, and the payment is priced at the rates you were quoted, so you pay what you were shown even if the exchange rate moved in between. An expired, unknown, another company's or non-matching quote_ref is not an error: the payment is simply priced at the current rates (compare total_debited with the quote's you_pay).

Instead of an inline recipient, send "recipient_id": "5512" for a saved payee (see Recipients). The stored details are used server-side, so you never re-send bank details.

Which bank fields are required depends on the destination. Rather than encoding a matrix, either send what you have and read the fields map of a 422, or ask: GET /v1/countries/GB/bank-requirements?currency=GBP (see Wallets & reference data).

Responses: 201 with the payment; 200 + Idempotent-Replayed: true for a replay; 422 validation_failed with a per-field fields map; 422 insufficient_balance; 403 subscription_frozen; 403 account_not_verified (the company's ekash verification is not complete).

A refused create creates nothing. When POST /v1/payments answers with an error (any 4xx, such as a 422 validation_failed or, on an auto-approving key, a 422 insufficient_balance or 403 subscription_frozen), no payment exists afterwards: nothing is waiting in your approval queue, no payment.created event is sent, and the request does not count toward your daily payment cap. Fix the body and send it again — with the same Idempotency-Key if you like; it is treated as a new request. (The ekash apps behave differently on purpose: they keep a payment with field errors as an editable draft. The API has no draft to edit, so it keeps nothing.)

List — GET /v1/payments#

Scope payments:read. Newest first. Filters — all optional: status, direction (in/out), rail (bank/email), currency, from / to (yyyy-MM-dd, both inclusive), batch_id, reference. Paging: cursor, limit.

Batch members are listed individually and carry their batch_id, so a ledger reconciliation sees every payment exactly once.

Read — GET /v1/payments/{id}#

Scope payments:read. 404 payment_not_found for an id that is not your company's.

What a payment costs#

Every payment, and every quote, says who pays what. Money is a 2-decimal string beside its currency.

FieldMeaning
feesThe ekash fee for the payment as priced, in fees_currency. Unchanged.
sender_feeThe part of the fee you pay on top of the amount, in fee_currency.
recipient_feeThe part of the fee taken off what the recipient receives, in fee_currency.
conversion_feeThe conversion fee when the wallet currency differs from the payout currency (otherwise 0.00), in fee_currency. You pay your share of it on top (it is inside total_debited); the rest comes off what the recipient receives.
fee_currencyThe currency of sender_fee, recipient_fee and conversion_fee: the wallet that is debited.
total_debitedWhat the wallet is debited: the amount in the wallet currency plus what you pay on top.
expected_receivedWhat the recipient is expected to get, in target_currency.
recipient_gets_is_exactfalse when expected_received is an estimate (the recipient's bank or the provider can still take a charge). Show it as an estimate.
rateThe exchange rate that was locked, in units of target_currency per 1 unit of source_currency. Absent without a conversion.
price_locked_atWhen the price and the rate were locked (RFC 3339 UTC).
price_refAn opaque reference of the price that was applied. Quote it when you ask support about a price.
recipient_getsOnce the payout settled, the provider-confirmed amount.

A payment is priced once, when it is created, and the price is locked. Approval takes exactly that total_debited (see Approve for the one exception).

For payments created before the fee model changed, sender_fee is the part of fees charged to the wallet, fee_currency is fees_currency, rate is the recorded rate, and recipient_fee, conversion_fee, expected_received, recipient_gets_is_exact, price_locked_at and price_ref are absent.

Never shown: what the payout provider charges ekash, ekash's margin and any customer-specific pricing terms. Those are not part of any response or webhook.

Approve / reject — POST /v1/payments/{id}/approve · POST /v1/payments/{id}/reject#

Scopes payments:approve / payments:reject. Approving a payment that is already approved or rejected is 409 invalid_state. A payment that still has field errors cannot be approved — fix it in the app, or reject it and create a corrected one.

The price is re-checked at approval when it is old. If the price was locked more than 48 hours ago, or the exchange rate moved by more than 0.5 % since, the payment is re-priced before anything else happens. When the total debited would change, nothing is approved and the answer is 409 price_changed; when it would not change, the new price is applied silently. error.fields carries the new figures as decimal strings:

JSON
{
  "error": {
    "type": "conflict",
    "code": "price_changed",
    "message": "The price of this payment has changed. Please review the new price and confirm.",
    "fields": {
      "previous_total_debited": "1030.00",
      "new_total_debited": "1040.00",
      "new_fees": "40.00",
      "new_sender_fee": "40.00",
      "new_recipient_fee": "0.00",
      "new_conversion_fee": "0.00",
      "new_expected_received": "1000.00",
      "recipient_gets_is_exact": "true",
      "fee_currency": "USD",
      "wallet_currency": "USD",
      "rate": "3.6725",
      "price_locked_at": "2026-11-04T09:30:00.000Z",
      "reason": "age"
    },
    "request_id": "6f0c1e1a-…"
  }
}

reason is age (locked more than 48 hours ago), rate_drift (the rate moved) or debit_mismatch (see expected_debit). rate appears only when the payment converts between currencies. Show the figures to whoever approves, then approve again:

Text
POST /v1/payments/{id}/approve?confirm_price_change=true&expected_debit=1040.00
  • confirm_price_change=true accepts the new price.
  • expected_debit (recommended) is the total you were shown: the new_total_debited of the 409, or the quote's you_pay. If the payment would now debit a different amount (the rate moved again, or someone else re-priced it), nothing is approved and you get 409 price_changed again with the newer figures, so a confirmation can never debit more than the figure it was given for. It is compared to the cent and must be a positive plain decimal ("1040.00", not "1,040.00"), otherwise 422 validation_failed with fields.expected_debit.
  • Without expected_debit, confirm_price_change=true accepts whatever the fresh price is. Always send it.
  • expected_debit can also be sent without confirm_price_change to make sure the payment debits exactly the amount you expect.

Price — POST /v1/payments/quote#

Scope payments:read. Same body as create (the recipient details that do not affect price may be omitted). Nothing is created and no money moves.

you_pay is what your source wallet will be debited for this body, fees included where you bear them: it is priced by the same calculation a create uses, so it equals the total_debited of a payment created from the same body. With fee_bearer sender you pay amount plus the fees (on Payoneer payouts the provider's fee too); with receiver you pay amount and the fees come out of what the recipient gets; with shared the fees are split between you. recipient_gets is what the recipient receives, in target_currency. Rates are live, so a quote and a create made moments apart can differ by a rate move, unless the create sends the quote's quote_ref.

JSON
{
  "data": {
    "you_pay": "1255.00",
    "amount": "1250.00",
    "currency": "USD",
    "source_currency": "USD",
    "target_currency": "GBP",
    "fees": "5.00",
    "provider_fees": "2.50",
    "provider_fees_currency": "USD",
    "provider_fees_estimated": true,
    "recipient_gets": "986.20",
    "recipient_gets_is_exact": false,
    "fee_bearer": "sender"
  }
}

recipient_gets_is_exact: false means the provider prices the final amount at dispatch (some rails and some shared-fee combinations). Show it as an estimate if you show it to a payer.

A quote also carries the breakdown described under What a payment costs (sender_fee, recipient_fee, conversion_fee, fee_currency, expected_received, rate, price_locked_at, price_ref) and two fields for locking the rate:

JSON
{
  "data": {
    "you_pay": "1040.00",
    "fees": "40.00",
    "sender_fee": "40.00",
    "recipient_fee": "0.00",
    "conversion_fee": "0.00",
    "fee_currency": "USD",
    "recipient_gets": "1000.00",
    "expected_received": "1000.00",
    "recipient_gets_is_exact": true,
    "price_locked_at": "2026-11-04T09:30:00.000Z",
    "price_ref": "pr_9c1f0a47b2d83e55",
    "quote_ref": "qt_4f9k2m7x1c8p0d3s6h5j2a9b",
    "quote_valid_until": "2026-11-04T09:45:00.000Z"
  }
}
  • quote_ref — send it as quote_ref on POST /v1/payments (see Create) within quote_valid_until to be priced at exactly these rates.
  • quote_valid_until — the last instant the quote_ref is honoured (15 minutes after the quote).

Remittance — GET /v1/payments/{id}/remittance#

Scope remittances:read. Returns application/pdf. Available once the payout has been successfully dispatched to the provider (from processing onward, not only sent), on the rails that issue a remittance advice — Wise, PayPal and Payoneer payouts. Some payouts never get one, such as bank payouts in corridors served through Revolut and transfers between ekash wallets.

remittance_available on the payment is true exactly when this endpoint will return the PDF. Otherwise it answers 409 remittance_not_available. Errors always come back in the standard JSON error envelope (see Errors); a 503 provider_unavailable means the provider could not hand over its receipt just now, so retry later.