Developers

Upload, validate, submit and approve batches of payments.

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

  • railstringrequired

    bank | email

Responses

200xlsx bytes

application/octet-stream

404Unknown template

application/octet-stream

Schema Error

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 404
{
  "error": {
    "type": "not_found",
    "code": "unknown_template",
    "message": "Unknown template.",
    "request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
  }
}
Request
curl https://stage.ekash.ai/dev/v1/batches/templates/bank \
  -H "Authorization: Bearer $EKASH_API_KEY" \
  -o template.xlsx
Response · 200
HTTP/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

  • dataBatch
    10 child attributes
    • idstring

      Batch id — use it for GET/submit/approve/reject/delete

    • railstring
      One of bank email
    • statusstring

      Batch lifecycle state

      One of draft submitted approved rejected
    • row_countinteger
    • validationBatchValidation
      3 child attributes
      • completeboolean

        False while any row is still being verified — keep polling GET /v1/batches/{id}

      • validating_countinteger
      • error_countinteger

        Rows that cannot be submitted until they are fixed

    • rowsarray of BatchRow
      18 child attributes
      • rowinteger

        1-based row number in the uploaded sheet (excluding the header)

        Example 3
      • payment_idstring
      • 5 child attributes
        • namestring
        • emailstring
        • platformstring

          Wallet rail for an email payout

          One of wise wallet payoneer wallet paypal wallet e-kash wallet
        • country_codestring
        • masked_accountstring

          Masked account number / IBAN — ekash never returns a full account identifier

      • amountstring
      • currencystring
      • statusstring
        One of ready_to_process processing sent received refunded canceled unclaimed on_hold
      • 2 child attributes
        • statusstring
          One of validating valid invalid unverified
        • messagestring

          The backend's own explanation, shown verbatim in the apps

      • errorsmap of string

        Field -> problem. A row with errors blocks the whole batch from being submitted.

      • sender_feestring

        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_feestring

        The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)

        Example 15.00
      • conversion_feestring

        The whole conversion fee of this row, in fee_currency (v2 rows)

        Example 10.00
      • fee_currencystring

        Currency of the row's fees and total_debited: the wallet that is debited

        Example USD
      • total_debitedstring

        What this row debits from the wallet; the rows' total_debited add up to the batch's

        Example 1015.00
      • recipient_gets_is_exactboolean

        False when expected_received is an estimate (v2 rows)

      • expected_receivedstring

        What this row's recipient is expected to get, in the row's target currency (v2 rows)

        Example 985.00
      • ratestring

        Locked conversion rate; absent without a conversion

        Example 3.6725
      • price_locked_atstring

        When the row's price and rate were locked (RFC 3339 UTC; v2 rows)

        Example 2026-11-02T12:00:00.000Z
      • price_refstring

        Opaque reference of the price that was applied (v2 rows)

        Example pr_9c1f0a47b2d83e55
    • created_atstring
    • total_feesstring

      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_debitedstring

      What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes

      Example 3045.00
    • fee_currencystring

      Currency of total_fees and total_debited; absent when the rows do not share a wallet currency

      Example USD
422Not a valid template, or too many rows

application/json

Schema Error

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 422
{
  "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"
  }
}
Request
curl -X POST https://stage.ekash.ai/dev/v1/batches \
  -H "Authorization: Bearer $EKASH_API_KEY" \
  -F "file=@payouts.xlsx"
