Skip to main content
A Stripe Shared Payment Token (SPT) lets an Agent using Clink Agent Pay pay for an order on your platform without sending the user to a checkout page. Clink obtains an SPT that only your Stripe account can use, limited to the order amount, and sends it to an endpoint you provide. Your server charges it on your own Stripe account.

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
If you charge more than the amount you returned, Stripe rejects the payment.

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

Accept this request only from Clink, and handle the SPT on your server only. Do not write the full token to logs.

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 Stripe PaymentIntent:
  • Stripe takes the amount in the currency’s smallest unit and the currency code in lowercase: 17.41 USD becomes amount=1741 and currency=usd.
  • No user is present to follow a redirect. If Stripe asks for a return_url when you confirm, add automatic_payment_methods[enabled]=true and automatic_payment_methods[allow_redirects]=never.
  • Writing the order ID to metadata lets you match the Stripe payment to your order during reconciliation and in webhooks.
  • SPT is a Stripe preview feature. Use the Stripe-Version and 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 return PROCESSING, 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.succeeded and payment_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:
Use your Stripe sandbox secret key, then call your endpoint with the returned spt_xxx and confirm that:
  • A valid request charges the order once and returns SUCCEEDED with 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, returns FAILED with 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 PROCESSING reach a final state, and Stripe webhook signatures are verified.