---
updatedAt: 2026-04-23T13:45:10.000Z
agentTools:
  projectIndex: https://docs.br-dge.io/llms.txt
---

# Get the status of a payment

Returns the status of a payment

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "BR-DGE Transaction REST API",
    "description": "Use the BR-DGE Transaction REST API to manage and process transactions within BR-DGE. With these endpoints, you can create, retrieve, update and delete transactions securely and efficiently. These unlock access to various third-party payment services such as Payment Service Providers (PSPs), Digital Wallets and Alternative Payment Methods (APMs).\n\nPlease see our [Web SDK documentation] for more information about how we can help you integrate your client applications with us.\n## Authorization\nAPI keys can be generated via the BR-DGE portal and are grouped into two main classes based on their usage:\n- Server API keys for use by you in your secure back-end services, *and must not be exposed to your end users.*\n- Separate Client API keys will be provided for use in client applications to support certain features that need to\n  happen in untrusted client environments.\n\n## Environment Sub Domains\nThe BR-DGE REST API is hosted on a selection of subdomains. Use <https://sandbox.comcarde.com> for testing and either <https://secure.comcarde.com> or <https://secure-amer-01.api.br-dge.io> for live payments depending on your operational region.\n\n**IMPORTANT**: To ensure [PCI Compliance], please only use mock payment instrument data when interacting with our Sandbox API.\n\n[PCI Compliance]: https://www.pcisecuritystandards.org/\n[Web SDK documentation]: https://docs.br-dge.io/docs/web-sdk-introduction\n",
    "version": "v1.0.0",
    "contact": {
      "name": "Customer Support",
      "url": "https://docs.br-dge.io/docs/support#contact-support"
    },
    "license": {
      "name": "MIT",
      "url": "https://docs.br-dge.io/docs/openapi-license"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.comcarde.com/v1",
      "description": "Sandbox subdomain for testing your integration works as expected, using mock payment instruments only.\n"
    },
    {
      "url": "https://secure.comcarde.com/v1",
      "description": "Use this subdomain for processing live payments in the EU region."
    },
    {
      "url": "https://secure-amer-01.api.br-dge.io/v1",
      "description": "Use this subdomain for processing live payments in the NA region."
    }
  ],
  "tags": [
    {
      "name": "Payments",
      "description": "Collect money from all of your customers."
    }
  ],
  "externalDocs": {
    "url": "https://docs.br-dge.io"
  },
  "paths": {
    "/payments/{paymentId}/status": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Get the status of a payment",
        "description": "Returns the status of a payment",
        "operationId": "getPaymentStatusUsingGET",
        "security": [
          {
            "ServerApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pathPaymentId"
          },
          {
            "name": "include",
            "in": "query",
            "description": "A parameter allowing the inclusion of related information.\n\nThis parameter follows closely the [JSON:API Inclusion of Related\nResources]. Specifying valid entries will result in the entities\nbeing included in the `included` section of the response.\n\n[JSON:API Inclusion of Related Resources]: https://jsonapi.org/format/1.1/#fetching-includes\n",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "issuerResponse"
                ]
              },
              "uniqueItems": true
            },
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentStatusResponse"
                },
                "examples": {
                  "authorization-pending": {
                    "summary": "Authorization Pending",
                    "description": "A transaction has been submitted for Authorization to the Processor and this request has been accepted by the Processor but the outcome has not been determined. (It is anticipated that there will be async update to this status and that this should be a temporary state.)\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZATION_PENDING",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "authorization-pending with Google Pay payment instrument": {
                    "summary": "Authorization Pending with Google Pay Payment Instrument",
                    "description": "A transaction has been submitted for Authorization to the Processor and this request has been accepted by the Processor but the outcome has not been determined. (It is anticipated that there will be an async update to this status and that this should be a temporary state.)\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZATION_PENDING",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "googlePay",
                        "decryptedPayload": {
                          "gatewayMerchantId": "some-merchant-id",
                          "messageExpiration": "1650574736277",
                          "messageId": "AH2Ejtc88ZHJ-2aYBQWzHwvp6l0JsCHgxVt8s91A-ZUikaXNbcjsFm6gg9ExeVR-jzIyT-mJvA_ntvfRsDDOH2jnKMjdTtXIJvPt0NBUU45R7-gnjxkx-sI0ldcWvbDHsV0735yFDbWk",
                          "paymentMethod": "CARD",
                          "paymentMethodDetails": {
                            "pan": "####-####-####-4444",
                            "expirationMonth": 5,
                            "expirationYear": 2025,
                            "authMethod": "PAN_ONLY",
                            "eciIndicator": "07",
                            "assuranceDetails": {
                              "accountVerified": true,
                              "cardholderAuthenticated": true
                            }
                          }
                        },
                        "metadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true
                        },
                        "expiryDate": "05-25",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60525"
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "captured with ApplePay payment instrument": {
                    "summary": "Captured payment with ApplePay Payment Instrument",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "f050f567-e2e0-4122-9e80-8f01e416c5d5",
                      "status": "CAPTURED",
                      "timestamp": "2026-09-01T08:59:16Z",
                      "reference": "b95c82f6-820a-48e8-8363-23fef0ff3760",
                      "amount": 15100,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "applePay",
                        "metadata": {
                          "issuer": "INTL HDQTRS-CENTER OWNED",
                          "type": "CREDIT",
                          "category": "VISA CLASSIC",
                          "countryIsoA2": "CN",
                          "commercial": false,
                          "bin": "48185288"
                        },
                        "expiryDate": "01-30",
                        "fingerprint": "39100e8c5e24ddaff2deb2714403c8fe0b687e9b0a56fafd4e9eac5b13d80973",
                        "fingerprintExtended": "39100e8c5e24ddaff2deb2714403c8fe0b687e9b0a56fafd4e9eac5b13d809730130",
                        "decryptedPayload": {
                          "applicationPrimaryAccountNumber": "4818528810104376",
                          "applicationExpirationDate": "300131",
                          "currencyCode": "826",
                          "transactionAmount": 100,
                          "deviceManufacturerIdentifier": "040010030273",
                          "paymentDataType": "3DSecure",
                          "paymentData": {
                            "eciIndicator": 7
                          },
                          "transactionId": "40110f5b2ddc2ae725eef131caceed8bcdf48b5795df79f0dd804e26946a98c5",
                          "cardholderName": "John Doe"
                        },
                        "paymentMethod": {
                          "displayName": "Visa 0189",
                          "network": "Visa",
                          "type": "credit"
                        }
                      },
                      "psp": {
                        "name": "Nuvei",
                        "transactionId": "7110000000028353111"
                      },
                      "scaDetails": {
                        "eci": "07"
                      }
                    }
                  },
                  "authorized": {
                    "summary": "Authorized Payment",
                    "description": "If BR-DGE receives a PSP notification that one of your transactions has been updated to authorized status then this information will be passed on to you via a BR-DGE callback.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "authorized-with-psp-token-payment-instrument": {
                    "summary": "Authorized payment using a pspToken",
                    "description": "A successful payment using a PSP Token as the payment instrument will return the PSP token which was used to create the payment as part of the payment response.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "pspToken",
                        "token": "ABC123"
                      },
                      "psp": {
                        "name": "Checkout.com",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "Payment status with risk assessment information": {
                    "summary": "Payment status with RiskAssessment field included",
                    "description": "The riskAssessments field contains information about the outcome of risk assessments performed by risk engines\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      },
                      "riskAssessments": {
                        "kount": {
                          "score": 90.1,
                          "decision": "APPROVED",
                          "transactionId": "KJX50N55NGJS",
                          "tags": [
                            "SUBSCRIPTION",
                            "KNOWN_LOCATION"
                          ]
                        }
                      }
                    }
                  },
                  "Payment status with payment instrument account information": {
                    "summary": "Payment status with account field in payment instrument",
                    "description": "Account model contains information about the account on PSP side used for the payment.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "trustly",
                        "account": {
                          "accountId": "1234567890",
                          "bank": "Barclays",
                          "town": "PaloAlto",
                          "name": "John Mockington",
                          "address": "LincolnDrive",
                          "postcode": "456",
                          "descriptor": "**926819",
                          "lastDigits": "926819",
                          "clearingHouse": "UNITED_KINGDOM",
                          "verified": true
                        }
                      },
                      "psp": {
                        "name": "Trustly",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "captured": {
                    "summary": "Captured Payment",
                    "description": "If BR-DGE receives a PSP notification that one of your transactions has been updated to captured status then this information will be passed on to you via a BR-DGE callback.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "CAPTURED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "applePay"
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "voided": {
                    "summary": "Voided Payment",
                    "description": "If BR-DGE receives a PSP notification that one of your transactions has been updated to void status then this information will be passed on to you via a BR-DGE callback.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "VOIDED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "payPal"
                      },
                      "psp": {
                        "name": "Trust Payments",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "void-error": {
                    "summary": "Error with void request",
                    "description": "If BR-DGE receives a PSP notification of an error with your transaction.\n",
                    "value": {
                      "code": "4252",
                      "message": "Transaction Error: Maximum number of attempts to process request reached",
                      "comcardeCode": {
                        "code": "4252",
                        "description": "Transaction Error: Maximum number of attempts to process request reached"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "ideal"
                      },
                      "psp": {
                        "name": "Checkout.com",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "declined": {
                    "summary": "Declined Payment",
                    "description": "A transaction has been submitted for Authorization to the Processor and this request has been processed and declined. The transaction could have either been declined by the Processor, due to rules within their system [Fraud, velocity limits, value limits], or by the Card Issuer. There will be an associated `reason` assigned to this state providing details of the decline.\n",
                    "value": {
                      "code": "4201",
                      "message": "Transaction Error: Transaction declined by payment processor - customer will need to contact their bank for more details",
                      "comcardeCode": {
                        "code": "4201",
                        "description": "Transaction Error: Transaction declined by payment processor - customer will need to contact their bank for more details"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZATION_DECLINED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "bancontact"
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "rejected": {
                    "summary": "Rejected Payment",
                    "description": "A transaction has been submitted for Authorization to the processor and this been rejected due to a validation or a technical error. This rejection could have occurred either within the BR-DGE platform, the Processor or the Card Issuer. There will be an associated `reason` assigned to this state providing details of the rejection.\n",
                    "value": {
                      "code": "4251",
                      "message": "Transaction Error: Payment was rejected by payment processor",
                      "comcardeCode": {
                        "code": "4251",
                        "description": "Transaction Error: Payment was rejected by payment processor"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "REJECTED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "capture-or-void-error": {
                    "summary": "Error capturing or voiding an authorized payment",
                    "description": "If your transaction was authorized but there was an issue capturing or voiding the transaction.\n",
                    "value": {
                      "code": "4252",
                      "message": "Transaction Error: Maximum number of attempts to process request reached",
                      "comcardeCode": {
                        "code": "4252",
                        "description": "Transaction Error: Maximum number of attempts to process request reached"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Checkout.com",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "Card payment instrument not found": {
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "CAPTURED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card"
                      },
                      "psp": {
                        "name": "Checkout.com",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    },
                    "description": "This example occurs when the payment status is returned but the card payment instrument details are unavailable.\n\nThe retrieval of payment instrument details will only be attempted for card payments.\n"
                  },
                  "Payment Status with included issuerResponse": {
                    "summary": "Payment with included issuerResponse",
                    "description": "If the parameters ?include=issueResponse are used and the payment has an issuerResponse. IssuerResponses are only captured from Fat Zebra and WorldPay (WPG)\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "included": [
                        {
                          "id": "ISSUER_1",
                          "type": "issuerResponse",
                          "attributes": {
                            "type": "issuerResponse",
                            "issuerResponse": {
                              "issuerPaymentMethod": "MasterCard",
                              "issuerCardType": "Debit"
                            }
                          }
                        }
                      ],
                      "relationships": {
                        "issuerResponse": {
                          "data": {
                            "type": "issuerResponse",
                            "id": "ISSUER_1"
                          }
                        }
                      },
                      "psp": {
                        "name": "Fat Zebra",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      }
                    }
                  },
                  "With cashier Id": {
                    "summary": "Payment made using the Cashier",
                    "description": "A transaction submitted through the Cashier will include a cashierId field in the response.\n",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "CAPTURED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "paymentInstrument": {
                        "type": "paysafecard"
                      },
                      "cashierId": "43ee1f43-df8b-47df-9b7d-33e3f69879b1"
                    }
                  },
                  "payment-status-with-custom-metadata": {
                    "summary": "Payment with custom metadata",
                    "value": {
                      "code": "1000",
                      "message": "Approved",
                      "comcardeCode": {
                        "code": "1000",
                        "description": "Approved"
                      },
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "status": "AUTHORIZED",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "reference": "example-customer-order-code",
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233 56## #### 1133",
                        "expiryDate": "06-30",
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "DEBIT",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        }
                      },
                      "psp": {
                        "name": "Barclaycard Smartpay Fuse",
                        "transactionId": "a83a53a2-dcc8-45be-bf70-2b1e4b719f7c"
                      },
                      "customMetadata": {
                        "accountAge": "2",
                        "transactionType": "Other"
                      }
                    }
                  },
                  "payment-blocked": {
                    "summary": "Payment Blocked",
                    "description": "A payment blocked due to routing rules, the blocking rule is provided in the response.\n",
                    "value": {
                      "paymentId": "c2fcf424-d7df-4b8b-aa98-3a60ce990d7c",
                      "merchantTransactionId": "65748db8-c794-4bcc-a886-8547e12fe052",
                      "code": "4805",
                      "message": "Blocked by Routing Rules",
                      "timestamp": "2022-01-30T10:10:10Z",
                      "paymentInstrument": {
                        "type": "card",
                        "nameOnCard": "John F Doe",
                        "pan": "1233-56##-####-1133",
                        "expiryDate": "06-30",
                        "cardMetadata": {
                          "cardBrand": "VISA",
                          "issuer": "ACMEBANK",
                          "type": "PREPAID",
                          "category": "CLASSIC",
                          "countryIsoA2": "GB",
                          "commercial": true,
                          "bin": "45678765"
                        },
                        "fingerprint": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6",
                        "fingerprintExtended": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c60630"
                      },
                      "status": "BLOCKED",
                      "reference": "example-customer-order-code",
                      "comcardeCode": {
                        "code": "4805",
                        "description": "Blocked by Routing Rules"
                      },
                      "customMetadata": {},
                      "amount": 1500,
                      "currencyCode": "GBP",
                      "blockingRule": {
                        "name": "Block pre-paid cards"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedRequest"
          },
          "404": {
            "$ref": "#/components/responses/EntityNotFound"
          },
          "500": {
            "$ref": "#/components/responses/UnknownServerError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "title": "Address",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "firstName": {
                "description": "First name of the occupant.\n\nPlease use only letters, spaces and these symbols: `-'.`",
                "type": "string",
                "maxLength": 255,
                "example": "John"
              },
              "lastName": {
                "description": "Last name of the occupant.\n\nPlease use only letters, spaces and these symbols: `-'.`",
                "type": "string",
                "maxLength": 255,
                "example": "Smith"
              },
              "phoneNumber": {
                "$ref": "#/components/schemas/PhoneNumber"
              }
            }
          },
          {
            "$ref": "#/components/schemas/DomicileAddress"
          }
        ]
      },
      "DomicileAddress": {
        "title": "Address",
        "type": "object",
        "properties": {
          "buildingNumberOrName": {
            "$ref": "#/components/schemas/BuildingNumberOrName"
          },
          "address1": {
            "$ref": "#/components/schemas/AddressLineOne"
          },
          "address2": {
            "$ref": "#/components/schemas/AddressLineTwo"
          },
          "address3": {
            "$ref": "#/components/schemas/AddressLineThree"
          },
          "town": {
            "$ref": "#/components/schemas/Town"
          },
          "county": {
            "$ref": "#/components/schemas/County"
          },
          "postcode": {
            "$ref": "#/components/schemas/Postcode"
          },
          "country": {
            "$ref": "#/components/schemas/CountryIsoCode"
          },
          "countrySubdivisionCode": {
            "description": "ISO 3166-2 Country subdivision code.\n\nFor an ISO 3166-2 code like `GB-SCT` you should only provide `SCT`.",
            "type": "string",
            "minLength": 1,
            "maxLength": 3,
            "pattern": "^[A-Z0-9]+$",
            "example": "WY"
          }
        }
      },
      "ProcessedAsAft": {
        "title": "ProcessedAsAft",
        "type": "string",
        "description": "Indicator whether the payment was processed as an AFT. `UNKNOWN` when the provider does not report either way. Only present for payments submitted with an `aft` object.\n",
        "enum": [
          "YES",
          "NO",
          "UNKNOWN"
        ],
        "example": "YES"
      },
      "PspProcessingMethod": {
        "title": "PspProcessingMethod",
        "type": "string",
        "description": "The type of payment credential BR-DGE submitted to the provider to process this transaction, typically `RAW_CARD_DETAILS`, `NETWORK_TOKEN`, `PSP_TOKEN` or `OTHER`. Describes what BR-DGE sent to the provider, not what the provider used. Omitted when no credential type was recorded.\n",
        "example": "NETWORK_TOKEN"
      },
      "TransactionStatusBase": {
        "type": "object",
        "required": [
          "paymentId",
          "code",
          "message",
          "timestamp"
        ],
        "properties": {
          "paymentId": {
            "type": "string",
            "description": "Unique identifier for the payment",
            "example": "2c6a34be-f7a1-4b49-b09c-e84e1322df7f"
          },
          "merchantTransactionId": {
            "$ref": "#/components/schemas/MerchantTransactionId"
          },
          "customer": {
            "type": "object",
            "description": "Information pertaining to the customer whom made the transaction.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "$ref": "#/components/schemas/CustomerId"
              }
            }
          },
          "code": {
            "type": "string",
            "description": "[Response Code] signifying the outcome of the request.\n\n[Response Code]: https://docs.br-dge.io/docs/response-codes\n",
            "example": "1000"
          },
          "message": {
            "type": "string",
            "description": "A description of the outcome"
          },
          "psp": {
            "$ref": "#/components/schemas/PspInfo"
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the transaction entered its latest status.",
            "format": "date-time",
            "example": "2022-01-30T10:10:10Z"
          }
        }
      },
      "PaymentStatusResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TransactionStatusBase"
          },
          {
            "$ref": "#/components/schemas/RelationshipEntity"
          },
          {
            "$ref": "#/components/schemas/IncludedRelationships"
          },
          {
            "type": "object",
            "required": [
              "paymentInstrument",
              "status",
              "reference",
              "amount",
              "currencyCode"
            ],
            "properties": {
              "paymentInstrument": {
                "$ref": "#/components/schemas/PaymentStatusPaymentInstrument"
              },
              "status": {
                "$ref": "#/components/schemas/PaymentStatus"
              },
              "reference": {
                "description": "The merchant defined customer order code for the payment.",
                "type": "string"
              },
              "comcardeCode": {
                "$ref": "#/components/schemas/ComcardeCode"
              },
              "riskAssessments": {
                "$ref": "#/components/schemas/RiskAssessments"
              },
              "cashierId": {
                "$ref": "#/components/schemas/CashierId"
              },
              "customMetadata": {
                "$ref": "#/components/schemas/CustomMetadata"
              },
              "paymentRails": {
                "$ref": "#/components/schemas/PaymentRails"
              },
              "keyIdentifiers": {
                "$ref": "#/components/schemas/KeyIdentifiers"
              },
              "avsResult": {
                "$ref": "#/components/schemas/AvsResult"
              },
              "cvvResult": {
                "$ref": "#/components/schemas/CvvResult"
              },
              "amount": {
                "$ref": "#/components/schemas/AmountIncludingZero"
              },
              "currencyCode": {
                "$ref": "#/components/schemas/CurrencyCode"
              },
              "scaDetails": {
                "$ref": "#/components/schemas/ScaDetails"
              },
              "authentication": {
                "$ref": "#/components/schemas/Authentication"
              },
              "authorizationCode": {
                "$ref": "#/components/schemas/AuthorizationCode"
              },
              "blockingRule": {
                "$ref": "#/components/schemas/BlockingRule"
              },
              "processedAsAft": {
                "$ref": "#/components/schemas/ProcessedAsAft"
              },
              "pspProcessingMethod": {
                "$ref": "#/components/schemas/PspProcessingMethod"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrument": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentCard"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentApplePay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentGooglePay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentClickToPay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentPayPal"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentIdeal"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentBancontact"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentTrustly"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentPix"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentPspTokenInstrument"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentAstroPayInstrument"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentPaysafecard"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentEasyPay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentEPay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentNeteller"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentSkrill"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentSkrillOneTap"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentRevolutPay"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentTrueLayer"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentOneVoucher"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentBank2Bank"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentOttVoucher"
          },
          {
            "$ref": "#/components/schemas/PaymentStatusPaymentInstrumentBluVoucher"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "card": "#/components/schemas/PaymentStatusPaymentInstrumentCard",
            "applePay": "#/components/schemas/PaymentStatusPaymentInstrumentApplePay",
            "googlePay": "#/components/schemas/PaymentStatusPaymentInstrumentGooglePay",
            "clickToPay": "#/components/schemas/PaymentStatusPaymentInstrumentClickToPay",
            "payPal": "#/components/schemas/PaymentStatusPaymentInstrumentPayPal",
            "ideal": "#/components/schemas/PaymentStatusPaymentInstrumentIdeal",
            "bancontact": "#/components/schemas/PaymentStatusPaymentInstrumentBancontact",
            "trustly": "#/components/schemas/PaymentStatusPaymentInstrumentTrustly",
            "pix": "#/components/schemas/PaymentStatusPaymentInstrumentPix",
            "pspToken": "#/components/schemas/PaymentStatusPaymentInstrumentPspTokenInstrument",
            "astroPay": "#/components/schemas/PaymentStatusPaymentInstrumentAstroPayInstrument",
            "paysafecard": "#/components/schemas/PaymentStatusPaymentInstrumentPaysafecard",
            "easyPay": "#/components/schemas/PaymentStatusPaymentInstrumentEasyPay",
            "ePay": "#/components/schemas/PaymentStatusPaymentInstrumentEPay",
            "neteller": "#/components/schemas/PaymentStatusPaymentInstrumentNeteller",
            "skrill": "#/components/schemas/PaymentStatusPaymentInstrumentSkrill",
            "skrillOneTap": "#/components/schemas/PaymentStatusPaymentInstrumentSkrillOneTap",
            "revolutPay": "#/components/schemas/PaymentStatusPaymentInstrumentRevolutPay",
            "trueLayer": "#/components/schemas/PaymentStatusPaymentInstrumentTrueLayer",
            "oneVoucher": "#/components/schemas/PaymentStatusPaymentInstrumentOneVoucher",
            "bank2bank": "#/components/schemas/PaymentStatusPaymentInstrumentBank2Bank",
            "ottVoucher": "#/components/schemas/PaymentStatusPaymentInstrumentOttVoucher",
            "bluVoucher": "#/components/schemas/PaymentStatusPaymentInstrumentBluVoucher"
          }
        }
      },
      "BasePaymentStatusPaymentInstrument": {
        "description": "General fields which are valid for a payment instrument.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "description": "Discriminator Field, defines the type of payment instrument.\nValid values can be found on the parent object’s discriminator definition in OpenAPI schema.\n",
            "type": "string"
          }
        }
      },
      "PaymentStatusPaymentInstrumentCard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "required": [
              "pan",
              "expiryDate",
              "fingerprint",
              "fingerprintExtended"
            ],
            "properties": {
              "nameOnCard": {
                "type": "string",
                "example": "John F Doe"
              },
              "pan": {
                "type": "string",
                "example": "1234 56## #### 1111"
              },
              "expiryDate": {
                "$ref": "#/components/schemas/CardExpiryDate"
              },
              "cardMetadata": {
                "$ref": "#/components/schemas/CardMetadata"
              },
              "fingerprint": {
                "$ref": "#/components/schemas/Fingerprint"
              },
              "fingerprintExtended": {
                "$ref": "#/components/schemas/FingerprintExtended"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentApplePay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/ApplePayDetails"
          },
          {
            "$ref": "#/components/schemas/DeprecatedCardMetadataField"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentGooglePay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/GooglePayDetails"
          },
          {
            "$ref": "#/components/schemas/DeprecatedCardMetadataField"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentClickToPay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/ClickToPayDetails"
          }
        ]
      },
      "DeprecatedCardMetadataField": {
        "description": "An object to include the deprecated `cardMetadata` field in the model.\nThis has been replaced by `metadata`.\n",
        "deprecated": true,
        "type": "object",
        "properties": {
          "cardMetadata": {
            "description": "If a card payment instrument is used then BR-DGE may be able to provide metadata about the card\n\n**Please note: All text will be UPPERCASE and all fields can be null** DEPRECATED: If this field exists, instead `metadata` should be used.\n",
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CardMetadata"
              }
            ]
          }
        }
      },
      "PaymentStatusPaymentInstrumentPayPal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "account": {
                "$ref": "#/components/schemas/PaymentInstrumentAccountBase"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentIdeal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentInstrumentAccountBase": {
        "title": "Account",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "The unique account identifier used by the payment instrument provider (Skrill, Paypal etc.) The id is only available after the customer has logged in to their account. Only supported on a subset of payment instruments.\n",
            "example": "customer@email.com"
          }
        }
      },
      "TrueLayerUserData": {
        "description": "Contains TrueLayer customer account information.\n",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the customer.",
            "example": "Mr"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the customer.",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the customer.",
            "example": "Smith"
          },
          "dateOfBirth": {
            "$ref": "#/components/schemas/DateOfBirth"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "accountDetails": {
            "$ref": "#/components/schemas/TrueLayerAccountDetails"
          }
        }
      },
      "TrueLayerAccountDetails": {
        "description": "TrueLayer Account Details",
        "type": "object",
        "properties": {
          "accountNumber": {
            "$ref": "#/components/schemas/AccountNumber"
          },
          "sortCode": {
            "$ref": "#/components/schemas/SortCode"
          },
          "iban": {
            "$ref": "#/components/schemas/Iban"
          },
          "providerId": {
            "type": "string",
            "description": "The TrueLayer ID of a bank or other financial institution.",
            "example": "gb-monzo"
          },
          "paymentSourceId": {
            "description": "The TrueLayer ID of the customer's payment details.",
            "type": "string",
            "example": "ff411383-f513-4b08-b012-69815bd80568"
          }
        }
      },
      "PaymentStatusPaymentInstrumentBancontact": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentTrustly": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "account": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/TrustlyAccount"
                  },
                  {
                    "required": [
                      "accountId"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentPix": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentPspTokenInstrument": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "token": {
                "description": "The PSP Token used to initiate payment/payout",
                "type": "string"
              },
              "customerId": {
                "description": "The customerId used when provisioning PSP Token.\nThis is only needed with certain PSP tokens.\n",
                "type": "string"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentAstroPayInstrument": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentPaysafecard": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "account": {
                "$ref": "#/components/schemas/PaymentInstrumentAccountBase"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentNeteller": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "account": {
                "$ref": "#/components/schemas/PaymentInstrumentAccountBase"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentEasyPay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentEPay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentSkrill": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "account": {
                "$ref": "#/components/schemas/PaymentInstrumentAccountBase"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentSkrillOneTap": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          },
          {
            "required": [
              "oneTapPaymentId"
            ],
            "properties": {
              "oneTapPaymentId": {
                "type": "string",
                "description": "BR-DGE paymentId for the order where 1-Tap payment was initially set up.",
                "example": "123e4567-e89b-12d3-a456-426614174000"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentRevolutPay": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentTrueLayer": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object",
            "properties": {
              "userData": {
                "$ref": "#/components/schemas/TrueLayerUserData"
              }
            }
          }
        ]
      },
      "PaymentStatusPaymentInstrumentOneVoucher": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentBluVoucher": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentBank2Bank": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "PaymentStatusPaymentInstrumentOttVoucher": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentStatusPaymentInstrument"
          },
          {
            "type": "object"
          }
        ]
      },
      "ComcardeCode": {
        "title": "ComcardeCode",
        "deprecated": true,
        "type": "object",
        "properties": {
          "code": {
            "description": "A unique identifier covering the outcome of the request.",
            "type": "string",
            "example": "1000"
          },
          "description": {
            "description": "A description of the outcome of the request.",
            "type": "string"
          }
        }
      },
      "RiskAssessments": {
        "description": "An optional map of risk assessment results received from risk engines.",
        "type": "object",
        "properties": {
          "kount": {
            "$ref": "#/components/schemas/KountRiskAssessment"
          },
          "merchant": {
            "$ref": "#/components/schemas/MerchantRiskAssessment"
          }
        }
      },
      "KountRiskAssessment": {
        "description": "Risk assessment from Kount risk engine.",
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "score": {
            "description": "The [Omniscore] transaction safety rating received from Kount's risk engine.\n\n[Omniscore]: https://support.kount.com/hc/en-us/articles/360045236712-Omniscore-Overview\n",
            "type": "number",
            "format": "double",
            "example": 85.5
          },
          "decision": {
            "description": "Kount's risk decision\n\nCan be one of:\n- `APPROVED`: Kount risk engine has approved the transaction.\n- `DECLINED`: Kount risk engine has declined the transaction.\n- `UNAVAILABLE`: Kount risk engine was unavailable to give a decision.\n- `REVIEW`: Kount risk engine has advised that manual review of transaction is required.\n",
            "type": "string",
            "enum": [
              "APPROVED",
              "DECLINED",
              "UNAVAILABLE",
              "REVIEW"
            ],
            "example": "APPROVED"
          },
          "reasonCode": {
            "description": "The **reasonCode** indicates a [Custom Reason Code] you've configured within your Kount dashboard. This code is returned when a specific individual rule you've created in Kount is triggered.\n\nTo manage or add new custom reason codes and their associated rules, please use your Kount dashboard.\n\n[Custom Reason Code]: https://support.kount.com/hc/en-us/articles/360045746411-Set-Up-Custom-Reason-Codes\n",
            "type": "string",
            "example": "APPROVED_3DS_STEP_UP"
          },
          "transactionId": {
            "description": "Transaction identifier provided by Kount.",
            "type": "string"
          },
          "tags": {
            "description": "List of tags assigned to the transaction by Kount.",
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            },
            "example": [
              "3DS_CHALLENGE",
              "NEW_DEVICE"
            ]
          }
        }
      },
      "MerchantRiskAssessment": {
        "description": "Risk assessment from Merchant's own risk engine. Can be used to return results when\nthe merchant has a proprietary risk or validation engine they wish to call during the\npayment or payout flows.\n",
        "type": "object",
        "required": [
          "decision"
        ],
        "properties": {
          "decision": {
            "description": "Merchant's decision\n\nCan be one of:\n- `APPROVED`: Merchant's risk engine has approved the transaction.\n- `DECLINED`: Merchant's risk engine has declined the transaction.\n- `UNAVAILABLE`: Merchant's risk engine was unavailable to give a decision.\n- `HELD`: Merchant’s risk engine has placed the transaction on hold\n",
            "type": "string",
            "enum": [
              "APPROVED",
              "DECLINED",
              "UNAVAILABLE",
              "HELD"
            ],
            "example": "APPROVED"
          },
          "code": {
            "description": "The response code returned by the engine.",
            "type": "string"
          },
          "message": {
            "description": "Message returned by the engine.",
            "type": "string"
          },
          "retryable": {
            "description": "Indicates whether transaction can be amended and retried.",
            "type": "boolean",
            "example": true
          },
          "transactionId": {
            "description": "Transaction identifier returned by the Merchant risk engine.",
            "type": "string"
          },
          "rawResponse": {
            "$ref": "#/components/schemas/RawResponse"
          }
        }
      },
      "PaymentStatus": {
        "type": "string",
        "description": "Status of the payment. See [Transaction Statuses](https://docs.br-dge.io/docs/transaction-statuses) for further detail.\n",
        "example": "CAPTURED",
        "enum": [
          "AUTHORIZED",
          "AUTHORIZATION_DECLINED",
          "AUTHORIZATION_PENDING",
          "CAPTURED",
          "CAPTURE_FAILED",
          "CAPTURE_PENDING",
          "EXPIRED",
          "REJECTED",
          "VOIDED",
          "VOID_PENDING",
          "VOID_FAILED",
          "BLOCKED",
          "UNKNOWN"
        ]
      },
      "PaymentResponsePaymentInstrument": {
        "description": "The obfuscated details of a Payment Instrument.\nCan be one of many different instrument types.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentResponseCard"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseTokenized"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseApplePay"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseGooglePay"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseIssuerResponse"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "card": "#/components/schemas/PaymentResponseCard",
            "tokenized": "#/components/schemas/PaymentResponseTokenized",
            "applePay": "#/components/schemas/PaymentResponseApplePay",
            "googlePay": "#/components/schemas/PaymentResponseGooglePay",
            "issuerResponse": "#/components/schemas/PaymentResponseIssuerResponse"
          }
        }
      },
      "PaymentResponseCard": {
        "description": "The obfuscated details of a Card Payment Instrument.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentResponsePaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/DetailsOfAssociatedCardPaymentInstrument"
          }
        ]
      },
      "PaymentResponseTokenized": {
        "description": "The obfuscated details of a Tokenized Payment Instrument.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentResponsePaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/DetailsOfAssociatedCardPaymentInstrument"
          }
        ]
      },
      "PaymentResponseApplePay": {
        "description": "The obfuscated details of a Apple Pay Payment Instrument.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentResponsePaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/ApplePayDetails"
          }
        ]
      },
      "PaymentResponseGooglePay": {
        "description": "The obfuscated details of a Google Pay Payment Instrument.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentResponsePaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/GooglePayDetails"
          }
        ]
      },
      "PaymentResponseIssuerResponse": {
        "description": "Raw Issuer Details.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasePaymentResponsePaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/IssuerResponseDetails"
          }
        ]
      },
      "IssuerResponse": {
        "description": "BR-DGE allows you to directly access the original responses from card issuers for transactions processed through [payment processors] that offer the \"Card Issuer Raw Responses\" feature.\n\n[payment processors]: https://docs.br-dge.io/docs/psp-integrations\n",
        "type": "object",
        "properties": {
          "issuerPaymentMethod": {
            "description": "MASTERCARD, VISA, etc",
            "type": "string",
            "example": "VISA_DEBIT-SSL"
          },
          "issuerCardType": {
            "description": "The payment card type",
            "type": "string",
            "example": "debitcard"
          },
          "merchantAdviceCode": {
            "description": "Merchant Advice",
            "type": "string",
            "example": "retry_later"
          },
          "type": {
            "description": "This field is unnecessary and will be removed.\n\n\nDEPRECATED: Do not use, it contains no useful information.\n",
            "deprecated": true,
            "type": "string"
          },
          "issuerResponse": {
            "description": "This field provides duplicate Details from the issuer, already available on the same level.\n\n\nDEPRECATED: Do not use, all the relevant fields are available on the same level as this object.\n",
            "deprecated": true,
            "type": "object",
            "properties": {
              "issuerPaymentMethod": {
                "description": "MASTERCARD, VISA, etc\n\n\nDEPRECATED: The same information should be accessed from one level up.\n",
                "deprecated": true,
                "type": "string",
                "example": "VISA_DEBIT-SSL"
              },
              "issuerCardType": {
                "description": "The payment card type\n\n\nDEPRECATED: The same information should be accessed from one level up.\n",
                "deprecated": true,
                "type": "string",
                "example": "debitcard"
              },
              "merchantAdviceCode": {
                "description": "Merchant Advice\n\n\nDEPRECATED: The same information should be accessed from one level up.\n",
                "deprecated": true,
                "type": "string",
                "example": "retry_later"
              }
            }
          }
        }
      },
      "BasePaymentResponsePaymentInstrument": {
        "description": "General fields which are valid for a payment instrument.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `PaymentInstrument` schema."
          }
        }
      },
      "IssuerResponseDetails": {
        "description": "Raw Issuer Details",
        "type": "object",
        "properties": {
          "issuerResponse": {
            "$ref": "#/components/schemas/IssuerResponse"
          }
        }
      },
      "DetailsOfAssociatedCardPaymentInstrument": {
        "type": "object",
        "description": "Reusable details which can be returned on various card payment instrument backed payment instrument types. All details which are returned here are considered obfuscated.\n",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/CardMetadata"
          },
          "expiryDate": {
            "$ref": "#/components/schemas/CardExpiryDate"
          },
          "fingerprint": {
            "$ref": "#/components/schemas/Fingerprint"
          },
          "fingerprintExtended": {
            "$ref": "#/components/schemas/FingerprintExtended"
          }
        }
      },
      "CardMetadata": {
        "type": "object",
        "description": "If a card payment instrument is used then BR-DGE may be able to provide metadata about the card\n\n**Please note: All text will be UPPERCASE and all fields can be null**\n",
        "properties": {
          "cardBrand": {
            "type": "string",
            "example": "MASTERCARD",
            "description": "MASTERCARD, VISA, etc"
          },
          "issuer": {
            "type": "string",
            "description": "Name of issuing bank"
          },
          "type": {
            "type": "string",
            "enum": [
              "DEBIT",
              "CREDIT",
              "CHARGE_CARD",
              "CHARGE",
              "DEFERRED_DEBIT",
              "PREPAID",
              "PREPAID_RELOADABLE",
              "UNKNOWN"
            ]
          },
          "category": {
            "type": "string",
            "example": "CLASSIC",
            "description": "CLASSIC, BUSINESS, MIXED_PRODUCT, etc"
          },
          "countryIsoA2": {
            "$ref": "#/components/schemas/CountryIsoCode"
          },
          "commercial": {
            "type": "boolean",
            "description": "Indicates if the card is corporate or retail",
            "example": true
          },
          "bin": {
            "type": "string",
            "description": "The Bank Identification Number that identifies the bank or financial institution that issued the card",
            "example": "48321456",
            "pattern": "^[0-9]+$",
            "minLength": 6,
            "maxLength": 8
          }
        }
      },
      "CardExpiryDate": {
        "type": "string",
        "example": "05-25",
        "description": "Card expiry date in MM-YY format.\n"
      },
      "Fingerprint": {
        "type": "string",
        "description": "A unique token that can be used to detect if two BR-DGE tokens represent the same underlying Payment Instrument.\n",
        "example": "63c8563d876b993878e1b5506b5fc5826e9e46266daaadac018a71ed307748c6"
      },
      "FingerprintExtended": {
        "type": "string",
        "description": "A fingerprint with card expiry date appended in MMYY format.\n"
      },
      "ApplePayDetails": {
        "description": "Additional information about Apple Pay Payment Instruments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DetailsOfAssociatedCardPaymentInstrument"
          },
          {
            "type": "object",
            "description": "Decrypted Apple Pay information and card metadata\n",
            "properties": {
              "decryptedPayload": {
                "$ref": "#/components/schemas/ApplePayDecryptedPayload"
              },
              "paymentMethod": {
                "$ref": "#/components/schemas/ApplePayPaymentMethod"
              }
            }
          }
        ]
      },
      "GooglePayDetails": {
        "description": "Additional information about Google Pay Payment Instruments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DetailsOfAssociatedCardPaymentInstrument"
          },
          {
            "type": "object",
            "description": "Decrypted Google Pay information and card metadata\n",
            "properties": {
              "decryptedPayload": {
                "$ref": "#/components/schemas/GooglePayDecryptedPayload"
              }
            }
          }
        ]
      },
      "GooglePayDecryptedPayload": {
        "type": "object",
        "description": "[Google Pay decrypted payload] excluding sensitive fields, such as cryptogram\n\n[Google Pay decrypted payload]: https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#encrypted-message\n",
        "properties": {
          "gatewayMerchantId": {
            "type": "string",
            "example": "some-merchant-id",
            "description": "Google Pay gateway merchant ID."
          },
          "messageExpiration": {
            "type": "string",
            "example": "1650574736277",
            "description": "Date and time at which the message expires as UTC milliseconds since epoch.\n"
          },
          "messageId": {
            "type": "string",
            "example": "AH2Ejtc88ZHJ-2aYBQWzHwvp6l0JsCHgxVt8s91A-ZUikaXNbcjsFm6gg9ExeVR-jzIyT-mJvA_ntvfRsDDOH2jnKMjdTtXIJvPt0NBUU45R7-gnjxkx-sI0ldcWvbDHsV0735yFDbWk",
            "description": "A unique ID that identifies the message in case it needs to be revoked or located at a later time.\n"
          },
          "paymentMethod": {
            "type": "string",
            "example": "CARD",
            "enum": [
              "CARD"
            ],
            "description": "The type of the payment credential. Currently, only CARD is supported.\n"
          },
          "paymentMethodDetails": {
            "$ref": "#/components/schemas/GooglePayDecryptedPaymentMethodDetails"
          }
        }
      },
      "GooglePayDecryptedPaymentMethodDetails": {
        "type": "object",
        "description": "The Google Pay payment credential, excluding cryptogram.",
        "properties": {
          "pan": {
            "type": "string",
            "example": "####-####-####-4444",
            "description": "The personal account number of the card that the Google Pay token relates to.\nThe value of this field depends on the value of `authMethod`.\n  - If authMethod is PAN_ONLY:\n    - This is an obfuscated PAN, where only the last 4 digits are present.\n  - If authMethod is CRYPTOGRAM_3DS:\n    - This is the full DPAN value generated by Google Pay.\n"
          },
          "expirationMonth": {
            "type": "integer",
            "example": 5,
            "description": "The expiration month of the card, where 1 represents January, 2 represents February, and so on."
          },
          "expirationYear": {
            "type": "integer",
            "example": 2025,
            "description": "The four-digit expiration year of the card, such as 2020."
          },
          "authMethod": {
            "type": "string",
            "example": "PAN_ONLY",
            "description": "The authentication method of the card transaction.",
            "enum": [
              "PAN_ONLY",
              "CRYPTOGRAM_3DS"
            ]
          },
          "eciIndicator": {
            "type": "string",
            "example": "07",
            "description": "This string isn’t always present. It returns only for authenticated device tokens transactions on Android (CRYPTOGRAM_3DS). This value must be passed down the payment processing flow.\n\nPossible values: \"\"(empty), 02, 06, 05, 07\n"
          },
          "assuranceDetails": {
            "$ref": "#/components/schemas/GooglePayDecryptedAssuranceDetails"
          },
          "cardLastFour": {
            "type": "string",
            "example": "4444",
            "description": "The last four digits of the PAN"
          }
        }
      },
      "GooglePayDecryptedAssuranceDetails": {
        "type": "object",
        "description": "This object provides information about the validation performed on the returned payment data.",
        "properties": {
          "accountVerified": {
            "type": "boolean",
            "description": "If true, indicates that Cardholder possession validation has been performed on returned payment credential.\n"
          },
          "cardholderAuthenticated": {
            "type": "boolean",
            "description": "If true, indicates that identification and verifications (ID&V) was performed on the returned payment credential.\n\nIf false, the same risk-based authentication can be performed as you would for card transactions. This risk-based authentication can include, but is not limited to, 3D-Secure authentication if applicable.\n"
          }
        }
      },
      "ApplePayDecryptedPayload": {
        "type": "object",
        "description": "[Apple Pay decrypted payload] excluding sensitive fields, such as cryptogram\n\n[Apple Pay decrypted payload]: https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/apple_pay/payment_token_format_reference#3949536\n",
        "required": [
          "applicationPrimaryAccountNumber",
          "applicationExpirationDate",
          "currencyCode",
          "transactionAmount",
          "deviceManufacturerIdentifier",
          "paymentDataType",
          "paymentData",
          "transactionId"
        ],
        "properties": {
          "applicationPrimaryAccountNumber": {
            "type": "string",
            "example": "4818528840216497",
            "description": "Device-specific account number of the card that funds this transaction"
          },
          "applicationExpirationDate": {
            "type": "string",
            "example": "281231",
            "description": "Card expiration date in the format YYMMDD"
          },
          "currencyCode": {
            "$ref": "#/components/schemas/CurrencyCodeNumeric"
          },
          "transactionAmount": {
            "example": 100,
            "type": "integer",
            "description": "Transaction amount in the lowest denomination of the given currency"
          },
          "deviceManufacturerIdentifier": {
            "example": "040010030273",
            "type": "string",
            "description": "Hex-encoded device manufacturer identifier"
          },
          "paymentDataType": {
            "example": "3DSecure",
            "type": "string",
            "description": "Transaction type.\n\nEMV relates to POS terminal transactions. 3D-Secure relates to ecommerce transactions.\n",
            "enum": [
              "3DSecure",
              "EMV"
            ]
          },
          "paymentData": {
            "$ref": "#/components/schemas/ApplePayDecryptedPaymentData"
          },
          "transactionId": {
            "example": "31675461ec268fed0ca9699e632753447d1a1de0aa65170e049033d7a801d3f3",
            "type": "string",
            "description": "Transaction identifier, generated on the device.\n\nRetrieved from [header] of decoded Apple Pay token.\n\n[header]: https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/apple_pay/payment_token_format_reference#3949539\n"
          },
          "cardholderName": {
            "type": "string",
            "example": "John Doe",
            "description": "Optional field containing cardholder's name if present"
          }
        }
      },
      "ApplePayDecryptedPaymentData": {
        "type": "object",
        "description": "Detailed payment data, excluding cryptogram",
        "properties": {
          "eciIndicator": {
            "type": "integer",
            "example": 7,
            "description": "Optional. ECI indicator, as defined by 3D-Secure.\n\nThe card network may add an ECI indicator to the payment data that the payment token includes.\n"
          }
        }
      },
      "ApplePayPaymentMethod": {
        "type": "object",
        "description": "Details from the `paymentMethod` section of the ApplePay token",
        "properties": {
          "displayName": {
            "type": "string",
            "example": "MasterCard 0839"
          },
          "network": {
            "type": "string",
            "example": "MasterCard"
          },
          "type": {
            "type": "string",
            "example": "credit"
          }
        }
      },
      "ClickToPayDetails": {
        "description": "Additional information about Click to Pay Payment Instruments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DetailsOfAssociatedCardPaymentInstrument"
          },
          {
            "type": "object",
            "description": "Decrypted Apple Pay information and card metadata\n",
            "properties": {
              "payload": {
                "$ref": "#/components/schemas/ClickToPayPayload"
              }
            }
          }
        ]
      },
      "ClickToPayPayload": {
        "type": "object",
        "description": "The Click to Pay payload contains the decrypted payload information as well as ECI indicator via the `assuranceData` object.\n",
        "properties": {
          "assuranceData": {
            "type": "object",
            "description": "The assurance data object contains the ECI indicator used in the payment.\n",
            "properties": {
              "eci": {
                "type": "string",
                "description": "The ECI indicator for the Click to Pay payment.\n"
              }
            }
          },
          "decryptedPayload": {
            "type": "object",
            "description": "The payload decrypted from the Click to Pay token used in the payment.\n",
            "properties": {
              "token": {
                "type": "object",
                "description": "The decrypted Click to Pay network token.\n",
                "properties": {
                  "paymentToken": {
                    "type": "string",
                    "description": "The DPAN from the decrypted Click to Pay network token.\n",
                    "example": "4123123412341234"
                  },
                  "tokenExpirationMonth": {
                    "type": "string",
                    "description": "The expiration month from the decrypted Click to Pay network token.\n",
                    "example": "11"
                  },
                  "tokenExpirationYear": {
                    "type": "string",
                    "description": "The expiration year from the decrypted Click to Pay network token.\n",
                    "example": "2027"
                  },
                  "paymentAccountReference": {
                    "type": "string",
                    "description": "The payment account reference (PAR) from the decrypted Click to Pay network token.\n",
                    "example": "PAR0987654321"
                  }
                }
              },
              "billingAddress": {
                "type": "object",
                "description": "The billing address within the Click to Pay payment.\n",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "John Doe"
                  },
                  "line1": {
                    "type": "string",
                    "example": "123 Test Town"
                  },
                  "line2": {
                    "type": "string",
                    "example": "Stanhope House"
                  },
                  "line3": {
                    "type": "string",
                    "example": "Haymarket"
                  },
                  "city": {
                    "type": "string",
                    "example": "Edinburgh"
                  },
                  "state": {
                    "type": "string",
                    "example": "Scotland"
                  },
                  "zip": {
                    "type": "string",
                    "example": "TE12ST"
                  },
                  "countryCode": {
                    "type": "string",
                    "example": "GB"
                  }
                }
              },
              "consumerFullName": {
                "type": "string",
                "description": "The full name of the customer from the decrypted Click to Pay token.\n",
                "example": "John Doe"
              },
              "consumerFirstName": {
                "type": "string",
                "description": "The first name of the customer from the decrypted Click to Pay token.\n",
                "example": "John"
              },
              "consumerLastName": {
                "type": "string",
                "description": "The last name of the customer from the decrypted Click to Pay token.\n",
                "example": "Doe"
              },
              "dynamicData": {
                "type": "array",
                "description": "The dynamic data array contains information such as the network token cryptogram to go with the DPAN.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "dynamicDataValue": {
                      "type": "string"
                    },
                    "dynamicDataType": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CountryIsoCode": {
        "type": "string",
        "description": "ISO 3166 Alpha-2 Country code",
        "example": "GB",
        "minLength": 2,
        "maxLength": 2,
        "pattern": "^[A-Z]+$"
      },
      "DateOfBirth": {
        "description": "Date of birth of the referenced person. While this field is not required by the BR-DGE API; it is highly recommended as some PSPs recommend the inclusion of this field. If you have any questions about whether you should provide customer date of birth, please raise a ticket with the [BR-DGE Support Centre](https://support.br-dge.io/support/home).\n",
        "type": "string",
        "format": "date",
        "example": "2024-02-24"
      },
      "PaymentSource": {
        "type": "object",
        "description": "Details of the PayPal account used to complete the payment for the PayPal Order.",
        "properties": {
          "name": {
            "type": "string",
            "example": "John Smith",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^([\\p{L}\\p{M} 0-9'\\[\\]()@?!\\-/.,_&*:;+=\\r\\n]*)$",
            "description": "Full name of customer."
          },
          "email": {
            "type": "string",
            "description": "Email address of the customer.",
            "minLength": 1,
            "maxLength": 254,
            "pattern": "^$|^[a-zA-Z0-9._%'+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
            "example": "john.smith@example.com"
          },
          "accountId": {
            "type": "string",
            "example": "QYR5Z8XDVJNXQ",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^([\\p{L}\\p{M} 0-9'\\[\\]()@?!\\-/.,_&*:;+=\\r\\n]*)$",
            "description": "PayPal account ID."
          },
          "vaultId": {
            "$ref": "#/components/schemas/VaultId"
          }
        }
      },
      "VaultId": {
        "type": "string",
        "example": "0tb28273r6584005e",
        "minLength": 1,
        "maxLength": 255,
        "description": "Vault ID generated by PayPal referring to the customer's stored PayPal wallet."
      },
      "CustomMetadata": {
        "title": "Custom Metadata for the transaction.",
        "description": "Optional custom metadata string fields for the transaction.\n\nUp to 25 fields can be included with the following constraints:\n\nThe field name may not be empty or have leading or trailing whitespace, and can consist of upper and lowercase letters, numbers, space, underscore \"_\", hyphen \"-\" and single quote \"'\".\n\nMaximum string length of either field name and field value is 200 chars.\n",
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "maxLength": 200,
          "nullable": false
        },
        "maxProperties": 25,
        "example": {
          "accountAge": "2",
          "transactionType": "Other"
        }
      },
      "BuildingNumberOrName": {
        "description": "The building number or name.\n\nProviding a building number or name separate from `address1` is recommended as\nsome payment service provider (PSP) APIs have a separate field.\n\nIf you are unsure whether you need to collect this data, please raise a\nticket with support on the BR-DGE Support Portal at\n<https://docs.br-dge.io/docs/support#contact-support>.\n\nPlease use only letters, spaces and these symbols: `-'.`",
        "type": "string",
        "maxLength": 100,
        "example": "10a"
      },
      "AddressLineOne": {
        "description": "First line of the address.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`",
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "example": "Flat 1"
      },
      "AddressLineTwo": {
        "description": "Second line of the address.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`",
        "type": "string",
        "maxLength": 255,
        "example": "Victoria House"
      },
      "AddressLineThree": {
        "description": "Third line of the address.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`",
        "type": "string",
        "maxLength": 255,
        "example": "15 Apple Street"
      },
      "Town": {
        "description": "Town of the address.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`",
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "example": "Edinburgh"
      },
      "County": {
        "description": "County of the address.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`",
        "type": "string",
        "maxLength": 255,
        "example": "Lothian"
      },
      "Postcode": {
        "description": "Postcode of the address.\n\nPlease use at least one and no more than 9 alphanumeric characters (excl. spaces).",
        "type": "string",
        "maxLength": 255,
        "example": "BH23 6AA"
      },
      "PhoneNumber": {
        "maxLength": 255,
        "pattern": "^$|^[+]?[(0-9][0-9 ()-]*[0-9]$",
        "type": "string",
        "description": "Telephone number of the occupant\nPlease use only numbers, spaces and an optional leading +.",
        "example": "+44 123 1110000"
      },
      "CvvResult": {
        "title": "CVV Result",
        "type": "object",
        "description": "Information about the CVV (Card Verification Value) result.\n",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "M",
              "N",
              "S",
              "P",
              "C",
              "U",
              "X",
              "Z"
            ],
            "description": "The CVV (Card Verification Value) result code.\n\n| CVV Code | Meaning                            |\n|----------|------------------------------------|\n| M        | Match                              |\n| N        | No Match                           |\n| S        | Not Supplied                       |\n| P        | Not Processed                      |\n| C        | Not Sent                           |\n| U        | Issuer Not Certified               |\n| X        | No Response / Provider Unavailable |\n| Z        | Unknown                            |\n",
            "example": "M"
          }
        }
      },
      "AvsResult": {
        "title": "AVS Result",
        "type": "object",
        "description": "Information about the AVS (Address Verification Service) result.\n",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "H",
              "I",
              "J",
              "K",
              "L",
              "M",
              "N",
              "O",
              "P",
              "Q"
            ],
            "description": "The AVS (Address Verification Service) result code.\n\n| AVS Code | Meaning                                                       |\n|----------|---------------------------------------------------------------|\n| A        | Postal code matches, street address matches.                  |\n| B        | Postal code matches, street address not checked.              |\n| C        | Postal code matches, street address does not match.           |\n| D        | Postal code not checked, street address matches.              |\n| E        | Postal code does not match, street address matches.           |\n| F        | Postal code not checked, street address not checked.          |\n| G        | Postal code not checked, street address does not match.       |\n| H        | Postal code does not match, street address not checked.       |\n| I        | Both postal code and street address do not match.             |\n| J        | Both postal code and street address were not provided.        |\n| K        | AVS is unavailable.                                           |\n| L        | Postal code was not provided, street address was not checked. |\n| M        | Postal code was not provided, street address matches.         |\n| N        | Postal code was not provided, street address does not match.  |\n| O        | Postal code was not checked, street address was not provided. |\n| P        | Postal code matches, street address was not provided.         |\n| Q        | Postal code does not match, street address was not provided.  |\n",
            "example": "I"
          },
          "message": {
            "type": "string",
            "description": "A human readable meaning behind the AVS code specified in the `code` field.\n"
          }
        }
      },
      "ScaDetails": {
        "type": "object",
        "description": "Contains Strong Customer Authentication (SCA) details about the outcome of any 3DS process the payment went through.\n\nNote: this field is now deprecated, and `authentication.result.eci` should be used instead.\n",
        "deprecated": true,
        "properties": {
          "eci": {
            "$ref": "#/components/schemas/Eci"
          }
        }
      },
      "Eci": {
        "type": "string",
        "example": "05",
        "description": "The Electronic Commerce Indicator (ECI) value that indicates the 3DS authentication level",
        "pattern": "^[0-9]+$",
        "minLength": 2,
        "maxLength": 2
      },
      "Authentication": {
        "type": "object",
        "description": "3-D Secure details for the payment. `result` is only returned once the payment status is not `AUTHORIZATION_PENDING`.\n",
        "properties": {
          "requested": {
            "$ref": "#/components/schemas/AuthenticationRequested"
          },
          "result": {
            "$ref": "#/components/schemas/AuthenticationResult"
          }
        }
      },
      "AuthenticationRequested": {
        "type": "object",
        "description": "The 3-D Secure options requested for the payment.",
        "properties": {
          "threeDSecureRequired": {
            "type": "boolean",
            "description": "Whether 3-D Secure was requested.",
            "example": true
          },
          "challengeRequested": {
            "type": "boolean",
            "description": "Whether a 3-D Secure challenge was requested.",
            "example": false
          },
          "automaticallyStepUp": {
            "type": "boolean",
            "description": "Whether the payment was set to retry with 3-D Secure if the PSP asked for it.",
            "example": false
          }
        }
      },
      "AuthenticationResult": {
        "type": "object",
        "description": "The outcome of 3-D Secure authentication, as reported by the PSP.",
        "properties": {
          "enrollmentStatus": {
            "type": "string",
            "enum": [
              "ENROLLED",
              "NOT_ENROLLED",
              "UNKNOWN"
            ],
            "description": "Whether the card is enrolled in 3-D Secure.\n\n| Value        | Meaning                                                 |\n|--------------|---------------------------------------------------------|\n| ENROLLED     | The card is enrolled in 3-D Secure.                     |\n| NOT_ENROLLED | The card is not enrolled in 3-D Secure.                 |\n| UNKNOWN      | The PSP could not confirm whether the card is enrolled. |\n",
            "example": "ENROLLED"
          },
          "transStatus": {
            "type": "string",
            "enum": [
              "Y",
              "N",
              "U",
              "A",
              "C",
              "D",
              "R",
              "I",
              "S"
            ],
            "description": "The 3-D Secure authentication status, as defined by EMVCo.\n\n| Status | Meaning                                                   |\n|--------|-----------------------------------------------------------|\n| Y      | Authentication successful.                                |\n| N      | Not authenticated. Transaction denied.                    |\n| U      | Authentication could not be performed.                    |\n| A      | Attempts processing performed. Proof of attempt provided. |\n| C      | Challenge required.                                       |\n| D      | Challenge required. Decoupled authentication confirmed.   |\n| R      | Authentication rejected. Do not attempt authorisation.    |\n| I      | Informational only. Challenge preference acknowledged.    |\n| S      | Challenge using Secure Payment Confirmation (SPC).        |\n",
            "example": "Y"
          },
          "flow": {
            "type": "string",
            "enum": [
              "FRICTIONLESS",
              "CHALLENGE"
            ],
            "description": "Whether the cardholder was challenged.\n\n| Value        | Meaning                                                  |\n|--------------|----------------------------------------------------------|\n| FRICTIONLESS | Authentication completed without a cardholder challenge. |\n| CHALLENGE    | The cardholder was challenged.                           |\n",
            "example": "FRICTIONLESS"
          },
          "version": {
            "type": "string",
            "description": "The 3-D Secure version used.",
            "example": "2.2.0"
          },
          "eci": {
            "$ref": "#/components/schemas/Eci"
          }
        }
      },
      "AuthorizationCode": {
        "type": "string",
        "description": "The code provided by the PSP in response to a successfully authorized payment.",
        "example": "123456"
      },
      "BlockingRule": {
        "description": "The routing rule which resulted in the transaction being blocked.",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The name of the rule",
            "type": "string"
          }
        }
      },
      "MerchantTransactionId": {
        "type": "string",
        "description": "Your unique identifier that can be used when a connection issue occurs and you don't receive a paymentId. This is an optional field that can be used when querying `GET v1/payments`, `GET v1/payouts` or `GET v1/payments/{paymentId}/refunds`. We will validate the uniqueness of the merchantTransactionId value per retail channel. If a payment/payout/refund is created with merchantTransactionId `abc`, no other payment/payout/refund can be created with `abc`.\n\nThe merchantTransactionId is a contract between BR-DGE and a merchant. This field will not be mapped downstream to any PSP.\n\nIn the event that you provide a merchantTransactionId in the second (or third) leg of a 3DS payment, we will ignore this value and will only use the value provided in the initial request.",
        "example": "yourUniqueRequestId",
        "minLength": 1,
        "maxLength": 50
      },
      "CustomerId": {
        "title": "Customer ID",
        "description": "The ID of the customer in your system.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
        "type": "string",
        "maxLength": 255,
        "example": "Customer001"
      },
      "PspName": {
        "description": "Name of Payment Service Provider (PSPs).\n\nPlease see [PSP Integrations] for a list of possible PSPs.\n\n[PSP Integrations]: https://docs.br-dge.io/docs/psp-integrations\n",
        "type": "string",
        "pattern": "^[A-Za-z0-9\\- ().]*$",
        "maxLength": 50,
        "example": "Checkout.com"
      },
      "IpAddress": {
        "pattern": "^$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|::(ffff(:0{1,4})?:)?((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$",
        "type": "string",
        "description": "IP address of the customer (IPv4 or IPv6)",
        "example": "123.100.100.200"
      },
      "PaysafecardAdditionalInfo": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema."
          },
          "customerFirstName": {
            "type": "string",
            "description": "Customer's first name",
            "example": "John"
          },
          "customerLastName": {
            "type": "string",
            "description": "Customer's last name",
            "example": "Smith"
          },
          "customerDateOfBirth": {
            "type": "string",
            "format": "date",
            "description": "Customer's date of birth",
            "example": "2000-01-01"
          },
          "customerIpAddress": {
            "$ref": "#/components/schemas/IpAddress"
          },
          "customerId": {
            "type": "string",
            "description": "The ID of the customer in your system.",
            "example": "de5d7b4a-9410-40e1-85fd-8ceee23c9fd0"
          },
          "paysafecardCustomerId": {
            "type": "string",
            "description": "Paysafecard identifier for the customer",
            "example": "151743187547"
          }
        }
      },
      "EasyPayAdditionalInfo": {
        "required": [
          "type"
        ],
        "allOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema.",
                "example": "EasyPay"
              },
              "customerPaymentOptionId": {
                "type": "string",
                "description": "Identifier for the customer Payment Option",
                "example": "6418da68-0b3d-4409-ab14-1ceb752b0b1f"
              }
            }
          }
        ]
      },
      "ePayBgAdditionalInfo": {
        "required": [
          "type"
        ],
        "allOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema.",
                "example": "ePay.bg"
              },
              "customerPaymentOptionId": {
                "type": "string",
                "description": "Identifier for the customer Payment Option",
                "example": "6418da68-0b3d-4409-ab14-1ceb752b0b1f"
              }
            }
          }
        ]
      },
      "TrueLayerCustomer": {
        "type": "object",
        "description": "Contains TrueLayer customer information.\n",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "dateOfBirth": {
            "$ref": "#/components/schemas/DateOfBirth"
          },
          "customerId": {
            "type": "string",
            "description": "The ID of the customer in TrueLayer's system",
            "example": "de5d7b4a-9410-40e1-85fd-8ceee23c9fd0"
          },
          "name": {
            "type": "string",
            "description": "Customer's full name",
            "example": "John Smith"
          }
        }
      },
      "AccountNumber": {
        "type": "string",
        "description": "8 digit bank account number.",
        "example": "26207729",
        "pattern": "^[0-9]{8}$"
      },
      "SortCode": {
        "type": "string",
        "description": "6 digit sort code (no spaces or dashes).",
        "example": "400040",
        "pattern": "^[0-9]{6}$"
      },
      "Iban": {
        "type": "string",
        "description": "Valid ISO 13616 International Bank Account Number (no spaces). Consists of a 2 letter country code, followed by 2 check digits, and then by up to 30 alphanumeric characters (also known as the BBAN).\n",
        "example": "GB32CLRB04066800012315",
        "minLength": 15,
        "maxLength": 34,
        "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$"
      },
      "TrueLayerAdditionalInfo": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema."
          },
          "customer": {
            "$ref": "#/components/schemas/TrueLayerCustomer"
          },
          "providerId": {
            "type": "string",
            "description": "ID of the bank or other financial institution used in this payment in TrueLayer's system",
            "example": "mock-payments-gb-redirect"
          },
          "paymentSourceId": {
            "type": "string",
            "description": "ID of the customer's payment source used to perform the payment in TrueLayer's system",
            "example": "1f111d3c-9427-43be-1111-1111219d111c"
          },
          "originalTransactionId": {
            "type": "string"
          },
          "accountNumber": {
            "$ref": "#/components/schemas/AccountNumber"
          },
          "sortCode": {
            "$ref": "#/components/schemas/SortCode"
          },
          "iban": {
            "$ref": "#/components/schemas/Iban"
          }
        }
      },
      "RevolutFingerprint": {
        "type": "string",
        "minLength": 44,
        "maxLength": 44,
        "description": "The fingerprint associated to the authorized order's payment method",
        "example": "AoJYD3lVDidRE9RyUHDGmKakQ8lpDnSMtRFUjqyLzZU="
      },
      "RevolutPayBillingAddress": {
        "type": "object",
        "properties": {
          "street_line_1": {
            "type": "string",
            "maxLength": 100,
            "description": "First line of street address information for Revolut customer."
          },
          "street_line_2": {
            "type": "string",
            "maxLength": 100,
            "description": "Second line of street address information for Revolut customer.."
          },
          "region": {
            "type": "string",
            "maxLength": 100,
            "description": "The region associated with the address."
          },
          "city": {
            "type": "string",
            "maxLength": 100,
            "description": "The region associated with the address."
          },
          "country_code": {
            "type": "string",
            "maxLength": 2,
            "description": "2 letter country code of the country associated with the address."
          },
          "postcode": {
            "type": "string",
            "maxLength": 100,
            "description": "The postcode associated with the address."
          }
        }
      },
      "RevolutPayAdditionalInfo": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema."
          },
          "fingerprint": {
            "$ref": "#/components/schemas/RevolutFingerprint"
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "description": "The name of the revolut customer.",
            "example": "Jimmy McShuggle"
          },
          "emailAddress": {
            "type": "string",
            "minLength": 2,
            "description": "The email address of the revolut customer",
            "example": "jim@test.com"
          },
          "paymentRevTag": {
            "type": "string",
            "minLength": 2,
            "description": "Unique handle for a Revolut customer.",
            "example": "xyzed7xn"
          },
          "revolutCustomerId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier for the revolut customer.",
            "example": "44773429-8b07-4973-b9de-3d308e86b955"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/RevolutPayBillingAddress"
          }
        }
      },
      "PayPalAdditionalInfo": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema."
          },
          "vaultId": {
            "$ref": "#/components/schemas/VaultId"
          },
          "paymentSource": {
            "$ref": "#/components/schemas/PaymentSource"
          }
        }
      },
      "OttPayoutsAdditionalInfo": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the `AdditionalInfo` schema."
          },
          "pin": {
            "type": "string",
            "description": "voucher pin",
            "maxLength": 12,
            "pattern": "^[0-9]*$",
            "example": "464828964739"
          },
          "serialNumber": {
            "type": "string",
            "description": "voucher serial number",
            "maxLength": 12,
            "pattern": "^[0-9]*$",
            "example": "300003849616"
          }
        }
      },
      "AdditionalInfo": {
        "type": "object",
        "description": "Any additional information returned from interaction with PSP",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaysafecardAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/EasyPayAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/ePayBgAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/TrueLayerAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/RevolutPayAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/PayPalAdditionalInfo"
          },
          {
            "$ref": "#/components/schemas/OttPayoutsAdditionalInfo"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "paysafecard": "#/components/schemas/PaysafecardAdditionalInfo",
            "EasyPay": "#/components/schemas/EasyPayAdditionalInfo",
            "ePayBg": "#/components/schemas/ePayBgAdditionalInfo",
            "truelayer": "#/components/schemas/TrueLayerAdditionalInfo",
            "revolutPay": "#/components/schemas/RevolutPayAdditionalInfo",
            "payPal": "#/components/schemas/PayPalAdditionalInfo",
            "ottPayout": "#/components/schemas/OttPayoutsAdditionalInfo"
          }
        }
      },
      "RawResponse": {
        "description": "Contains a single http response.\n",
        "type": "object",
        "properties": {
          "httpStatusCode": {
            "description": "The http response code for the given call to the external system\n",
            "type": "integer",
            "example": 200
          },
          "body": {
            "description": "The response body of the http request to the external system. This is the raw response with sensitive data redacted.  We make no guarantees about the format of this field. It is psp dependant. The majority of these responses are in `application/json` but note for certain types of error response they may be `text/html` or `application/xml`\n",
            "type": "string"
          }
        }
      },
      "RawPspResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RawResponse"
          },
          {
            "description": "Contains a single http response from the PSP the transaction was routed to\n",
            "type": "object",
            "required": [
              "pspName"
            ],
            "properties": {
              "pspName": {
                "$ref": "#/components/schemas/PspName"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": "A key/value map of the http headers from the external system.",
                "example": {
                  "content-type": [
                    "application/json"
                  ]
                }
              }
            }
          }
        ]
      },
      "PspInfo": {
        "type": "object",
        "required": [
          "name",
          "transactionId"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/PspName"
          },
          "transactionId": {
            "type": "string",
            "description": "Identifier provided by the PSP this payment was routed to.\n",
            "example": "6418da68-0b3d-4409-ab14-1ceb752b0b1f"
          },
          "switchAccountId": {
            "type": "string",
            "description": "Internal switch account identifier for the PSP account that was used to perform the transaction. This is an internally-assigned identifier, not a value provided by the PSP.\nPlease note: PSP account switching feature is still under development and this field is not present in GET responses and notifications yet.\n",
            "minLength": 1,
            "maxLength": 255,
            "example": "switch-account-123"
          },
          "pspToken": {
            "type": "string",
            "description": "The token created by the PSP for the payment instrument.\n"
          },
          "pspCardFingerprint": {
            "type": "string",
            "description": "The PSP fingerprint for the payment instrument.\n"
          },
          "provisionedUserId": {
            "type": "string",
            "description": "PSP-specific user ID that was provisioned by the PSP when processing the payment.\n",
            "example": "Vx0H4pdAtPCz"
          },
          "additionalInfo": {
            "$ref": "#/components/schemas/AdditionalInfo"
          },
          "rawPspResponses": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/RawPspResponse"
            }
          },
          "paymentAccountReference": {
            "type": "string",
            "description": "The Payment Account Reference (PAR) linked the the payment-instrument, if available. See our [dedicated PAR guide](https://docs.br-dge.io/docs/payment-account-reference) for more info."
          }
        }
      },
      "RelationshipIdentifier": {
        "description": "An included relationship, will include the lookup information and the\nattributes related to that inclusion.\n",
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "id": {
            "description": "The identifier for the specified relation.",
            "type": "string"
          },
          "type": {
            "description": "The resource type which is applicable for an entity.",
            "type": "string"
          }
        }
      },
      "RelationshipEntity": {
        "description": "A schema which provides the relationships which are applicable for the\ncurrent entity.\n\nThese relationship entities particularly provide the information\nrequired to lookup entities which have been included in the request\nusing the pattern equivelent to [JSON:API Inclusion of Related\nResources].\n\n[JSON:API Inclusion of Related Resources]: https://jsonapi.org/format/1.1/#fetching-includes\n",
        "type": "object",
        "properties": {
          "relationships": {
            "description": "A map of a specified relation to the identifiable information for\nthat relation.\nThe key of the map is the requested relation information from the\ninclude parameter.\n",
            "type": "object",
            "additionalProperties": {
              "description": "The relationship details for a specific relation.\n\nThis provides the lookup information which can be used to find\nthe included component in `included` on the root of the\nresponse.\n",
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/RelationshipIdentifier"
                }
              }
            }
          }
        }
      },
      "CurrencyCodeNumeric": {
        "example": "826",
        "type": "string",
        "description": "ISO 4217 numeric currency code, as a string to preserve leading zeros"
      },
      "IncludedRelationshipsItemPaymentInstrument": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "attributes": {
                "$ref": "#/components/schemas/PaymentResponsePaymentInstrument"
              }
            }
          },
          {
            "$ref": "#/components/schemas/RelationshipIdentifier"
          }
        ]
      },
      "IncludedRelationshipsItemIssuerResponse": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "attributes": {
                "$ref": "#/components/schemas/IssuerResponse"
              }
            }
          },
          {
            "$ref": "#/components/schemas/RelationshipIdentifier"
          }
        ]
      },
      "IncludedRelationshipsItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/IncludedRelationshipsItemPaymentInstrument"
          },
          {
            "$ref": "#/components/schemas/IncludedRelationshipsItemIssuerResponse"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "paymentInstrument": "#/components/schemas/IncludedRelationshipsItemPaymentInstrument",
            "issuerResponse": "#/components/schemas/IncludedRelationshipsItemIssuerResponse"
          }
        }
      },
      "IncludedRelationships": {
        "description": "This returns a list of included relationships.\nThis should only be included on the root of the response.\n",
        "type": "object",
        "properties": {
          "included": {
            "description": "A list of included relationships, where applicable these can be\nincluded via the include parameter.\n\nThis conforms to [JSON:API Compound Documents].\n\n[JSON:API Compound Documents]: https://jsonapi.org/format/1.1/#document-compound-documents\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncludedRelationshipsItem"
            }
          }
        }
      },
      "TrustlyAccount": {
        "type": "object",
        "description": "Contains Trustly account information.\n",
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Trustly's unique ID for this bank account.",
            "example": "1234567890"
          },
          "bank": {
            "type": "string",
            "description": "The bank for this account.",
            "example": "Barclays"
          },
          "town": {
            "type": "string",
            "description": "The town of the account holder.",
            "example": "PaloAlto"
          },
          "name": {
            "type": "string",
            "description": "The name of the account holder.",
            "example": "John Mockington"
          },
          "address": {
            "type": "string",
            "description": "The address of the account holder.",
            "example": "LincolnDrive"
          },
          "postcode": {
            "type": "string",
            "description": "The postcode of the account holder.",
            "example": "456"
          },
          "descriptor": {
            "type": "string",
            "description": "A text that is safe to show the end user for identifying the account.",
            "example": "**926819"
          },
          "lastDigits": {
            "type": "string",
            "description": "The last digits of the bank account number.",
            "example": "926819"
          },
          "clearingHouse": {
            "type": "string",
            "description": "The clearing house of the end user's bank account (i.e. the country where the bank account is held).\n",
            "example": "UNITED_KINGDOM"
          },
          "verified": {
            "type": "boolean",
            "description": "Whether the bank account has been verified."
          }
        }
      },
      "CashierId": {
        "title": "Cashier ID",
        "type": "string",
        "description": "For use by BR-DGE Cashier to link the transaction to a particular Cashier instance.",
        "example": "90e7aff7-7e57-459a-a46e-9258c8abc99b"
      },
      "PaymentRails": {
        "type": "string",
        "example": "EFTPOS",
        "description": "Payment rails are the systems and networks that are used to move funds between parties. Card networks can act as payment rails.\n\nThis field contains payment rails used for current payment.\n\n- EFTPOS - Australia's domestic debit card payments network\n- VISA - Visa international payment network\n- MASTERCARD - Mastercard international payment network\n",
        "enum": [
          "EFTPOS",
          "VISA",
          "MASTERCARD"
        ]
      },
      "AmountIncludingZero": {
        "title": "amount",
        "type": "integer",
        "format": "int64",
        "minimum": 0,
        "maximum": 999999999999999,
        "example": 1234,
        "description": "Amount in a currency to be used for the transaction.\nIn the lowest denomination of the currency of the payment.\nThis means that `1234` in GBP represents `£12.34`.\n"
      },
      "CurrencyCode": {
        "type": "string",
        "description": "Currency code of the payment (ISO 4217)",
        "example": "GBP"
      },
      "ComcardeResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "[Response Code](https://docs.br-dge.io/docs/response-codes) signifying the outcome of the request.",
            "example": "1000"
          },
          "message": {
            "type": "string",
            "description": "A description of the outcome of the request."
          },
          "id": {
            "type": "string",
            "description": "The ID of this request. If you can include these when querying the outcome of individual requests, we can track down the root cause faster.\n",
            "example": "463ac35c9f6413ad48485a3953bb6124"
          }
        }
      },
      "ErrorResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ComcardeResponse"
          },
          {
            "type": "object",
            "properties": {
              "validationErrors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "An object that contains validation errors."
              }
            }
          }
        ]
      },
      "CustomerIdentifiers": {
        "type": "object",
        "properties": {
          "customerId": {
            "$ref": "#/components/schemas/CustomerId"
          }
        }
      },
      "KeyIdentifierId": {
        "type": "string",
        "description": "A unique id for a specific identifier, used in other operations to perform actions on the identifier.",
        "format": "uuid",
        "example": "dbc8231e-6b85-4955-93ce-938e25ad2f7a"
      },
      "KeyIdentifierValue": {
        "type": "string",
        "description": "The contents of a key identifier."
      },
      "GooglePay3DSCryptogramKeyIdentifiers": {
        "title": "Google Pay 3DS_CRYPTOGRAM Key Identifiers",
        "description": "Key identifiers for the 3DS_CRYPTOGRAM GooglePay payment instrument.",
        "type": "object",
        "required": [
          "type",
          "dpan"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field."
          },
          "dpan": {
            "type": "object",
            "description": "The DPAN (Device Primary Account Number) of the payment instrument.",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/KeyIdentifierId"
              },
              "value": {
                "$ref": "#/components/schemas/KeyIdentifierValue"
              }
            }
          }
        }
      },
      "GooglePayPanOnlyKeyIdentifiers": {
        "title": "Google Pay PAN_ONLY Key Identifiers",
        "description": "Key identifiers for the PAN_ONLY GooglePay payment instrument.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field."
          }
        }
      },
      "RevolutPayKeyIdentifiers": {
        "title": "Revolut Pay Key Identifiers",
        "description": "Key identifiers for the Revolut Pay payment instrument.",
        "type": "object",
        "required": [
          "type",
          "fingerprint"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field."
          },
          "fingerprint": {
            "type": "object",
            "description": "A unique identifier for a payment method with Revolut Pay.",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/KeyIdentifierId"
              },
              "value": {
                "$ref": "#/components/schemas/KeyIdentifierValue"
              }
            }
          }
        }
      },
      "PayPalKeyIdentifiers": {
        "title": "PayPal Key Identifiers",
        "description": "Key identifiers for the PayPal payment instrument.",
        "type": "object",
        "required": [
          "type",
          "accountId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field."
          },
          "accountId": {
            "type": "object",
            "description": "A unique identifier for a payment method with PayPal.",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/KeyIdentifierId"
              },
              "value": {
                "$ref": "#/components/schemas/KeyIdentifierValue"
              }
            }
          }
        }
      },
      "GenericKeyIdentifiers": {
        "title": "Generic Key Identifiers",
        "description": "Key Identifiers for all other payment instruments.",
        "type": "object",
        "required": [
          "type",
          "keyIdentifier"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field."
          },
          "keyIdentifier": {
            "type": "object",
            "description": "A unique identifier for a payment method.",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/KeyIdentifierId"
              },
              "value": {
                "$ref": "#/components/schemas/KeyIdentifierValue"
              }
            }
          }
        }
      },
      "PaymentInstrumentIdentifiers": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/GooglePay3DSCryptogramKeyIdentifiers"
          },
          {
            "$ref": "#/components/schemas/GooglePayPanOnlyKeyIdentifiers"
          },
          {
            "$ref": "#/components/schemas/RevolutPayKeyIdentifiers"
          },
          {
            "$ref": "#/components/schemas/PayPalKeyIdentifiers"
          },
          {
            "$ref": "#/components/schemas/GenericKeyIdentifiers"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "3DS_CRYPTOGRAM": "#/components/schemas/GooglePay3DSCryptogramKeyIdentifiers",
            "PAN_ONLY": "#/components/schemas/GooglePayPanOnlyKeyIdentifiers",
            "REVOLUT_PAY": "#/components/schemas/RevolutPayKeyIdentifiers",
            "PAYPAL_ACCOUNT": "#/components/schemas/PayPalKeyIdentifiers",
            "OTHER": "#/components/schemas/GenericKeyIdentifiers"
          }
        }
      },
      "KeyIdentifiers": {
        "type": "object",
        "description": "The associated key identifiers used during the transaction identifying the instrument and customer.",
        "properties": {
          "customerIdentifiers": {
            "$ref": "#/components/schemas/CustomerIdentifiers"
          },
          "paymentInstrumentIdentifiers": {
            "$ref": "#/components/schemas/PaymentInstrumentIdentifiers"
          }
        }
      }
    },
    "parameters": {
      "pathPaymentId": {
        "name": "paymentId",
        "in": "path",
        "description": "The unique identifier for the payment.\n\nThis can be sourced from the `paymentId` field in the response we sent to you when creating the payment or payout.\n",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        }
      }
    },
    "securitySchemes": {
      "ServerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Operations intended for use by Merchant servers.\n\n**IMPORTANT** This key allows you to perform sensitive operations such as authorizing payments and refunds.\n\n**Production Server API keys must not be accessible outside your organization.**\n"
      }
    },
    "examples": {
      "bad-request-with-validation-errors": {
        "description": "This example shows the [4030203] and [4030301] **Validation Errors**.\n\nA full list of possible validation errors are available [here].\n\n[4030203]: https://docs.br-dge.io/docs/validation-errors#4030203\n[4030301]: https://docs.br-dge.io/docs/validation-errors#4030301\n[here]: https://docs.br-dge.io/docs/validation-errors\n",
        "value": {
          "code": "4000",
          "message": "Invalid request",
          "id": "4fad8e2e06a15656",
          "validationErrors": {
            "paymentInstrument.pan": "4030203 - The value entered for Pan is incorrect. It is not a valid card PAN.",
            "paymentInstrument.expiryDate": "4030301 - Expiry Date cannot be blank."
          }
        }
      },
      "entity-not-found": {
        "summary": "Entity Not Found Error",
        "description": "This example shows the [4040 error code].\nThis occurs when an entity was not found for a given ID, the entity should be clear from context.\nA full list of possible response codes is available [here].\n\n[4040 error code]: https://docs.br-dge.io/docs/response-codes#4040\n[here]: https://docs.br-dge.io/docs/response-codes\n",
        "value": {
          "code": "4040",
          "message": "Entity not found",
          "id": "4fad8e2e06a15656"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request - the request was in an invalid format or contained invalid information.\n\nIf have any questions about why you are receiving these responses, please raise a ticket with support on the BR-DGE Support Portal at <https://docs.br-dge.io/docs/support#contact-support> with the `id` from the response so we track down the individual requests on our end.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "Bad request with validation errors": {
                "$ref": "#/components/examples/bad-request-with-validation-errors"
              }
            }
          }
        }
      },
      "UnauthorizedRequest": {
        "description": "Unauthorized request."
      },
      "UnknownServerError": {
        "description": "An internal server error occurred upstream while processing the request.\nIf you have any questions about why you are receiving these responses, please raise a ticket with support on the BR-DGE Support Portal at <https://docs.br-dge.io/docs/support#contact-support> with the ID from the response so we track down the individual requests on our end.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "Internal server error": {
                "description": "This example shows the [5001 error code].\n\nA full list of possible response codes is available [here].\n\n[5001 error code]: https://docs.br-dge.io/docs/response-codes#5001\n[here]: https://docs.br-dge.io/docs/response-codes\n",
                "value": {
                  "code": "5001",
                  "message": "Unexpected error",
                  "id": "4fad8e2e06a15656"
                }
              }
            }
          }
        }
      },
      "EntityNotFound": {
        "description": "The specified entity was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "entity-not-found": {
                "$ref": "#/components/examples/entity-not-found"
              }
            }
          }
        }
      }
    }
  }
}
```