Your agent runs discovery, Airwallex takes the payment
Keep discovery and checkout with your existing agent. Airwallex collects the card and takes the payment.
To take payment when your existing AI agent already owns the shopper journey up to the moment of paying, create a PaymentIntent from your own price, pass its id and client secret to the agent, and fulfill only when the PaymentIntent Webhook arrives.
Choose this path when you want Airwallex only to collect the card and take the money. You keep your product data and your checkout logic. Airwallex is not in the discovery path.
Before you begin
- Agentic commerce enabled on your account. See Enable Airwallex Agentic Commerce Suite. You do not need a product feed or a create checkout API.
- A server that can create a PaymentIntent.
- A chat provider or agent vendor that can open the Airwallex payment form and confirm a PaymentIntent.
- A Webhook endpoint for PaymentIntent events. See Payment webhooks.
Who does what
| Player | What they do |
|---|---|
| You | Create the PaymentIntent with the amount from your systems, hand its id and client secret to the agent, and fulfill on the Webhook. If you confirm from your server, you also send the confirm call. |
| Your chat provider or agent vendor | Runs discovery and checkout in its own interface, opens the Airwallex payment form, and receives the agentic token. Either confirms the PaymentIntent, or sends the token to your server so you can confirm it. |
| Airwallex | Renders the card form inside the chat, turns the card into a single-use agentic token, and processes the payment. |
How the purchase runs
These steps are the same whichever way you confirm.
- The shopper builds a basket inside the agent's own interface, against your systems.
- You create a PaymentIntent for the order, with the amount taken from your own systems, never from the agent. Set
merchant_order_idto your order id. - Airwallex returns the PaymentIntent ID and client secret to you.
- You pass the id and client secret to the agent. The client secret works only for this PaymentIntent, so it can go to the agent that opens the payment form. Never send your API key.
- The agent opens the Airwallex payment form, using the id and client secret. The shopper enters their card into the Airwallex form, not into the agent's form or yours.
- Airwallex turns the card into a single-use agentic token and returns it to the agent. The card number never reaches the agent.
- Confirm the PaymentIntent. Use Confirm from the assistant or Confirm from your server.
- Airwallex sends you the PaymentIntent Webhook. This is the only signal that money moved. Fulfill the order on it, not on the agent's confirmation screen. See Sample payload.

Create the PaymentIntent
Create a PaymentIntent for the order, and take the amount from your own systems rather than from anything the agent reports.
An agent never sets the price. The agent assembled the basket and usually describes it accurately, but the figure the shopper is charged has to come from a party you trust. On this path, that party is you. Price the basket yourself, create the intent for that amount, and nothing the agent does afterward can change what the shopper pays.
Set amount in the units the PaymentIntents API expects (major units). See PaymentIntents. The create request is the same as Create the PaymentIntent.
Hand over the id and client secret
Pass the PaymentIntent ID and its client_secret to the agent. The client secret works only for this PaymentIntent, so it can go to the agent that opens the payment form. It authorizes payment for that order only. Never send your API key.
There is no session token to mint and no OAuth flow to run on this path. Those mechanisms exist to establish who a shopper is before anything has been created. Here the PaymentIntent already exists and already carries the amount.
Let Airwallex collect the card
You build nothing in this step. When the agent opens the payment form, Airwallex renders that form inside the chat window. The shopper types their card into the Airwallex form. Airwallex tokenizes it inside its own compliance boundary and hands back a single-use agentic token. The card number never reaches the agent's systems or yours, which keeps this path out of your PCI scope.
Confirm the PaymentIntent
Confirm in one of the two ways below. The token only works against the intent it was created for. If the merchant, the amount, the session, or the validity window does not match, the confirmation fails and nothing is charged. It never falls back to an ordinary charge. A token that has been tampered with, replayed, or pointed at a different order does not work.
The order id is the PaymentIntent's merchant_order_id, which you set when you created the PaymentIntent. Set agentic_payment_data.checkout_session_id to that same id. checkout_session_id is required whenever an agentic token is used. The confirm call is the same as on your own storefront.
Confirm from the assistant
The agent confirms the PaymentIntent with the client secret and the agentic token. You do not call confirm. Fulfill when the PaymentIntent Webhook arrives. The request body is the same as Confirm from the assistant.
Confirm from your server
The agent sends the agentic token and the PaymentIntent ID to an endpoint you host. You define that endpoint. Your server checks that the order still matches the PaymentIntent, then confirms with your API key. The API key stays on your server. Return the result to the agent so it can tell the shopper. Fulfill on the Webhook, not on the confirm response. The confirm call is the same as Confirm from your server.
Handle the PaymentIntent Webhook
This is the same Webhook as any other path, and it is the only place where Airwallex tells you that money moved. Treat its arrival as the instruction to fulfill. Do not fulfill on the agent's confirmation screen. The agent is reporting what it believes happened, not what settled.
Make the handler idempotent. A Webhook can be delivered more than once, and you do not want to ship the same order twice. Run a job that checks PaymentIntent status for any payment where you expected a Webhook and did not receive one.
This path does not call create checkout, so there is no checkout id to join. The event you listen for is the same. See Sample payload. Verify the Webhook as with any Airwallex Webhook. See Check webhook signatures and Payment webhooks.
Authentication on this path
The client secret is the credential, and it is scoped to a single PaymentIntent. There is no session token and no OAuth, because the PaymentIntent exists before anything is called.
What you do not build
In the payment-only integration, you do not need to provide a product feed, integrate the Create a checkout API, or build an agent-protocol integration. Discovery and checkout stay in the agent's interface.
Before you go live
- Your PaymentIntent amounts come from your systems, never from the agent.
merchant_order_idis the order id you set when you created the PaymentIntent.- The client secret reaches the agent that opens the payment form. Your API key stays on your server.
- Your Webhook handler is idempotent.
- A reconciliation job covers payments where no Webhook arrived.
If the agent confirms:
checkout_session_idis the PaymentIntent'smerchant_order_id.- You do not call confirm.
- You and your provider have agreed what happens when a confirmation fails.
If your server confirms:
checkout_session_idis the PaymentIntent'smerchant_order_id.- The agent sends the agentic token to an endpoint you host.
- Your server confirms with your API key.
- You fulfill on the Webhook, not on the confirm response.
- You and your provider have agreed what happens when a confirmation fails.