Skip to content
Preview

This feature is for preview only and is subject to change.

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 Worldpay Sessions API. This encapsulates the payment instrument, and allowances such as the payment value and expiry specified by OpenAI.

Our MCP server also has a tool for this step to create the delegate token.

POST request /sessions/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"
  }
}

4. Checkout completion: Agent provides checkout session and delegate token to you (OpenAI -> Merchant)

  • Providing the delegate token (id from step 3) as payment_data.token.
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)

  • Apply the delegate token (payment_data.token from step 4) in the Payments API as paymentInstrument.sessionHref.
  • Set the paymentInstrument.type as delegate.
POST Request /api/payments

{
    "transactionReference": "order1234",
    "merchant": {
        "entity": "default"
    },
    "instruction": { 
        "method": "card", 
        "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
        }
    }
}

We validate the payment allowances specified by OpenAI before processing the payment.

6. Fulfillment: You complete the order as a normal e-commerce payment

Sequence diagram

AgentMerchantWorldpay Sessions APIWorldpay Payments APIopt[: if valid]Product feed (step 1)POST to /checkout_sessions (step 2)Return PSP information inc. checkoutIdPOST to /sessions/agentic_commerce/delegate_payment (step 3)Store delegate payment dataReturn delegate token (sessionHref)POST to /checkout_sessions/{id}/complete {payment_data:href} (step 4)POST to /api/payments {instruction.paymentInstrument.sessionHref} (step 5)GET {sessionHref}Lookup sessionReturn delegate payment dataValidate delegate payment data against instructionAuthorize paymentReturn payment outcomeReturn payment outcomeAgentMerchantWorldpay Sessions APIWorldpay Payments API