- Create a payment intent on your backend.
- Return
client_secretto your frontend. - Open KryptoPay checkout with the SDK.
- Handle success and backend fulfillment.
Before you start
- API base URL:
https://api.kryptopay.xyz - Keep API keys server-side only
- Frontend should only receive
client_secret
Step 1: Create intent on your backend
Use your API key from server code. Do not call this endpoint directly from browser code.cURL
Node.js (Express)
Next.js route handler
Python (coming soon)
Python examples and server SDK helpers are planned. The HTTP flow is the same: callPOST /v1/payment_intents server-side, then return client_secret to the client.
Step 2: Open checkout in frontend
Step 3: Fulfillment model
Treat frontend callbacks as user UX signals. For fulfillment and accounting, use backend systems and your event pipeline so duplicate callbacks or page refreshes do not create duplicate business actions.Common mistakes
- Calling
POST /v1/payment_intentsfrom frontend code - Exposing API key in JavaScript bundles
- Treating frontend success callback as final source of truth
- Forgetting to persist
order_idor internal reference inmetadata