Skip to content
API reference

Create payment

Create a payment and receive the payment instructions or redirect URL supported by the selected method.

POST/api/v1/payments
Step-by-step guideStep 1 of 3

Select a stage to see what happens.

Your integration
Request readyIllustrative example
POST/payments
amount
50.00 USD
paymentMethod
Available for your shop

Create the payment

Your backend sends the amount and a method available for your shop. Keep the returned transactionId.

Illustrative flow · no data is sent

How this endpoint works

Starts a server-to-server charge. The shop is identified via the Bearer token (POST /api/v1/auth/token). Pass `paymentMethodId` with the 4-digit id returned by GET /api/v1/payment-methods. Each retailer / bank / native method has its own unique id (e.g. 1001 → SPEI, 1002 → OXXO, 1003 → Walmart, 1004 → 7-Eleven, 1005 → BBVA, 1006 → Scotiabank) and the cascade routes exactly to that upstream. The same `paymentMethodId` comes back in the response and is queryable via GET /api/v1/payments. The response includes `paymentFormUrl` (the upstream provider's URL — you redirect to or embed it). If you prefer our hosted UI, use POST /api/v1/checkout/sessions which returns its own `checkoutUrl`. The settlement crypto, the destination wallet, and the KYC level are derived internally from the merchant's config — they are not sent in the body. Note: the legacy path `POST /api/v1/transactions` works exactly the same; use whichever you prefer.

Server-side authenticationIdempotency-Key
Display payment instructions
Key2Pay Developer documentationAPI v1
Documentation
Dashboard