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

# Create a PayPal Order

# 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": "PayPal",
      "description": "Perform payments using PayPal."
    }
  ],
  "externalDocs": {
    "url": "https://docs.br-dge.io"
  },
  "paths": {
    "/paypal/orders": {
      "post": {
        "tags": [
          "PayPal"
        ],
        "summary": "Create a PayPal Order",
        "operationId": "createPayPalOrderUsingPOST",
        "security": [
          {
            "ServerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The information provided here will be used to create a new order with PayPal.\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayPalOrderRequest"
              },
              "examples": {
                "Full Create PayPal Order Request": {
                  "description": "This example shows all potential fields used to create a PayPal order.\n",
                  "value": {
                    "amount": 1010,
                    "currencyCode": "GBP",
                    "intent": "capture",
                    "customerOrderCode": "ABC123",
                    "displayName": "Brand Name",
                    "locale": "en-GB",
                    "invoiceId": "987654321",
                    "enableShippingAddress": true,
                    "shippingAddressEditable": false,
                    "shippingAddressOverride": {
                      "address1": "Victoria House",
                      "address2": "15 Apple Street",
                      "town": "Edinburgh",
                      "county": "Lothian",
                      "postcode": "BH23 6AA",
                      "country": "GB",
                      "phoneNumber": "+44 123 1110000",
                      "recipientName": "John Smith",
                      "buildingNumberOrName": "Flat 1"
                    },
                    "lineItems": [
                      {
                        "name": "T-Shirt",
                        "description": "BR-DGE T-Shirt",
                        "quantity": 1,
                        "unitAmount": 1000,
                        "unitTax": 10
                      }
                    ],
                    "customer": {
                      "accountId": "123456789",
                      "firstName": "John",
                      "lastName": "Smith",
                      "email": "a@b.com",
                      "phoneNumber": "+44 123 1110000",
                      "country": "GB",
                      "creationTimestamp": "2012-12-09T19:14:55.277-0:00"
                    },
                    "ota": {
                      "type": "bus",
                      "serviceStartDate": "2012-12-09T19:14:55.277-0:00",
                      "serviceEndDate": "2012-12-09T19:14:55.277-0:00",
                      "changeGuest": false,
                      "startCountry": "GB",
                      "startCity": "Edinburgh",
                      "startPostcode": "BH23 6AA"
                    },
                    "customerIpAddress": "123.100.100.200",
                    "customerId": "8540b512-ef98-4ded-b6ff-53e78c3a3568"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order created. You can now redirect your customer to the provided URL.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayPalOrderResponse"
                },
                "example": {
                  "id": "4fad8e2e06a15656",
                  "code": "1000",
                  "message": "Order Created",
                  "orderId": "5O190127TN364715T",
                  "redirectUrl": "http://www.return.url",
                  "intent": "authorize",
                  "status": "CREATED",
                  "creationTimestamp": "2024-05-07T18:46:54Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedRequest"
          },
          "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"
          }
        }
      },
      "PayPalOrderRiskAssessments": {
        "description": "An optional map of risk assessment results received from risk engines.",
        "type": "object",
        "properties": {
          "merchant": {
            "$ref": "#/components/schemas/MerchantRiskAssessment"
          }
        }
      },
      "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"
          }
        }
      },
      "RiskInstruments": {
        "type": "object",
        "description": "Map of optional risk instrument objects which can be used to pass risk information to PSPs or risk engines\n",
        "properties": {
          "checkoutRiskJs": {
            "$ref": "#/components/schemas/CheckoutRiskJs"
          },
          "kount": {
            "$ref": "#/components/schemas/Kount"
          },
          "merchant": {
            "$ref": "#/components/schemas/Merchant"
          }
        }
      },
      "CheckoutRiskJs": {
        "description": "Risk instrument for Checkout's Risk.js product. Checkout's risk engine will also use the customer's IP address if available which can be provided via Payment.customerIpAddress\n",
        "type": "object",
        "required": [
          "deviceSessionId"
        ],
        "properties": {
          "deviceSessionId": {
            "type": "string",
            "description": "device_session_id token generated in Checkout's Risk.js package"
          }
        }
      },
      "Kount": {
        "description": "Risk instrument for Kount risk engine\n",
        "type": "object",
        "required": [
          "sessionId"
        ],
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "[Session ID] used in Kount's [Device Data Collector]\n\n[Session ID]: https://developer.kount.com/hc/en-us/sections/5319287642260-Integration-Guide?article=4411121644820\n[Device Data Collector]: https://developer.kount.com/hc/en-us/sections/5319287642260-Integration-Guide?article=4411121101844\n"
          }
        }
      },
      "Merchant": {
        "description": "Risk instrument for Merchant risk engine\n",
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "nullable": false,
          "maxProperties": 25,
          "description": "A map that contains key/value pairs representing data needed to call the Merchant risk engine\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 field name and of field value is 200 chars.\n\nFor more information contact [Customer Support]\n\n[Customer Support]: https://docs.br-dge.io/docs/support#contact-support\n"
        }
      },
      "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"
      },
      "CustomerOrderCode": {
        "description": "You may provide your own order code to be used in payments This is separate from the BR-DGE order.\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
        "type": "string",
        "minLength": 1,
        "maxLength": 50,
        "example": "ABC123"
      },
      "PayPalOrderRequest": {
        "type": "object",
        "required": [
          "amount",
          "currencyCode"
        ],
        "description": "Create PayPal Order request",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currencyCode": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "intent": {
            "type": "string",
            "default": "capture",
            "description": "By default payments against an order will be captured in a single step, but you can choose to split the authorization and the capture of the order.\n * `authorize` - if you intend to first authorize using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `authorize`\n   then capture the authorized payment using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `capture`\n * `capture` - If you intend to capture immediately using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `capture`\n",
            "enum": [
              "authorize",
              "capture"
            ]
          },
          "customerOrderCode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerOrderCode"
              }
            ],
            "description": "Merchant provided unique identifier for the order.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "maxLength": 255
          },
          "displayName": {
            "description": "Business name which overrides the name in the PayPal account.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "Display Name"
          },
          "locale": {
            "type": "string",
            "example": "en-GB",
            "description": "The locale used during PayPal payment (BCP 47)."
          },
          "invoiceId": {
            "description": "Merchant provided invoice number for the order.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "987654321"
          },
          "vault": {
            "type": "boolean",
            "example": true,
            "description": "Requests for the user's PayPal wallet to be vaulted by PayPal. If the customer agrees when\nredirected to PayPal, and if the payment is successful, a vaultId will be made available.\nThis is false by default.\n"
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL to return the customer to upon successful approval of a payment on the PayPal site.\nMandatory if vaulting is requested.\n"
          },
          "cancelUrl": {
            "type": "string",
            "description": "The URL to return the customer to upon cancellation of the request on the PayPal site.\nMandatory if vaulting is requested.\n"
          },
          "enableShippingAddress": {
            "type": "boolean",
            "example": true,
            "description": "Dictates display of shipping address selection during PayPal payment. If an address is\nsupplied in shippingAddressOverride it will be displayed regardless of the value of this field.\n"
          },
          "shippingAddressEditable": {
            "type": "boolean",
            "example": false,
            "description": "Dictates display of shipping address selection during PayPal payment regardless of if a\nshipping address override is present.\n"
          },
          "shippingAddressOverride": {
            "$ref": "#/components/schemas/ShippingAddressOverride"
          },
          "lineItems": {
            "$ref": "#/components/schemas/LineItemsList"
          },
          "customer": {
            "$ref": "#/components/schemas/PayPalCustomer"
          },
          "ota": {
            "$ref": "#/components/schemas/PayPalOnlineTravelAgency"
          },
          "cashierId": {
            "$ref": "#/components/schemas/CashierId"
          },
          "customMetadata": {
            "$ref": "#/components/schemas/CustomMetadata"
          },
          "riskInstruments": {
            "$ref": "#/components/schemas/RiskInstruments"
          },
          "customerId": {
            "$ref": "#/components/schemas/CustomerId"
          },
          "customerIpAddress": {
            "$ref": "#/components/schemas/IpAddress"
          },
          "vaultId": {
            "$ref": "#/components/schemas/VaultId"
          }
        }
      },
      "PayPalOrderResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ComcardeResponse"
          },
          {
            "type": "object",
            "description": "Create PayPal Order response.",
            "properties": {
              "orderId": {
                "description": "The ID of the order.\n\nShould only contain letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "example": "987654321"
              },
              "status": {
                "type": "string",
                "example": "CAPTURED",
                "description": "The status of the order."
              },
              "redirectUrl": {
                "type": "string",
                "example": "987654321",
                "description": "The URL to redirect your customer to to progress the order."
              },
              "intent": {
                "type": "string",
                "default": "capture",
                "description": "By default payments against an order will be captured in a single step, but you can choose to split the authorization and the capture of the order.\n * `authorize` - if you intend to first authorize using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `authorize`\n   then capture the authorized payment using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `capture`\n * `capture` - If you intend to capture immediately using\n   `POST /paypal/orders/{orderId}/payments` with an intent of `capture`\n",
                "enum": [
                  "authorize",
                  "capture"
                ]
              },
              "creationTimestamp": {
                "type": "string",
                "description": "The date and time that the order was created",
                "example": "2022-01-30T10:10:10Z"
              },
              "riskAssessments": {
                "$ref": "#/components/schemas/PayPalOrderRiskAssessments"
              },
              "cashierId": {
                "$ref": "#/components/schemas/CashierId"
              },
              "psp": {
                "$ref": "#/components/schemas/PspInfo"
              },
              "paymentId": {
                "type": "string",
                "description": "The ID of the payment associated with this Order.",
                "example": "57f7f444-29ce-4230-8c7f-1c1fd85c8bc9"
              }
            }
          }
        ]
      },
      "ShippingAddressOverride": {
        "type": "object",
        "description": "Details of the destination to ship the items too.",
        "properties": {
          "address1": {
            "$ref": "#/components/schemas/AddressLineOne"
          },
          "address2": {
            "$ref": "#/components/schemas/AddressLineTwo"
          },
          "town": {
            "$ref": "#/components/schemas/Town"
          },
          "county": {
            "$ref": "#/components/schemas/County"
          },
          "postcode": {
            "$ref": "#/components/schemas/Postcode"
          },
          "country": {
            "$ref": "#/components/schemas/CountryIsoCode"
          },
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "buildingNumberOrName": {
            "$ref": "#/components/schemas/BuildingNumberOrName"
          },
          "recipientName": {
            "description": "Full name of the recipient.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "John Smith"
          }
        }
      },
      "LineItemsList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/LineItem"
        }
      },
      "LineItem": {
        "type": "object",
        "description": "Details of the item being purchased.",
        "properties": {
          "name": {
            "description": "Name of the item.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "T-Shirt"
          },
          "description": {
            "description": "Description of the item.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "A green t-shirt"
          },
          "quantity": {
            "type": "integer",
            "example": 1,
            "format": "int64",
            "minimum": 1,
            "maximum": 999999999999999,
            "description": "Number of the item ordered."
          },
          "unitAmount": {
            "type": "integer",
            "example": 1000,
            "format": "int64",
            "minimum": 1,
            "maximum": 999999999999999,
            "description": "Amount per unit."
          },
          "unitTax": {
            "type": "integer",
            "example": 100,
            "format": "int64",
            "minimum": 1,
            "maximum": 999999999999999,
            "description": "Item tax per unit."
          }
        }
      },
      "PayPalCustomer": {
        "type": "object",
        "description": "Customer's account details with the merchant.",
        "properties": {
          "accountId": {
            "description": "Customer's account ID with the merchant.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "A12345N343"
          },
          "firstName": {
            "description": "Customer's first name.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 50,
            "example": "John"
          },
          "lastName": {
            "description": "Customer's last name.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 50,
            "example": "Smith"
          },
          "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"
          },
          "phoneNumber": {
            "$ref": "#/components/schemas/PhoneNumber"
          },
          "country": {
            "$ref": "#/components/schemas/CountryIsoCode"
          },
          "creationTimestamp": {
            "type": "string",
            "description": "The date and time that the customers' account was created.",
            "example": "2022-01-30T10:10:10Z"
          }
        }
      },
      "PayPalOnlineTravelAgency": {
        "type": "object",
        "description": "Details of the booked transportation. Only required if you're an online travel agency.",
        "properties": {
          "type": {
            "type": "string",
            "example": "bus",
            "description": "The type of transportation the customer has booked.",
            "enum": [
              "hotel",
              "train",
              "ferry",
              "bus",
              "multimodal",
              "airline"
            ]
          },
          "serviceStartDate": {
            "type": "string",
            "example": "2022-01-30T10:10:10Z",
            "description": "The start date of the transport."
          },
          "serviceEndDate": {
            "type": "string",
            "example": "2022-01-30T10:10:10Z",
            "description": "The end date of the transport."
          },
          "changeGuest": {
            "type": "boolean",
            "example": false,
            "description": "Whether the customer associated with the booking can change."
          },
          "startCountry": {
            "type": "string",
            "example": "GB",
            "description": "The starting country of the transportation."
          },
          "startCity": {
            "description": "The starting city of the transportation.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "minLength": 1,
            "maxLength": 50,
            "example": "Edinburgh"
          },
          "startPostcode": {
            "description": "The starting postcode of the transportation.\n\nPlease use only letters, numbers, spaces and these symbols: `'[]()@?!\\-/.,_&*:;+=`\n",
            "type": "string",
            "maxLength": 255,
            "example": "BH23 6AA"
          }
        }
      },
      "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"
      },
      "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."
          }
        }
      },
      "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"
      },
      "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."
              }
            }
          }
        ]
      },
      "Amount": {
        "title": "amount",
        "type": "integer",
        "format": "int64",
        "minimum": 1,
        "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"
      }
    },
    "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."
          }
        }
      }
    },
    "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"
                }
              }
            }
          }
        }
      }
    }
  }
}
```