Response · 201
{
  "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

  • dataBatch
    10 child attributes
    • idstring

      Batch id — use it for GET/submit/approve/reject/delete

    • railstring
      One of bank email
    • statusstring

      Batch lifecycle state

      One of draft submitted approved rejected
    • row_countinteger
    • validationBatchValidation
      3 child attributes
      • completeboolean

        False while any row is still being verified — keep polling GET /v1/batches/{id}

      • validating_countinteger
      • error_countinteger

        Rows that cannot be submitted until they are fixed

    • rowsarray of BatchRow
      18 child attributes
      • rowinteger

        1-based row number in the uploaded sheet (excluding the header)

        Example 3
      • payment_idstring
      • 5 child attributes
        • namestring
        • emailstring
        • platformstring

          Wallet rail for an email payout

          One of wise wallet payoneer wallet paypal wallet e-kash wallet
        • country_codestring
        • masked_accountstring

          Masked account number / IBAN — ekash never returns a full account identifier

      • amountstring
      • currencystring
      • statusstring
        One of ready_to_process processing sent received refunded canceled unclaimed on_hold
      • 2 child attributes
        • statusstring
          One of validating valid invalid unverified
        • messagestring

          The backend's own explanation, shown verbatim in the apps

      • errorsmap of string

        Field -> problem. A row with errors blocks the whole batch from being submitted.

      • sender_feestring

        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_feestring

        The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)

        Example 15.00
      • conversion_feestring

        The whole conversion fee of this row, in fee_currency (v2 rows)

        Example 10.00
      • fee_currencystring

        Currency of the row's fees and total_debited: the wallet that is debited

        Example USD
      • total_debitedstring

        What this row debits from the wallet; the rows' total_debited add up to the batch's

        Example 1015.00
      • recipient_gets_is_exactboolean

        False when expected_received is an estimate (v2 rows)

      • expected_receivedstring

        What this row's recipient is expected to get, in the row's target currency (v2 rows)

        Example 985.00
      • ratestring

        Locked conversion rate; absent without a conversion

        Example 3.6725
      • price_locked_atstring

        When the row's price and rate were locked (RFC 3339 UTC; v2 rows)

        Example 2026-11-02T12:00:00.000Z
      • price_refstring

        Opaque reference of the price that was applied (v2 rows)

        Example pr_9c1f0a47b2d83e55
    • created_atstring
    • total_feesstring

      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_debitedstring

      What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes

      Example 3045.00
    • fee_currencystring

      Currency of total_fees and total_debited; absent when the rows do not share a wallet currency

      Example USD
Request
curl https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41 \
  -H "Authorization: Bearer $EKASH_API_KEY"
Response · 200
{
  "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

  • dataBatch
    10 child attributes
    • idstring

      Batch id — use it for GET/submit/approve/reject/delete

    • railstring
      One of bank email
    • statusstring

      Batch lifecycle state

      One of draft submitted approved rejected
    • row_countinteger
    • validationBatchValidation
      3 child attributes
      • completeboolean

        False while any row is still being verified — keep polling GET /v1/batches/{id}

      • validating_countinteger
      • error_countinteger

        Rows that cannot be submitted until they are fixed

    • rowsarray of BatchRow
      18 child attributes
      • rowinteger

        1-based row number in the uploaded sheet (excluding the header)

        Example 3
      • payment_idstring
      • 5 child attributes
        • namestring
        • emailstring
        • platformstring

          Wallet rail for an email payout

          One of wise wallet payoneer wallet paypal wallet e-kash wallet
        • country_codestring
        • masked_accountstring

          Masked account number / IBAN — ekash never returns a full account identifier

      • amountstring
      • currencystring
      • statusstring
        One of ready_to_process processing sent received refunded canceled unclaimed on_hold
      • 2 child attributes
        • statusstring
          One of validating valid invalid unverified
        • messagestring

          The backend's own explanation, shown verbatim in the apps

      • errorsmap of string

        Field -> problem. A row with errors blocks the whole batch from being submitted.

      • sender_feestring

        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_feestring

        The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)

        Example 15.00
      • conversion_feestring

        The whole conversion fee of this row, in fee_currency (v2 rows)

        Example 10.00
      • fee_currencystring

        Currency of the row's fees and total_debited: the wallet that is debited

        Example USD
      • total_debitedstring

        What this row debits from the wallet; the rows' total_debited add up to the batch's

        Example 1015.00
      • recipient_gets_is_exactboolean

        False when expected_received is an estimate (v2 rows)

      • expected_receivedstring

        What this row's recipient is expected to get, in the row's target currency (v2 rows)

        Example 985.00
      • ratestring

        Locked conversion rate; absent without a conversion

        Example 3.6725
      • price_locked_atstring

        When the row's price and rate were locked (RFC 3339 UTC; v2 rows)

        Example 2026-11-02T12:00:00.000Z
      • price_refstring

        Opaque reference of the price that was applied (v2 rows)

        Example pr_9c1f0a47b2d83e55
    • created_atstring
    • total_feesstring

      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_debitedstring

      What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes

      Example 3045.00
    • fee_currencystring

      Currency of total_fees and total_debited; absent when the rows do not share a wallet currency

      Example USD
