If you’re looking for a no code implementation, head over to Payment Links.
How to integrate Sprintcheckout payments API
On this guide you can learn how to create a payment session and get notification on to your backend via webhooks. Below you can see a typical integration flow between an ecommerce and a payment gateway.
A. Create payment session and receive a redirect url
Go to create a payment session for full API reference.Example request
cURL
Example response
You will receive a json like this:B. Get payment updates via webhook
Received automatically when a payment status changes.1. Endpoint Setup
On the Notifications section, you can set up the endpoint to receive the order confirmation. Set your webhook URL in the Notifications section.
2. Security
Requests include the headerX-Webhook-Api-Key (or the key shown on your dashboard).
You should verify this matches your secret key to ensure the request is genuine.
3. Payload Format
The payment notification message will be a JSONPOST request with this format:
4. Status Values
Possible values forstatus include:
PENDING: Payment initiated but not yet settled.SUCCESS: Payment successfully settled.FAILED: Payment failed or was rejected.EXPIRED: The session time limit was reached.
5. Retry Policy & Idempotency
- Retries: If your server does not return a
200 OKstatus, we will retry the notification multiple times (exponential backoff). - Idempotency: Webhooks may be delivered more than once. Use the
paymentSessionIdororderIdto ensure you process each Event only once.
Dashboard Orders
On the Dashboard > Notifications section you can also find a table where you will find every order you receive via API.