In progress. Seamless Payment is being implemented on API version
2.0.0. The contract below may still be adjusted through the API. Contact your Paylead operations manager for more details.Roles
- Paylead owns the order, generates the
payment_id, initiates the payment when the purchase is confirmed, completes the order on success, and handles any refunds (partial or total). - You (the Program) receive the payment request on your endpoints, execute it with your payment method, return the result, and reconcile against your banking system.
Identifiers.
payment_id: a UUID generated by Paylead, matching the internal order (the generic term that covers both a WebApp purchase and a one-click API purchase). It is your idempotency key; echo it on every callback and, critically, in the wire reference (see Reconciliation).consumer_id: Paylead’s identifier for the user.account_id: the account external_id provided through the PM hub integration.
Two purchase modes, one payment contract
The delegated payment contract below is identical in both cases:- WebApp: the Consumer completes a purchase inside the Paylead WebApp opened from your app.
- API integration (coming): your app triggers a purchase through the Paylead API (one-click), without the WebApp.
Consumer experience (WebApp)
- The Consumer opens the WebApp from your app.
- The Consumer selects what to buy and an amount, then confirms.
- Paylead sends the payment request to your endpoint.
- You authorize or reject the payment, synchronously or asynchronously.
- On success, Paylead completes the order and redirects the Consumer to it.
- On failure, Paylead shows an error and lets the Consumer retry.
Authentication
Delegated payment flow
A two-step process, plus an optional status endpoint.Step 1: Payment authorization (required)
When the purchase is confirmed, Paylead sends aPOST to your authorization endpoint (URL configured per Program):
amount is in minor units (1000 = 10.00).
Respond with one of:
failure_reason values (on 400 and in Step 2 failures):
INSUFFICIENT_FUNDSPAYMENT_LIMIT_EXCEEDEDTECHNICAL_ISSUEUSER_NOT_FOUND
Step 2: Payment result callback (asynchronous only)
If Step 1 returned202, notify Paylead once validation completes. Paylead provides the callback base URL for your Program. payment_status is a path segment: success or failure.
Success, empty JSON body:
Idempotency. Paylead accepts one final result per
payment_id; later callbacks on an already-resolved payment are rejected, and the callback is validated against the owning consumer_id.Step 3: Status check (optional)
Expose an endpoint so Paylead can check a payment’s outcome, for incident recovery and audit (URL to be confirmed per Program):status is success, failure, or pending. failure_reason is null unless status is failure.
Refunds
An order may be refunded, partially or in full. Paylead handles refunds.Reconciliation
Paylead reconciles each order with the payin it receives.Error handling shown to the Consumer
On failure at Step 1 or Step 2, the WebApp shows:The payment could not be completed. No charge was made. You may try again with a different amount.
Sequence diagram
Your responsibilities
You must:- Authenticate Paylead’s requests, and your own callbacks to Paylead.
- Expose the Step 1 authorization endpoint; respond
201/400synchronously, or202then call Step 2. - Resolve every
202before the finalization window closes. - Include
payment_idin the wire reference of every funding transfer. - Return documented, uppercase
failure_reasonvalues.
- Approve or resolve the same
payment_idmore than once. - Leave asynchronous transactions unresolved.
What’s next
WebApp authentication
The SSO flow the Consumer goes through before reaching the purchase.
Manage Consumers
How you create Consumers and get the
consumer_id and account_id used in the payment request.