Worldpay CardPayments API

The CardPayments API from Worldpay — 2 operation(s) for cardpayments.

OpenAPI Specification

worldpay-cardpayments-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: 3DS 3DS actions CardPayments API
  description: "Protect your business and meet regulatory requirements by verifying your customer's identity.\n\n__Authentication header__\n  ```\n    Authorization: {your_credentials}\n  ```\nReplace `{your_credentials}` with your base64-encoded Basic Auth username and password given to your by your Worldpay Implementation Manager.\n<br /> <br />\n\nYou **must** use the `Authorization` header for any request you send to our 3DS API.\n\n__Accept/Content-Type header__\n  ```\n  Content-Type: application/vnd.worldpay.verifications.customers-v3.hal+json\n  Accept: application/vnd.worldpay.verifications.customers-v3.hal+json\n  ```\nWe use the Accept header to identify which version of our API you are using. You must use the Accept header for any request you send to our 3DS API.\n\nWe require the Content-Type header if the request you're sending includes a request body, and if the HTTP method is a `POST` or a `PUT`.\n<br /><br />\n\n\n__DNS whitelisting__  \nWhitelist the following URLs:\n* `https://try.access.worldpay.com/`\n* `https://access.worldpay.com/`\n\nPlease ensure you use DNS whitelisting, not explicit IP whitelisting."
  version: '3'
  x-metadata:
    category:
    - 3DS
    - SCA Exemptions
    business:
    - Enterprise
    catalog-list: true
    generated: false
servers:
- url: https://try.access.worldpay.com
  description: Test (Try)
- url: https://access.worldpay.com
  description: Live
