Preview This feature is for preview only and is subject to change. # Pay via AI Agent We are an approved payment partner for OpenAI's Instant Checkout. Integrate our APIs to enable ChatGPT Instant Checkout via the OpenAI "Agentic Commerce Protocol" (ACP). Refer to OpenAI's documentation here: Agentic Commerce ## Get started Prerequisite You must have an Access Worldpay `checkout ID` as well as API credentials. There are six steps to the flow: ### 1. Product discovery: Agent can find your products (Merchant -> OpenAI) You send a product feed to the Agent. See product feed specification for details. ### 2. Cart creation: Agent assembles cart based on customer intent (OpenAI -> Merchant) Agent creates a cart (`checkout session`) with your customer's items. See agentic checkout specification for details. You must return the Access Worldpay `checkout ID` in the `merchant_id` key:value. ### 3. Payment delegation: Agent creates delegate token (OpenAI -> Worldpay) The Agent creates a `delegate token` representing the payment using the [Delegate Tokens API](/products/delegate-tokens/). This encapsulates the payment instrument, and allowances such as the payment value and expiry specified by OpenAI. Delegate Tokens API Schema View the full schema with examples here Preview Note: the `merchant_id` is the same value as the Access Worldpay `checkout ID`. ```JSON Request example POST request /agentic_commerce/delegate_payment { "payment_method": { "type": "card", "card_number_type": "fpan", "number": "4242424242424242", "exp_month": "11", "exp_year": "2026", "name": "Jane Doe", "cvc": "223", "checks_performed": [ "avs", "cvv" ], "iin": "424242", "display_card_funding_type": "credit", "display_brand": "visa", "display_last4": "4242", "metadata": { "issuing_bank": "temp" } }, "allowance": { "reason": "one_time", "max_amount": 2000, "currency": "usd", "checkout_session_id": "csn_01HV3P3...", "merchant_id": "acme", "expires_at": "2025-10-09T07:20:50.52Z" }, "billing_address": { "name": "John Doe", "line_one": "123 Fake St.", "line_two": "Unit 1", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "12345" }, "risk_signals": [ { "type": "card_testing", "score": 10, "action": "manual_review" } ], "metadata": { "campaign": "q4" } } ``` ```JSON Response example { "id": "https://try.access.worldpay.com/sessions/eyJrIjoxLCJkIjoiMmlOVUFUMlNDSU5VbEpMcUd6cW8zV.....", "created": "2025-10-23T10:34:04.724644609Z", "metadata": { "idempotency_key": "an-idempotent-key", "source": "agent_checkout", "merchant_id": "550e8400-e29b-41d4-a716-446655440000" } } ``` ### 4. Checkout completion: Agent provides checkout session and delegate token to you (OpenAI -> Merchant) ```JSON Request example POST request to /checkout_sessions/checkout_session_123/complete { "buyer": { "first_name": "John", "last_name": "Smith", "email": "johnsmith@example.com", "phone_number": "15552003434" }, "payment_data": { "token": "https://try.access.worldpay.com/sessions/eyJrIjoxLCJkIjoiMmlOVUFUMlNDSU5VbEpMcUd6cW8zV.....", "provider": "worldpay", "billing_address": { "name": "test", "line_one": "1234 Chat Road", "line_two": "Apt 101", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94131" } } } ``` ### 5. Payment request: You process the payment using the delegate token in our Payments API (Merchant -> Worldpay) You apply the `delegate token` in the [Payments API](/products/payments/) * `paymentInstrument.type` as `delegate` ```json POST Request /api/payments { "transactionReference": "order1234", "merchant": { "entity": "default" }, "instruction": { "method": "card", // [!code focus:5] // [!code highlight:5] "paymentInstrument": { "type": "delegate", "sessionHref": "https://try.access.worldpay.com/sessions/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ" }, "customer": { "email": "john.appleseed@example.com", "phone": "00000000000", "ipAddress": "192.168.0.1" }, "narrative": { "line1": "trading name" }, "value": { "currency": "GBP", "amount": 42 } } } ``` Using delegate tokens with Payments API Guide to using delegate tokens with the Payments API. Features and limitations. We validate the payment allowances specified by OpenAI before processing the payment. ### 6. Fulfillment: You complete the order as a normal e-commerce payment ## Diagram: Pay via AI Agent (OpenAI) ```mermaid sequenceDiagram participant Agent participant Merchant participant Sessions as Worldpay Delegate Tokens API participant PAPI as Worldpay Payments API Agent->>+Merchant: POST to /checkout_sessions Merchant-->>-Agent: Return PSP information inc. checkoutId Agent->>+Sessions: POST to /agentic_commerce/delegate_payment Sessions->>Sessions: Store delegate payment data Sessions-->>-Agent: Return session href Agent->>+Merchant: POST to /checkout_sessions/{id}/complete {payment_data:href} Merchant->>+PAPI: POST to /api/payments {instruction.paymentInstrument.sessionHref} PAPI->>+Sessions: GET {sessionHref} Sessions->>Sessions: Lookup session Sessions-->>-PAPI: Return delegate payment data PAPI->>PAPI: Validate delegate payment data against instruction opt : if valid PAPI->>PAPI: authorize payment end PAPI-->>-Merchant: Return payment outcome Merchant-->>-Agent: Return payment outcome ```