How it works
Before you start
- A Stripe account where Stripe offers SPT to sellers. Check availability and terms in the Stripe SPT documentation.
- A Stripe profile created in the Stripe Dashboard.
- An order API or MCP tool that Clink can call to create an order on behalf of the user.
1. Share your Stripe Profile ID
Send Clink your Stripe Profile ID (profile_xxx) for both the sandbox and live environments. Clink uses it to request SPTs that are granted to your Stripe account only.
2. Return the final amount and currency
Clink requests each SPT with a limit equal to the order’s final payable amount. When Clink creates an order, return:- The order ID
- The final payable amount, including fees and discounts
- The ISO 4217 currency code, such as
USD
3. Provide an endpoint that receives the SPT
Expose an HTTPS endpoint that Clink calls after it obtains the SPT. If Clink already reaches your platform through MCP, you can provide an MCP tool instead. The request and response below are a reference. The path, field names, and authentication method are confirmed with Clink during integration.Example request
The request carries no amount. Always take the amount and currency from your own order record.
Example response
4. Charge the SPT
Confirm that the order exists and is unpaid, read the amount and currency from your order record, and create and confirm a StripePaymentIntent:
- Stripe takes the amount in the currency’s smallest unit and the currency code in lowercase:
17.41 USDbecomesamount=1741andcurrency=usd. - No user is present to follow a redirect. If Stripe asks for a
return_urlwhen you confirm, addautomatic_payment_methods[enabled]=trueandautomatic_payment_methods[allow_redirects]=never. - Writing the order ID to
metadatalets you match the Stripe payment to your order during reconciliation and in webhooks. - SPT is a Stripe preview feature. Use the
Stripe-Versionand parameters in the current Stripe SPT documentation.
Map the result
No user is present to complete an extra authentication step, so treat
requires_action as a failure. Cancel a PaymentIntent you report as FAILED if it is still open, so that it cannot complete afterwards.
Stripe can return processing directly, which means the payment has no final result yet. Return PROCESSING in that case, not FAILED.
5. Settle payments that are processing
When you returnPROCESSING, Clink queries the payment status until it is final. You need to:
- Bring the order to its final state. Listen for the Stripe webhooks
payment_intent.succeededandpayment_intent.payment_failed, or retrieve the PaymentIntent from Stripe when Clink queries the status. - Provide a payment status query that takes the order ID and returns the current payment status. An existing order or payment status query can serve this purpose.
Refunds and reconciliation
Once the PaymentIntent is confirmed, Stripe treats it like any other payment on your account. Refund and reconcile it through your existing Stripe process.Test in the sandbox
Stripe provides a test helper that grants your sandbox account an SPT, so you can test the endpoint before joint testing with Clink:spt_xxx and confirm that:
- A valid request charges the order once and returns
SUCCEEDEDwith the amount and currency. - A request for an order that is already paid does not charge twice.
- An unknown order returns
FAILED. - An order amount above
max_amount, or an expired token, returnsFAILEDwith Stripe’s error code.
Before going live
- Clink has your live Stripe Profile ID.
- The endpoint uses your live Stripe secret key, kept on the server.
- The amount and currency come from your order record.
- Payments returned as
PROCESSINGreach a final state, and Stripe webhook signatures are verified.