Skip to content
Preview

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

How to enable

After receiving the delegate token from the agent (e.g. ChatGPT) apply it in the Payments API request by setting:

  • instruction.method to card
  • instruction.paymentInstrument.type to delegate.

Delegate token

{
    "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
        }
    }
}

Feature limitations

The delegate token flow is currently restricted to guest card payments.

3DS, SCA Exemptions and Worldpay token creation are not available.

Diagram: Pay via AI Agent (OpenAI)

AgentMerchantWorldpay Delegate Tokens APIWorldpay Payments APIopt[: if valid]POST to /checkout_sessionsReturn PSP information inc. checkoutIdPOST to /agentic_commerce/delegate_paymentStore delegate payment dataReturn session hrefPOST to /checkout_sessions/{id}/complete {payment_data:href}POST to /api/payments {instruction.paymentInstrument.sessionHref}GET {sessionHref}Lookup sessionReturn delegate payment dataValidate delegate payment data against instructionauthorize paymentReturn payment outcomeReturn payment outcomeAgentMerchantWorldpay Delegate Tokens APIWorldpay Payments API