409Recipient validation still running, or the batch was already submitted, approved or rejected

application/json

Schema Error

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 409
{
  "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

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 422
{
  "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"
  }
}
Request
curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/submit \
  -H "Authorization: Bearer $EKASH_API_KEY"
Response · 200
{
  "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_changebooleanoptional

    Set to true to accept the new price after a 409 price_changed.

  • expected_debitstringoptional

    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.

  • expected_debitsstringoptional

    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.

Responses

200Approved

application/json

Schema BatchResponse

  • dataBatch
    10 child attributes
    • idstring

      Batch id — use it for GET/submit/approve/reject/delete

    • railstring
      One of bank email
    • statusstring

      Batch lifecycle state

      One of draft submitted approved rejected
    • row_countinteger
    • validationBatchValidation
      3 child attributes
      • completeboolean

        False while any row is still being verified — keep polling GET /v1/batches/{id}

      • validating_countinteger
      • error_countinteger

        Rows that cannot be submitted until they are fixed

    • rowsarray of BatchRow
      18 child attributes
      • rowinteger

        1-based row number in the uploaded sheet (excluding the header)

        Example 3
      • payment_idstring
      • 5 child attributes
        • namestring
        • emailstring
        • platformstring

          Wallet rail for an email payout

          One of wise wallet payoneer wallet paypal wallet e-kash wallet
        • country_codestring
        • masked_accountstring

          Masked account number / IBAN — ekash never returns a full account identifier

      • amountstring
      • currencystring
      • statusstring
        One of ready_to_process processing sent received refunded canceled unclaimed on_hold
      • 2 child attributes
        • statusstring
          One of validating valid invalid unverified
        • messagestring

          The backend's own explanation, shown verbatim in the apps

      • errorsmap of string

        Field -> problem. A row with errors blocks the whole batch from being submitted.

      • sender_feestring

        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_feestring

        The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)

        Example 15.00
      • conversion_feestring

        The whole conversion fee of this row, in fee_currency (v2 rows)

        Example 10.00
      • fee_currencystring

        Currency of the row's fees and total_debited: the wallet that is debited

        Example USD
      • total_debitedstring

        What this row debits from the wallet; the rows' total_debited add up to the batch's

        Example 1015.00
      • recipient_gets_is_exactboolean

        False when expected_received is an estimate (v2 rows)

      • expected_receivedstring

        What this row's recipient is expected to get, in the row's target currency (v2 rows)

        Example 985.00
      • ratestring

        Locked conversion rate; absent without a conversion

        Example 3.6725
      • price_locked_atstring

        When the row's price and rate were locked (RFC 3339 UTC; v2 rows)

        Example 2026-11-02T12:00:00.000Z
      • price_refstring

        Opaque reference of the price that was applied (v2 rows)

        Example pr_9c1f0a47b2d83e55
    • created_atstring
    • total_feesstring

      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_debitedstring

      What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes

      Example 3045.00
    • fee_currencystring

      Currency of total_fees and total_debited; absent when the rows do not share a wallet currency

      Example USD
409`invalid_state` (already approved or rejected) or `price_changed` (the batch price moved; nothing was approved)

application/json

Schema Error

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 409
{
  "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"
  }
}
Request
curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/approve \
  -H "Authorization: Bearer $EKASH_API_KEY"