security:
- BasicAuth: []
tags:
- name: CardPayments
paths:
  /cardPayments/customerInitiatedTransactions:
    post:
      summary: Take a card payment
      description: Take online card payments using our Card Payments API.
      operationId: authorize
      parameters:
      - in: header
        name: Content-Type
        required: true
        schema:
          type: string
          example: application/vnd.worldpay.payments-v7+json
      - in: header
        name: Accept
        required: true
        schema:
          type: string
          example: application/vnd.worldpay.payments-v7+json
      requestBody:
        content:
          application/vnd.worldpay.payments-v7+json:
            schema:
              $ref: '#/components/schemas/customerInitiatedTransaction'
            examples:
              Card payment authorization:
                description: Payment authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/plain
                      cardNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                  channel: ecom
              Card payment authorization with all optional fields:
                description: Payment authorization for GBP 2.50 with all optional fields
                value:
                  transactionReference: transaction-ref
                  merchant:
                    entity: default
                    mcc: '1234'
                    paymentFacilitator:
                      schemeId: '12345'
                      independentSalesOrganizationId: '12345'
                      subMerchant:
                        name: Merchant Plc
                        reference: '12345'
                        address:
                          postalCode: SW1 1AA
                          street: Regent Street
                          city: London
                          countryCode: GB
                          state: CA
                        taxReference: '12345'
                        phoneNumber: 0123456789
                        email: test@email.com
                        url: developer.worldpay.com
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    consumerBillPayment: true
                    debtRepayment: true
                    narrative:
                      line1: trading name
                      line2: order number
                    value:
                      currency: GBP
                      amount: 250
                      estimated: true
                      acceptPartialAmount: true
                    paymentInstrument:
                      type: card/plain
                      cardNumber: '4444333322221111'
                      expiryDate:
                        month: 12
                        year: 2024
                      cardHolderName: John Appleseed
                      billingAddress:
                        address1: address line 1
                        address2: address line 2
                        address3: address line 3
                        city: city
                        state: state
                        postalCode: '12345'
                        countryCode: IT
                      cvc: '123'
                  riskProfile: https://try.access.worldpay.com/riskProfile/
                  channel: ecom
              Card payment authorization using 3DS2 authentication:
                description: Payment authorization for GBP 2.50 using 3DS2 authentication
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/plain
                      cardNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                  channel: ecom
                  authentication:
                    threeDS:
                      version: 2.2.0
                      eci: '05'
                      authenticationValue: kBNHXUAy4+HT1gAMBSDajheBcxQh
                      transactionId: c5b808e7-1de1-4069-a17b-f70d3b3b1645
              Card payment with a request to store card details:
                description: Payment authorization with a request to store card on file
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/plain
                      cardNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                      cvc: '123'
                    customerAgreement:
                      type: cardOnFile
                      storedCardUsage: first
                  channel: ecom
              Tokenized card payment authorization:
                description: Tokenized card payment authorization
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/token
                      href: https://try.access.worldpay.com/tokens
                  channel: ecom
              Network token payment authorization:
                description: Network token payment authorization
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/networkToken
                      tokenNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                  channel: ecom
                  authentication:
                    networkToken:
                      cryptogram: BLIYQ4EA/wLF4/hK9ABFMAABAAA=
                      eci: '05'
              Checkout payment authorization:
                description: Checkout authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/checkout
                      tokenHref: https://try.access.worldpay.com/tokens
                      cvcHref: https://try.access.worldpay.com/sessions
                  channel: ecom
              Apple wallet payment authorization:
                description: Apple wallet payment authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/wallet+applepay
                      walletToken: token
                  channel: ecom
              Google wallet payment authorization:
                description: Google wallet payment authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/wallet+googlepay
                      walletToken: token
                  channel: ecom
              Decrypted Apple Pay authorization:
                description: Decrypted Apple Pay authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/networkToken+applepay
                      tokenNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                  channel: ecom
                  authentication:
                    networkToken:
                      cryptogram: BLIYQ4EA/wLF4/hK9ABFMAABAAA=
                      eci: '05'
              Decrypted Google Pay authorization:
                description: Decrypted Google Pay authorization for GBP 2.50
                value:
                  transactionReference: Memory265-13/08/1876
                  merchant:
                    entity: default
                  instruction:
                    requestAutoSettlement:
                      enabled: false
                    narrative:
                      line1: MindPalace
                    value:
                      currency: GBP
                      amount: 250
                    paymentInstrument:
                      type: card/networkToken+googlepay
                      tokenNumber: '4444333322221111'
                      expiryDate:
                        month: 5
                        year: 2035
                  channel: ecom
                  authentication:
                    networkToken:
                      cryptogram: BLIYQ4EA/wLF4/hK9ABFMAABAAA=
                      eci: '05'
      responses:
        '201':
          description: The payment authorization has been successfully created
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/payments_authorize_201_response'
                - $ref: '#/components/schemas/payments_sentForSettlement_201_response'
                - $ref: '#/components/schemas/payments_authorize_201_refusal'
                discriminator:
                  mapping:
                    authorized: '#/components/schemas/payments_authorize_201_response'
                    Sent for Settlement: '#/components/schemas/payments_sentForSettlement_201_response'
                    refused: '#/components/schemas/payments_authorize_201_refusal'
                  propertyName: outcome
              examples:
                Successful payment authorization:
                  description: Payment authorization for GBP 2.50 with a successful outcome
                  value:
                    outcome: authorized
                    paymentId: payI-dUcet9fk4_X4qZU0hpU0
                    commandId: cmd-Rjc4HJwnBdj3Ri9v10vT0
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    _links:
                      cardPayments:cancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/linkData
                      cardPayments:partialCancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/partials/linkData
                      cardPayments:settle:
                        href: https://try.access.worldpay.com/payments/settlements/full/linkData
                      cardPayments:partialSettle:
                        href: https://try.access.worldpay.com/payments/settlements/partials/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Successful payment authorization with estimated authorization amount:
                  description: Payment authorization for estimated GBP 2.50 with a successful outcome
                  value:
                    outcome: authorized
                    paymentId: pay9iX60mh85-FPnv4ccQ9B40
                    commandId: cmdwZ5y_rSV1VmjD6CpgCuXG0
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    _links:
                      cardPayments:cancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/linkData
                      cardPayments:partialCancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/partials/linkData
                      cardPayments:increaseAuthorizedAmount:
                        href: https://try.access.worldpay.com/payments/authorizations/incrementalAuthorizations/linkData
                      cardPayments:settle:
                        href: https://try.access.worldpay.com/payments/settlements/full/linkData
                      cardPayments:partialSettle:
                        href: https://try.access.worldpay.com/payments/settlements/partials/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Successful payment authorization (encrypted wallets):
                  description: Payment authorization for GBP 2.50 with a successful outcome
                  value:
                    outcome: authorized
                    paymentId: pay7FBwk30sgS4fi-Vwapb220
                    commandId: cmdvn_du3sDMwls94_xG0a_v0
                    riskFactors:
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/network+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      tokenNumber: 555555******4444
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    _links:
                      cardPayments:cancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/linkData
                      cardPayments:partialCancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/partials/linkData
                      cardPayments:settle:
                        href: https://try.access.worldpay.com/payments/settlements/full/linkData
                      cardPayments:partialSettle:
                        href: https://try.access.worldpay.com/payments/settlements/partials/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      tokens:token:
                        href: https://try.access.worldpay.com/tokens/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Successful payment authorization (network tokens and decrypted wallets):
                  description: Payment authorization for GBP 2.50 with a successful outcome
                  value:
                    outcome: authorized
                    paymentId: payM39vAj85naVjwpP28C3800
                    commandId: cmdRTc29vnWi5-so71qzfN900
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/network+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    _links:
                      cardPayments:cancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/linkData
                      cardPayments:partialCancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/partials/linkData
                      cardPayments:settle:
                        href: https://try.access.worldpay.com/payments/settlements/full/linkData
                      cardPayments:partialSettle:
                        href: https://try.access.worldpay.com/payments/settlements/partials/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Successful payment authorization (requestAutoSettlement enabled):
                  description: Payment authorization (requestAutoSettlement enabled) for GBP 2.50 with a successful outcome
                  value:
                    outcome: Sent for Settlement
                    paymentId: pay-Tb29_shVbNM2_78s_hLu0
                    commandId: cmdCG2tN9863bNw79xB23f7R0
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    _links:
                      cardPayments:refund:
                        href: https://try.access.worldpay.com/payments/settlements/refunds/full/linkData
                      cardPayments:partialRefund:
                        href: https://try.access.worldpay.com/payments/settlements/refunds/partials/linkData
                      cardPayments:reverse:
                        href: https://try.access.worldpay.com/payments/sales/reversals/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Successful payment authorization for a partial amount:
                  description: Payment authorization for GBP 2.50 with a successful outcome and GBP 1.99 authorized
                  value:
                    outcome: authorized
                    paymentId: payI-dUcet9fk4_X4qZU0hpU0
                    commandId: cmd_83bNq9Df_-x32M-9sB4c0
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    issuer:
                      authorizationCode: T75725
                    scheme:
                      reference: 'MCCOLXT1C0104  '
                    paymentInstrument:
                      type: card/plain+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
                    amounts:
                      requested: 250
                      totalAuthorized: 199
                      currency: GBP
                      partialAuthorization: true
                    _links:
                      cardPayments:cancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/linkData
                      cardPayments:partialCancel:
                        href: https://try.access.worldpay.com/payments/authorizations/cancellations/partials/linkData
                      cardPayments:settle:
                        href: https://try.access.worldpay.com/payments/settlements/full/linkData
                      cardPayments:partialSettle:
                        href: https://try.access.worldpay.com/payments/settlements/partials/linkData
                      cardPayments:events:
                        href: https://try.access.worldpay.com/payments/events/linkData
                      curies:
                      - name: cardPayments
                        href: https://try.access.worldpay.com/rels/cardPayments/{rel}
                        templated: true
                Refused payment authorization:
                  description: Payment authorization with a refused outcome
                  value:
                    outcome: refused
                    paymentId: pay98nf27CWQoNxm3fA6KvdY0
                    commandId: cmdtIhnZ-86r1xAam9-v47fB0
                    refusalCode: '5'
                    refusalDescription: REFUSED
                    riskFactors:
                    - type: cvc
                      risk: notSupplied
                    - type: avs
                      risk: notChecked
                      detail: address
                    - type: avs
                      risk: notChecked
                      detail: postcode
                    advice:
                      code: '01'
                    paymentInstrument:
                      type: card/plain+masked
                      cardBin: '555555'
                      lastFour: '4444'
                      category: consumer
                      countryCode: GB
                      expiryDate:
                        month: 9
                        year: 2029
                      cardBrand: mastercard
                      fundingType: credit
                      issuerName: AN ISSUING BANK LTD
                      paymentAccountReference: Q1HJZ28RKA1EBL470G9XYG90R5D3E
        '400':
          description: Bad request
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                Bad request:
                  description: Bad request
                  value:
                    errorName: bodyDoesNotMatchSchema
                    message: The json body provided does not match the expected schema
                    validationErrors:
                    - errorName: fieldMustBeString
                      message: Element at path must be a string
                      jsonPath: $.value.currency
        '401':
          description: Unauthorized
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  description: Unauthorized
                  value:
                    errorName: accessDenied
                    message: Access to the requested resource has been denied
        '404':
          description: Not found
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  description: Not found
                  value:
                    errorName: endpointNotFound
                    message: Requested endpoint was not found.
        '415':
          description: Unsupported media type
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unsupported:
                  description: Unsupported media type
                  value:
                    errorName: headerHasInvalidValue
                    message: Bad content type
        '500':
          description: Internal server error
          content:
            application/vnd.worldpay.payments-v7+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Bad request:
                  description: Bad request
                  value:
                    errorName: internalServerError
                    message: Internal server error
      tags:
      - CardPayments
  /cardPayments/merchantInitiatedTransactions:
    post:
      summary: Take a repeat card payment
      description: Take online payme

# --- truncated at 32 KB (138 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/worldpay/refs/heads/main/openapi/worldpay-cardpayments-api-openapi.yml