API reference
Generated from the server's routes. Download the OpenAPI document. Send the key as Authorization: Bearer sk_test_..., and an Idempotency-Key on a POST.
Payments
GET
/v1/paymentsList payments, newest first.
limit | at most 200 |
status | filter by status |
POST
/v1/paymentsOpen a payment. With no order_id, an order for the amount is made.
amount_paise | integer: required without order_id; on an order, 0 means what is still owed |
customer_phone | string: E.164 or 10 digits |
description | string |
expires_in_seconds | integer |
instrument_id | string: a saved instrument of this customer |
metadata | object: your own reference, at most 20 keys, echoed on payment and refund webhooks; no personal data |
method | string*: upi_intent, upi_qr, link, card, netbanking or wallet |
order_id | string: an existing order |
return_url | string: where the customer goes afterwards, http or https, kept for retries and offered on the pay page |
GET
/v1/payments/links/{code}Read your own payment by the code in its short link (/p/{code}). Another seller's code is not found.
GET
/v1/payments/{id}Read a payment with its attempts and routing decisions.
POST
/v1/payments/{id}/refreshAsk the gateway for the payment's state now.
POST
/v1/payments/{id}/refundsRefund all or part of a captured payment.
amount_paise | integer* |
reason | string |
POST
/v1/payments/{id}/retryStart the next attempt with another method, within the chain's budget.
instrument_id | string |
method | string |
Orders
GET
/v1/ordersList orders.
POST
/v1/ordersCreate an order with its lines.
GET
/v1/orders/{id}Read an order.
POST
/v1/orders/{id}/cancelCancel an order.
reason | string |
POST
/v1/orders/{id}/refundRefund an order's payment.
Authorisations
POST
/v1/authorisationsHold an amount without taking it.
GET
/v1/authorisations/{id}Read a hold.
POST
/v1/authorisations/{id}/captureTake all or part of a hold.
amount_paise | integer |
POST
/v1/authorisations/{id}/voidRelease a hold.
Mandates
GET
/v1/mandatesList mandates.
customer_phone | filter |
limit | at most 200 |
POST
/v1/mandatesAsk a customer for a recurring debit mandate.
GET
/v1/mandates/{id}Read a mandate.
POST
/v1/mandates/{id}/debitsSchedule a debit with at least 24 hours' notice.
POST
/v1/mandates/{id}/refreshAsk the gateway for the mandate's state now.
POST
/v1/mandates/{id}/revokeRevoke a mandate.
Webhooks
GET
/v1/webhook_endpointsList endpoints.
POST
/v1/webhook_endpointsRegister an endpoint. The signing secret is in this response only.
events | array: event types, empty for all |
url | string* |
DELETE
/v1/webhook_endpoints/{id}Remove an endpoint.
POST
/v1/webhook_endpoints/{id}/rotate_secretReplace the signing secret.
POST
/v1/webhook_endpoints/{id}/testSend one signed test event now and report the answer.
GET
/v1/webhook_eventsThe event explorer: this environment's events, newest first.
before_id | cursor |
limit | at most 200 |
q | payload search |
type | event type |
GET
/v1/webhook_events/{id}Read one event.
GET
/v1/webhook_events/{id}/deliveriesEvery delivery attempt of an event.
POST
/v1/webhook_events/{id}/replaySend an event again.
endpoint_id | string |
API keys
GET
/v1/api_keysList keys by prefix. The secret is shown only at creation.
POST
/v1/api_keysCreate a key in an environment.
environment | string*: live or test |
label | string |
DELETE
/v1/api_keys/{id}Revoke a key now.
POST
/v1/api_keys/{id}/rotateReplace a key, the old one working through a grace of up to a week.
grace_seconds | integer |
Metadata
GET
/v1/deprecationsRoutes being retired, with at least twelve months' notice.
GET
/v1/payment_methodsThe methods, banks, wallets and EMI tenures live for an amount right now.
amount_paise | the amount |
Routing
GET
/v1/routing/analyticsSuccess, cost and time to outcome by gateway, method, issuer and hour.
days | at most 90 |
GET
/v1/routing/decisionsThe decisions report, or one payment's decisions.
payment_id | one payment |
GET
/v1/routing/rulesThe active rule set, its versions and trail.
POST
/v1/routing/rulesSave a draft rule set.
note | string |
rules | array* |
POST
/v1/routing/rules/rollbackGo back to an earlier version, as a new active copy.
version | integer* |
POST
/v1/routing/rules/simulateReplay a candidate set over recent decisions.
days | integer: at most 30 |
rules | array* |
POST
/v1/routing/rules/{id}/activateActivate a draft now or at a time.
activate_at | string: RFC 3339, omit for now |
Exports
GET
/v1/exports/{report}A report as a file: payments, routing or settlements.
format | csv or xlsx |
from | YYYY-MM-DD |
to | YYYY-MM-DD |
Integration
POST
/v1/assistant/docsAsk the docs assistant; it answers from the guides and this reference and cites them. Answers 202 with the run's id.
question | string*: 1 to 2000 characters |
GET
/v1/assistant/runs/{id}A run of the assistant: its status, answer and the searches it made.
GET
/v1/integration/checkValidate gateways, webhooks, the test key and a test payment. Changes nothing.
Sandbox
POST
/v1/sandbox/authorisations/{id}/approveApprove a test hold.
POST
/v1/sandbox/debits/{id}/executeRun a test debit now.
POST
/v1/sandbox/gatewayTake the test gateway down or bring it back.
POST
/v1/sandbox/mandates/{id}/approveApprove a test mandate.
POST
/v1/sandbox/payments/{id}/settleEnd a test payment as a named scenario.
scenario | string* |
GET
/v1/sandbox/scenariosThe outcomes a test payment can be given.
POST
/v1/sandbox/shipments/{id}/advanceMove a test parcel a step along its path.
POST
/v1/sandbox/webhook_endpoints/{id}/delayHold an endpoint's deliveries back.
seconds | integer* |