Skip to main content
Pay for a trip programmatically with a Shared Payment Token, no checkout page. After checkout returns the trip’s agent_spt_params and the agent has minted a token scoped to them, call this to schedule the agent fulfillment and authorize the charge server-side in one step.
Submit a Shared Payment Token (SPT) to schedule the agent fulfillment and authorize the booking server-side in one call. This is the agent-pay alternative to sending the user to a checkout page.

PREREQUISITE: call checkout first to get agent_spt_params, then mint an SPT scoped to those params.

USAGE:
  submit_agent_payment({ trip_id, shared_payment_token })

On success the booking proceeds to fulfillment ({ status, payment_verified: true }). If the issuer requires customer action (3DS) or declines, the response carries a checkout_url. Open it in a browser to complete payment manually.

Parameters

NameTypeRequiredDescription
trip_idstringYesTrip ID from the trip tool: the same trip you called checkout on.
shared_payment_tokenstringYesThe Shared Payment Token (spt_…) minted by the agent platform, scoped to the agent_spt_params returned by checkout.