Response · 200
{
  "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

  • dataBatch
    10 child attributes
    • idstring

      Batch id — use it for GET/submit/approve/reject/delete

    • railstring
      One of bank email
    • statusstring

      Batch lifecycle state

      One of draft submitted approved rejected
    • row_countinteger
    • validationBatchValidation
      3 child attributes
      • completeboolean

        False while any row is still being verified — keep polling GET /v1/batches/{id}

      • validating_countinteger
      • error_countinteger

        Rows that cannot be submitted until they are fixed

    • rowsarray of BatchRow
      18 child attributes
      • rowinteger

        1-based row number in the uploaded sheet (excluding the header)

        Example 3
      • payment_idstring
      • 5 child attributes
        • namestring
        • emailstring
        • platformstring

          Wallet rail for an email payout

          One of wise wallet payoneer wallet paypal wallet e-kash wallet
        • country_codestring
        • masked_accountstring

          Masked account number / IBAN — ekash never returns a full account identifier

      • amountstring
      • currencystring
      • statusstring
        One of ready_to_process processing sent received refunded canceled unclaimed on_hold
      • 2 child attributes
        • statusstring
          One of validating valid invalid unverified
        • messagestring

          The backend's own explanation, shown verbatim in the apps

      • errorsmap of string

        Field -> problem. A row with errors blocks the whole batch from being submitted.

      • sender_feestring

        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_feestring

        The part of the ekash fee taken off what this row's recipient receives, in fee_currency (v2 rows)

        Example 15.00
      • conversion_feestring

        The whole conversion fee of this row, in fee_currency (v2 rows)

        Example 10.00
      • fee_currencystring

        Currency of the row's fees and total_debited: the wallet that is debited

        Example USD
      • total_debitedstring

        What this row debits from the wallet; the rows' total_debited add up to the batch's

        Example 1015.00
      • recipient_gets_is_exactboolean

        False when expected_received is an estimate (v2 rows)

      • expected_receivedstring

        What this row's recipient is expected to get, in the row's target currency (v2 rows)

        Example 985.00
      • ratestring

        Locked conversion rate; absent without a conversion

        Example 3.6725
      • price_locked_atstring

        When the row's price and rate were locked (RFC 3339 UTC; v2 rows)

        Example 2026-11-02T12:00:00.000Z
      • price_refstring

        Opaque reference of the price that was applied (v2 rows)

        Example pr_9c1f0a47b2d83e55
    • created_atstring
    • total_feesstring

      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_debitedstring

      What the whole batch debits from the wallet: the sum of the rows' total_debited, i.e. what approval takes

      Example 3045.00
    • fee_currencystring

      Currency of total_fees and total_debited; absent when the rows do not share a wallet currency

      Example USD
409Already approved or rejected

application/json

Schema Error

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 409
{
  "error": {
    "type": "conflict",
    "code": "invalid_state",
    "message": "Already approved or rejected.",
    "request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
  }
}
Request
curl -X POST https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41/reject \
  -H "Authorization: Bearer $EKASH_API_KEY"
Response · 200
{
  "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

  • 5 child attributes
    • typestring

      Coarse error family

      One of authentication permission invalid_request validation not_found conflict rate_limited server
    • codestring

      Stable machine-readable code — branch on this, not on the message

      Example validation_failed
    • messagestring

      Human-readable explanation, safe to log

      Example Please correct the highlighted fields.
    • fieldsmap of string

      Per-field errors, present for validation failures

    • request_idstring

      Echo of the X-Request-Id header — quote it in a support request

Example · 409
{
  "error": {
    "type": "conflict",
    "code": "invalid_state",
    "message": "Already submitted or approved.",
    "request_id": "6f0c1e1a-2b7d-4c55-9f0e-3a1d2c4b5e6f"
  }
}
Request
curl -X DELETE https://stage.ekash.ai/dev/v1/batches/b2d6c1f0-5e1a-4c3e-9f1d-0c8a7e6b5a41 \
  -H "Authorization: Bearer $EKASH_API_KEY"
Response · 204
HTTP/1.1 204 No Content