Payments API
Last updated: 2026-11-08
Payment operations use a secret key (sk_*). Use them for reconciliation after
creation, redirects, and webhook delivery.
Get a payment by ID
GET /merchant/api/v1/payment/{id}
Auth: Secret key
| Path parameter | Type | Presence |
|---|---|---|
id | string (UUID) | Required |
The response is the merchant-visible PaymentOrder, including any conditional details that apply to the selected flow.
This operation can return INVALID_ARGUMENT for a malformed ID and NOT_FOUND
when the payment is not available to the authenticated merchant.
Get a payment by merchant reference
GET /merchant/api/v1/payment/by-reference/{merchantReference}
Auth: Secret key
| Path parameter | Type | Presence |
|---|---|---|
merchantReference | string | Required |
The response is the current PaymentOrder
associated with the reference in the authenticated realm. A pay-in keeps its
reference after CANCELLED or EXPIRED; repeating creation does not bind that
reference to a replacement payment. A new intended payment needs a new reference.
Use this lookup after an initial generic error from create or initialization:
a recorded payment can exist even when that call returned no payment object.
If its status is PAYMENT_ORDER_STATUS_REJECTED, the same reference remains
bound to the same declined attempt; an equivalent repeat does not restart
execution. Use a new reference only for a deliberate new business attempt.
A timeout or an inconclusive lookup does not establish rejection; reconcile
the original attempt before replacing it.
Older histories can contain several payment IDs under one reference. Reference lookup returns the associated payment when it can identify one unambiguously; use each original payment ID to reconcile those older attempts, including verified late completion.
Keep references distinct across pay-ins and payouts. A reference is ambiguous when one current payment cannot be determined, for example when it identifies both directions or multiple older payments without a unique current attempt.
This operation can return INVALID_ARGUMENT for an empty or ambiguous reference
and NOT_FOUND when no matching payment exists.
Related guide: Payment lifecycle.