DevelopersHomeAPI referenceGuidesChangelogMarketplacePartnersCommunityStatus

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/payments
List payments, newest first.
Query
limitat most 200
statusfilter by status
POST /v1/payments
Open a payment. With no order_id, an order for the amount is made.
Body
amount_paiseinteger: required without order_id; on an order, 0 means what is still owed
customer_phonestring: E.164 or 10 digits
descriptionstring
expires_in_secondsinteger
instrument_idstring: a saved instrument of this customer
metadataobject: your own reference, at most 20 keys, echoed on payment and refund webhooks; no personal data
methodstring*: upi_intent, upi_qr, link, card, netbanking or wallet
order_idstring: an existing order
return_urlstring: 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}/refresh
Ask the gateway for the payment's state now.
POST /v1/payments/{id}/refunds
Refund all or part of a captured payment.
Body
amount_paiseinteger*
reasonstring
POST /v1/payments/{id}/retry
Start the next attempt with another method, within the chain's budget.
Body
instrument_idstring
methodstring

Orders

GET /v1/orders
List orders.
POST /v1/orders
Create an order with its lines.
GET /v1/orders/{id}
Read an order.
POST /v1/orders/{id}/cancel
Cancel an order.
Body
reasonstring
POST /v1/orders/{id}/refund
Refund an order's payment.

Authorisations

POST /v1/authorisations
Hold an amount without taking it.
GET /v1/authorisations/{id}
Read a hold.
POST /v1/authorisations/{id}/capture
Take all or part of a hold.
Body
amount_paiseinteger
POST /v1/authorisations/{id}/void
Release a hold.

Mandates

GET /v1/mandates
List mandates.
Query
customer_phonefilter
limitat most 200
POST /v1/mandates
Ask a customer for a recurring debit mandate.
GET /v1/mandates/{id}
Read a mandate.
POST /v1/mandates/{id}/debits
Schedule a debit with at least 24 hours' notice.
POST /v1/mandates/{id}/refresh
Ask the gateway for the mandate's state now.
POST /v1/mandates/{id}/revoke
Revoke a mandate.

Webhooks

GET /v1/webhook_endpoints
List endpoints.
POST /v1/webhook_endpoints
Register an endpoint. The signing secret is in this response only.
Body
eventsarray: event types, empty for all
urlstring*
DELETE /v1/webhook_endpoints/{id}
Remove an endpoint.
POST /v1/webhook_endpoints/{id}/rotate_secret
Replace the signing secret.
POST /v1/webhook_endpoints/{id}/test
Send one signed test event now and report the answer.
GET /v1/webhook_events
The event explorer: this environment's events, newest first.
Query
before_idcursor
limitat most 200
qpayload search
typeevent type
GET /v1/webhook_events/{id}
Read one event.
GET /v1/webhook_events/{id}/deliveries
Every delivery attempt of an event.
POST /v1/webhook_events/{id}/replay
Send an event again.
Body
endpoint_idstring

API keys

GET /v1/api_keys
List keys by prefix. The secret is shown only at creation.
POST /v1/api_keys
Create a key in an environment.
Body
environmentstring*: live or test
labelstring
DELETE /v1/api_keys/{id}
Revoke a key now.
POST /v1/api_keys/{id}/rotate
Replace a key, the old one working through a grace of up to a week.
Body
grace_secondsinteger

Metadata

GET /v1/deprecations
Routes being retired, with at least twelve months' notice.
GET /v1/payment_methods
The methods, banks, wallets and EMI tenures live for an amount right now.
Query
amount_paisethe amount

Routing

GET /v1/routing/analytics
Success, cost and time to outcome by gateway, method, issuer and hour.
Query
daysat most 90
GET /v1/routing/decisions
The decisions report, or one payment's decisions.
Query
payment_idone payment
GET /v1/routing/rules
The active rule set, its versions and trail.
POST /v1/routing/rules
Save a draft rule set.
Body
notestring
rulesarray*
POST /v1/routing/rules/rollback
Go back to an earlier version, as a new active copy.
Body
versioninteger*
POST /v1/routing/rules/simulate
Replay a candidate set over recent decisions.
Body
daysinteger: at most 30
rulesarray*
POST /v1/routing/rules/{id}/activate
Activate a draft now or at a time.
Body
activate_atstring: RFC 3339, omit for now

Exports

GET /v1/exports/{report}
A report as a file: payments, routing or settlements.
Query
formatcsv or xlsx
fromYYYY-MM-DD
toYYYY-MM-DD

Integration

POST /v1/assistant/docs
Ask the docs assistant; it answers from the guides and this reference and cites them. Answers 202 with the run's id.
Body
questionstring*: 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/check
Validate gateways, webhooks, the test key and a test payment. Changes nothing.

Sandbox

POST /v1/sandbox/authorisations/{id}/approve
Approve a test hold.
POST /v1/sandbox/debits/{id}/execute
Run a test debit now.
POST /v1/sandbox/gateway
Take the test gateway down or bring it back.
POST /v1/sandbox/mandates/{id}/approve
Approve a test mandate.
POST /v1/sandbox/payments/{id}/settle
End a test payment as a named scenario.
Body
scenariostring*
GET /v1/sandbox/scenarios
The outcomes a test payment can be given.
POST /v1/sandbox/shipments/{id}/advance
Move a test parcel a step along its path.
POST /v1/sandbox/webhook_endpoints/{id}/delay
Hold an endpoint's deliveries back.
Body
secondsinteger*