---
title: Create a payment
slug: reference/create-a-payment
docTags: 
createdAt: 2026-08-23T06:01:06.452Z
---

{
  "id": "ZoHS49ek0qEunvBGxBK0G",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/api/payments",
    "servers": [],
    "name": "Create a payment",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "Idempotency-Key",
          "type": "string",
          "description": "<p>Client-supplied key to safely retry the request without duplicating the operation.</p>"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Create a payment request",
          "customType": "CreatePaymentDTO",
          "schema": [
            {
              "name": "orderId",
              "kind": "required",
              "type": "string",
              "description": "The Forter order ID associated with this payment",
              "example": "order-abc-123"
            },
            {
              "name": "amount",
              "kind": "required",
              "type": "number",
              "description": "<p>The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD).</p>",
              "example": 1000,
              "minimum": 1
            },
            {
              "name": "currency",
              "kind": "required",
              "type": "string<AED | ALL | AMD | ANG | AOA | ARS | AUD | AWG | AZN | BAM | BBD | BDT | BGN | BHD | BIF | BMD | BND | BOB | BRL | BSD | BWP | BYN | BZD | CAD | CHF | CLP | CNY | COP | CRC | CUP | CVE | CZK | DJF | DKK | DOP | DZD | EGP | ETB | EUR | FJD | FKP | GBP | GEL | GHS | GIP | GMD | GNF | GTQ | GYD | HKD | HNL | HRK | HTG | HUF | IDR | ILS | INR | IQD | JMD | JOD | JPY | KES | KGS | KHR | KMF | KRW | KWD | KYD | KZT | LAK | LBP | LKR | LRD | LSL | LYD | MAD | MDL | MGA | MKD | MMK | MNT | MOP | MRU | MUR | MVR | MWK | MXN | MYR | MZN | NAD | NGN | NIO | NOK | NPR | NZD | OMR | PAB | PEN | PGK | PHP | PKR | PLN | PYG | QAR | RON | RSD | RUB | RWF | SAR | SBD | SCR | SEK | SGD | SHP | SLE | SLL | SOS | SRD | SSP | STN | SVC | SZL | THB | TND | TOP | TRY | TTD | TWD | TZS | UAH | UGX | USD | UYU | UZS | VES | VND | VUV | WST | XAF | XCD | XOF | XPF | YER | ZAR | ZMW>",
              "description": "<p>Three-letter ISO currency code, in uppercase. e.g. USD, EUR, GBP</p>",
              "example": "GBP",
              "enum": [
                "AED",
                "ALL",
                "AMD",
                "ANG",
                "AOA",
                "ARS",
                "AUD",
                "AWG",
                "AZN",
                "BAM",
                "BBD",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BMD",
                "BND",
                "BOB",
                "BRL",
                "BSD",
                "BWP",
                "BYN",
                "BZD",
                "CAD",
                "CHF",
                "CLP",
                "CNY",
                "COP",
                "CRC",
                "CUP",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EGP",
                "ETB",
                "EUR",
                "FJD",
                "FKP",
                "GBP",
                "GEL",
                "GHS",
                "GIP",
                "GMD",
                "GNF",
                "GTQ",
                "GYD",
                "HKD",
                "HNL",
                "HRK",
                "HTG",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KGS",
                "KHR",
                "KMF",
                "KRW",
                "KWD",
                "KYD",
                "KZT",
                "LAK",
                "LBP",
                "LKR",
                "LRD",
                "LSL",
                "LYD",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MNT",
                "MOP",
                "MRU",
                "MUR",
                "MVR",
                "MWK",
                "MXN",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PGK",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SBD",
                "SCR",
                "SEK",
                "SGD",
                "SHP",
                "SLE",
                "SLL",
                "SOS",
                "SRD",
                "SSP",
                "STN",
                "SVC",
                "SZL",
                "THB",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "USD",
                "UYU",
                "UZS",
                "VES",
                "VND",
                "VUV",
                "WST",
                "XAF",
                "XCD",
                "XOF",
                "XPF",
                "YER",
                "ZAR",
                "ZMW"
              ]
            },
            {
              "name": "captureMethod",
              "kind": "optional",
              "type": "string<automatic | manual>",
              "description": "The capture method for the payment",
              "example": "automatic",
              "default": "automatic",
              "enum": [
                "automatic",
                "manual"
              ]
            },
            {
              "name": "confirm",
              "kind": "optional",
              "type": "boolean",
              "description": "Whether to confirm the payment immediately",
              "example": false,
              "default": false
            },
            {
              "name": "channel",
              "kind": "optional",
              "type": "string<web | mobile>",
              "description": "The platform where the payment is being made",
              "example": "web",
              "default": "web",
              "enum": [
                "web",
                "mobile"
              ]
            },
            {
              "name": "connectionInformation",
              "kind": "required",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "ConnectionInformationDto",
                  "description": "",
                  "modelRef": "#/components/schemas/ConnectionInformationDto",
                  "schema": [
                    {
                      "name": "customerIP",
                      "kind": "required",
                      "type": "string",
                      "description": "IP address of the customer making the request",
                      "example": "192.168.1.1"
                    },
                    {
                      "name": "forterTokenCookie",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Forter token cookie for fraud prevention (if available)</p>",
                      "example": "forterToken_abc123"
                    },
                    {
                      "name": "forterMobileUID",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Forter mobile UID for fraud prevention (if available)</p>",
                      "example": "mobileUID_xyz789"
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "browserInfo",
              "kind": "required",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "BrowserInfoDto",
                  "description": "",
                  "modelRef": "#/components/schemas/BrowserInfoDto",
                  "schema": [
                    {
                      "name": "acceptHeader",
                      "kind": "optional",
                      "type": "string",
                      "description": "Accept header from the browser",
                      "example": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
                    },
                    {
                      "name": "language",
                      "kind": "optional",
                      "type": "string",
                      "description": "Browser language setting",
                      "example": "en-US"
                    },
                    {
                      "name": "screenHeight",
                      "kind": "optional",
                      "type": "number",
                      "description": "Screen height in pixels",
                      "example": 1080
                    },
                    {
                      "name": "screenWidth",
                      "kind": "optional",
                      "type": "number",
                      "description": "Screen width in pixels",
                      "example": 1920
                    },
                    {
                      "name": "colorDepth",
                      "kind": "optional",
                      "type": "number",
                      "description": "Color depth of the screen",
                      "example": 24
                    },
                    {
                      "name": "userAgent",
                      "kind": "required",
                      "type": "string",
                      "description": "User agent string from the browser",
                      "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
                    },
                    {
                      "name": "timeZone",
                      "kind": "optional",
                      "type": "number",
                      "description": "Time zone offset in minutes",
                      "example": -300
                    },
                    {
                      "name": "javaEnabled",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "Whether Java is enabled in the browser",
                      "example": false
                    },
                    {
                      "name": "javaScriptEnabled",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "Whether JavaScript is enabled in the browser",
                      "example": true
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "cartItems",
              "kind": "required",
              "type": "array",
              "description": "List of items in the cart for this payment",
              "modelRef": "#/components/schemas/CartItemDto",
              "customType": "CartItemDto[]",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the item",
                  "example": "Wireless Mouse"
                },
                {
                  "name": "price",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>Price of the item in the lowest denomination of the currency (e.g., cents for USD)</p>",
                  "example": 2999
                },
                {
                  "name": "quantity",
                  "kind": "required",
                  "type": "number",
                  "description": "Quantity of the item",
                  "example": 2
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string<tangible | non_tangible>",
                  "description": "<p>Type of item: tangible (physical) or non-tangible (digital/service)</p>",
                  "example": "tangible",
                  "enum": [
                    "tangible",
                    "non_tangible"
                  ]
                },
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Category of the item (e.g., electronics, books)</p>",
                  "example": "electronics"
                },
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Product identifier (SKU, ISBN, etc.)</p>",
                  "example": "SKU-12345"
                }
              ]
            },
            {
              "name": "shipping",
              "kind": "required",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "ShippingDto",
                  "description": "",
                  "modelRef": "#/components/schemas/ShippingDto",
                  "schema": [
                    {
                      "name": "address",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "complexType": "allOf",
                      "complexItems": [
                        {
                          "name": "AddressDto",
                          "description": "",
                          "modelRef": "#/components/schemas/AddressDto",
                          "schema": [
                            {
                              "name": "country",
                              "kind": "required",
                              "type": "string",
                              "description": "<p>Country, two-letter ISO 3166-1 alpha-2 country code</p>",
                              "example": "US"
                            },
                            {
                              "name": "line1",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Street-level address. Required when full address details are available</p>",
                              "example": "235 Montgomery st.",
                              "maxLength": 255
                            },
                            {
                              "name": "line2",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Unit-level address</p>",
                              "example": "Ste. 1110",
                              "maxLength": 255
                            },
                            {
                              "name": "postalCode",
                              "kind": "optional",
                              "type": "string",
                              "description": "ZIP or postal code",
                              "example": "94104",
                              "maxLength": 20
                            },
                            {
                              "name": "city",
                              "kind": "optional",
                              "type": "string",
                              "description": "City. Required when full address details are available",
                              "example": "San Francisco",
                              "maxLength": 200
                            },
                            {
                              "name": "region",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Top-level administrative subdivision - state/province/department/etc. Can be either abbreviated format or full name (NY/New York)</p>",
                              "example": "New York",
                              "maxLength": 200
                            }
                          ]
                        }
                      ],
                      "schema": []
                    },
                    {
                      "name": "deliveryMethod",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Delivery method chosen by customer (e.g., postal service, email, in-game transfer)</p>",
                      "example": "FedEx Overnight"
                    },
                    {
                      "name": "deliveryType",
                      "kind": "required",
                      "type": "string<digital | physical | hybrid>",
                      "description": "<p>Type of delivery: physical for shipped goods, digital for non-shipped goods, hybrid for both</p>",
                      "example": "physical",
                      "enum": [
                        "digital",
                        "physical",
                        "hybrid"
                      ]
                    },
                    {
                      "name": "deliveryPrice",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Price for delivery in the lowest denomination of the currency (e.g., cents for USD)</p>",
                      "example": 499
                    },
                    {
                      "name": "deliveryComments",
                      "kind": "optional",
                      "type": "string",
                      "description": "Any comments or special requests the customer had for delivery",
                      "example": "Leave at the front door if not home"
                    },
                    {
                      "name": "shipsFromPostalCode",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Postal code the order ships from. Forwarded to the processor for Level 2/3 data.</p>",
                      "example": "94104"
                    },
                    {
                      "name": "savedData",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "complexType": "allOf",
                      "complexItems": [
                        {
                          "name": "SavedDataDto",
                          "description": "",
                          "modelRef": "#/components/schemas/SavedDataDto",
                          "schema": [
                            {
                              "name": "used",
                              "kind": "optional",
                              "type": "boolean",
                              "description": "Whether saved data was used"
                            },
                            {
                              "name": "choseToSave",
                              "kind": "optional",
                              "type": "boolean",
                              "description": "Whether the customer chose to save data"
                            }
                          ]
                        }
                      ],
                      "schema": []
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "billing",
              "kind": "optional",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "BillingDto",
                  "description": "",
                  "modelRef": "#/components/schemas/BillingDto",
                  "schema": [
                    {
                      "name": "address",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "complexType": "allOf",
                      "complexItems": [
                        {
                          "name": "AddressDto",
                          "description": "",
                          "modelRef": "#/components/schemas/AddressDto",
                          "schema": [
                            {
                              "name": "country",
                              "kind": "required",
                              "type": "string",
                              "description": "<p>Country, two-letter ISO 3166-1 alpha-2 country code</p>",
                              "example": "US"
                            },
                            {
                              "name": "line1",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Street-level address. Required when full address details are available</p>",
                              "example": "235 Montgomery st.",
                              "maxLength": 255
                            },
                            {
                              "name": "line2",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Unit-level address</p>",
                              "example": "Ste. 1110",
                              "maxLength": 255
                            },
                            {
                              "name": "postalCode",
                              "kind": "optional",
                              "type": "string",
                              "description": "ZIP or postal code",
                              "example": "94104",
                              "maxLength": 20
                            },
                            {
                              "name": "city",
                              "kind": "optional",
                              "type": "string",
                              "description": "City. Required when full address details are available",
                              "example": "San Francisco",
                              "maxLength": 200
                            },
                            {
                              "name": "region",
                              "kind": "optional",
                              "type": "string",
                              "description": "<p>Top-level administrative subdivision - state/province/department/etc. Can be either abbreviated format or full name (NY/New York)</p>",
                              "example": "New York",
                              "maxLength": 200
                            }
                          ]
                        }
                      ],
                      "schema": []
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "customer",
              "kind": "required",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "CustomerDto",
                  "description": "",
                  "modelRef": "#/components/schemas/CustomerDto",
                  "schema": [
                    {
                      "name": "email",
                      "kind": "required",
                      "type": "string",
                      "description": "Email address of the person",
                      "example": "john.doe@example.com"
                    },
                    {
                      "name": "firstName",
                      "kind": "required",
                      "type": "string",
                      "description": "First name of the person",
                      "example": "John"
                    },
                    {
                      "name": "lastName",
                      "kind": "required",
                      "type": "string",
                      "description": "Last name of the person",
                      "example": "Doe"
                    },
                    {
                      "name": "phone",
                      "kind": "optional",
                      "type": "string",
                      "description": "Phone number including all country and local access codes",
                      "example": "15557654321"
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "accountInfo",
              "kind": "optional",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "AccountInfoDto",
                  "description": "",
                  "modelRef": "#/components/schemas/AccountInfoDto",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Customer's account UID in merchant's site (leave empty if guest)</p>",
                      "example": "e520-ba9a-367-60b",
                      "maxLength": 100
                    },
                    {
                      "name": "createdAt",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Account creation date in seconds since unix epoch (UTC, Jan 1, 1970)</p>",
                      "example": 1415273168
                    },
                    {
                      "name": "pastOrdersCount",
                      "kind": "optional",
                      "type": "number",
                      "description": "Count of all successfully fulfilled orders made by account",
                      "example": 51
                    },
                    {
                      "name": "pastOrdersSum",
                      "kind": "optional",
                      "type": "number",
                      "description": "Sum in USD of all successfully fulfilled orders made by account",
                      "example": 1702.5
                    },
                    {
                      "name": "status",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Account status (e.g., ACTIVE, SUSPENDED, CLOSED, GUEST, PENDING)</p>",
                      "example": "ACTIVE"
                    },
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Account type (e.g., GUEST, PRIVATE, BUSINESS, VIP)</p>"
                    },
                    {
                      "name": "customerEngagement",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "complexType": "allOf",
                      "complexItems": [
                        {
                          "name": "CustomerEngagementDto",
                          "description": "",
                          "modelRef": "#/components/schemas/CustomerEngagementDto",
                          "schema": [
                            {
                              "name": "wishlist",
                              "kind": "optional",
                              "type": "object",
                              "description": "",
                              "complexType": "allOf",
                              "complexItems": [
                                {
                                  "name": "CustomerEngagementItemDto",
                                  "description": "",
                                  "modelRef": "#/components/schemas/CustomerEngagementItemDto",
                                  "schema": [
                                    {
                                      "name": "inUse",
                                      "kind": "optional",
                                      "type": "boolean",
                                      "description": "Whether the feature is in use"
                                    },
                                    {
                                      "name": "itemInListCount",
                                      "kind": "optional",
                                      "type": "number",
                                      "description": "Number of items in the list"
                                    }
                                  ]
                                }
                              ],
                              "schema": []
                            },
                            {
                              "name": "reviewsWritten",
                              "kind": "optional",
                              "type": "object",
                              "description": "",
                              "complexType": "allOf",
                              "complexItems": [
                                {
                                  "name": "CustomerEngagementItemDto",
                                  "description": "",
                                  "modelRef": "#/components/schemas/CustomerEngagementItemDto",
                                  "schema": [
                                    {
                                      "name": "inUse",
                                      "kind": "optional",
                                      "type": "boolean",
                                      "description": "Whether the feature is in use"
                                    },
                                    {
                                      "name": "itemInListCount",
                                      "kind": "optional",
                                      "type": "number",
                                      "description": "Number of items in the list"
                                    }
                                  ]
                                }
                              ],
                              "schema": []
                            },
                            {
                              "name": "newsletters",
                              "kind": "optional",
                              "type": "object",
                              "description": "",
                              "complexType": "allOf",
                              "complexItems": [
                                {
                                  "name": "CustomerEngagementNewslettersDto",
                                  "description": "",
                                  "modelRef": "#/components/schemas/CustomerEngagementNewslettersDto",
                                  "schema": [
                                    {
                                      "name": "inUse",
                                      "kind": "optional",
                                      "type": "boolean",
                                      "description": "Whether newsletters are in use"
                                    }
                                  ]
                                }
                              ],
                              "schema": []
                            }
                          ]
                        }
                      ],
                      "schema": []
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "tax",
              "kind": "optional",
              "type": "object",
              "description": "",
              "complexType": "allOf",
              "complexItems": [
                {
                  "name": "TaxDto",
                  "description": "",
                  "modelRef": "#/components/schemas/TaxDto",
                  "schema": [
                    {
                      "name": "amount",
                      "kind": "optional",
                      "type": "number",
                      "description": "<p>Tax on the order, in the lowest denomination of the currency (e.g., cents for USD). Forwarded to the processor for Level 2/3 data.</p>",
                      "example": 650,
                      "minimum": 0
                    },
                    {
                      "name": "exempt",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "<p>Whether the order is tax-exempt.</p>",
                      "example": false
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "paymentMethod",
              "kind": "required",
              "type": "object",
              "description": "",
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "RedactedCardPaymentMethodDTO",
                  "description": "",
                  "modelRef": "#/components/schemas/RedactedCardPaymentMethodDTO",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "required",
                      "type": "string<token | card | network_token>",
                      "description": "Type of payment method",
                      "example": "card",
                      "enum": [
                        "token",
                        "card",
                        "network_token"
                      ]
                    },
                    {
                      "name": "card",
                      "kind": "required",
                      "type": "object",
                      "description": "",
                      "complexType": "allOf",
                      "complexItems": [
                        {
                          "name": "CardDto",
                          "description": "",
                          "modelRef": "#/components/schemas/CardDto",
                          "schema": [
                            {
                              "name": "number",
                              "kind": "required",
                              "type": "string",
                              "description": "<p>Credit card number (redacted or tokenized as needed)</p>",
                              "example": "4111111111111111"
                            },
                            {
                              "name": "expirationMonth",
                              "kind": "required",
                              "type": "number",
                              "description": "<p>Expiration month of the card (1-12)</p>",
                              "example": 12,
                              "minimum": 1,
                              "maximum": 12
                            },
                            {
                              "name": "expirationYear",
                              "kind": "required",
                              "type": "number",
                              "description": "<p>Expiration year of the card (>=2000)</p>",
                              "example": 2028,
                              "minimum": 2000
                            },
                            {
                              "name": "holderName",
                              "kind": "required",
                              "type": "string",
                              "description": "Name of the card holder",
                              "example": "John Doe"
                            },
                            {
                              "name": "cvc",
                              "kind": "required",
                              "type": "string",
                              "description": "Card CVC code",
                              "example": "123",
                              "minLength": 3
                            }
                          ]
                        }
                      ],
                      "schema": []
                    }
                  ]
                },
                {
                  "name": "TokenPaymentMethodDTO",
                  "description": "",
                  "modelRef": "#/components/schemas/TokenPaymentMethodDTO",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "required",
                      "type": "string<token | card | network_token>",
                      "description": "Type of payment method",
                      "example": "card",
                      "enum": [
                        "token",
                        "card",
                        "network_token"
                      ]
                    },
                    {
                      "name": "forterTokenString",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Forter token string (36 characters) for tokenized payments</p>",
                      "example": "123e4567-e89b-12d3-a456-426614174000",
                      "minLength": 36,
                      "maxLength": 36
                    },
                    {
                      "name": "forterTokenAliasKey",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Forter token alias key for tokenized payments (used if token string is not provided)</p>",
                      "example": "aliasKey_abc123"
                    },
                    {
                      "name": "forterTokenAliasValue",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Forter token alias value for tokenized payments (used if token string is not provided)</p>",
                      "example": "aliasValue_xyz789"
                    },
                    {
                      "name": "forterCvcTokenString",
                      "kind": "optional",
                      "type": "string",
                      "description": "Forter CVC token for CVC detokenization"
                    }
                  ]
                }
              ],
              "schema": []
            },
            {
              "name": "metadata",
              "kind": "optional",
              "type": "map",
              "description": "<p>Set of key-value pairs for storing additional information about the payment. Maximum 10 key-value pairs, keys up to 40 characters, values up to 200 characters.</p>",
              "example": "{\"source\":\"web\"}",
              "customType": "map<string, string>",
              "schema": []
            },
            {
              "name": "additionalIdentifiers",
              "kind": "optional",
              "type": "object",
              "description": "Additional identifiers for fraud assessment",
              "example": "",
              "schema": []
            },
            {
              "name": "discounts",
              "kind": "optional",
              "type": "array",
              "description": "<p>Discounts applied to this order. Informational only — passed to fraud assessment, not used to calculate the charge amount. Maximum 10 discounts per order.</p>",
              "modelRef": "#/components/schemas/DiscountDto",
              "customType": "DiscountDto[]",
              "schema": [
                {
                  "name": "code",
                  "kind": "required",
                  "type": "string",
                  "description": "Discount or coupon code",
                  "example": "SUMMER20"
                },
                {
                  "name": "amount",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>Discount amount in the lowest denomination of the currency (e.g., cents for USD)</p>",
                  "example": 2000
                }
              ]
            },
            {
              "name": "managedOrderToken",
              "kind": "optional",
              "type": "string",
              "description": "Managed order token for fetching fraud results from Forter. Used with Merchant Managed integrations alongside forterDecisionCorrelationId.",
              "example": "managed-order-token-abc-123"
            },
            {
              "name": "forterDecisionCorrelationId",
              "kind": "optional",
              "type": "string",
              "description": "<p>Correlation ID linking this payment to a pre-authorization fraud decision. Required for Merchant Managed integrations.</p>",
              "example": "fraud-decision-abc-123"
            }
          ],
          "modelRef": "#/components/schemas/CreatePaymentDTO",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Payment created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Payment response",
            "customType": "PaymentResponseDTO",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier for the payment"
              },
              {
                "name": "orderId",
                "kind": "required",
                "type": "string",
                "description": "The Forter order ID associated with this payment",
                "example": "order-abc-123"
              },
              {
                "name": "amount",
                "kind": "required",
                "type": "number",
                "description": "The total amount for the payment",
                "example": 9876
              },
              {
                "name": "capturedAmount",
                "kind": "optional",
                "type": "number",
                "description": "The total amount captured for the payment",
                "example": 9876
              },
              {
                "name": "authorizedAmount",
                "kind": "optional",
                "type": "number",
                "description": "<p>The amount still held by the authorization and available to capture. Zero once the authorization is concluded, whether captured or voided</p>",
                "example": 9876
              },
              {
                "name": "refundedAmount",
                "kind": "optional",
                "type": "number",
                "description": "The total amount refunded for the payment",
                "example": 0
              },
              {
                "name": "capturedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "<p>When the payment was captured (latest successful capture)</p>",
                "format": "date-time"
              },
              {
                "name": "refundedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "<p>When the payment was refunded (latest successful refund).</p>",
                "format": "date-time"
              },
              {
                "name": "authorizedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "When the payment was authorized.",
                "format": "date-time"
              },
              {
                "name": "authorizationExpiresAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "<p>When the authorization hold expires (capture deadline).</p>",
                "format": "date-time"
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Date and time when the payment was created",
                "example": "2025-07-14T12:34:56.789Z",
                "format": "date-time"
              },
              {
                "name": "currency",
                "kind": "required",
                "type": "string<AED | ALL | AMD | ANG | AOA | ARS | AUD | AWG | AZN | BAM | BBD | BDT | BGN | BHD | BIF | BMD | BND | BOB | BRL | BSD | BWP | BYN | BZD | CAD | CHF | CLP | CNY | COP | CRC | CUP | CVE | CZK | DJF | DKK | DOP | DZD | EGP | ETB | EUR | FJD | FKP | GBP | GEL | GHS | GIP | GMD | GNF | GTQ | GYD | HKD | HNL | HRK | HTG | HUF | IDR | ILS | INR | IQD | JMD | JOD | JPY | KES | KGS | KHR | KMF | KRW | KWD | KYD | KZT | LAK | LBP | LKR | LRD | LSL | LYD | MAD | MDL | MGA | MKD | MMK | MNT | MOP | MRU | MUR | MVR | MWK | MXN | MYR | MZN | NAD | NGN | NIO | NOK | NPR | NZD | OMR | PAB | PEN | PGK | PHP | PKR | PLN | PYG | QAR | RON | RSD | RUB | RWF | SAR | SBD | SCR | SEK | SGD | SHP | SLE | SLL | SOS | SRD | SSP | STN | SVC | SZL | THB | TND | TOP | TRY | TTD | TWD | TZS | UAH | UGX | USD | UYU | UZS | VES | VND | VUV | WST | XAF | XCD | XOF | XPF | YER | ZAR | ZMW>",
                "description": "The currency code for the payment",
                "example": "GBP",
                "enum": [
                  "AED",
                  "ALL",
                  "AMD",
                  "ANG",
                  "AOA",
                  "ARS",
                  "AUD",
                  "AWG",
                  "AZN",
                  "BAM",
                  "BBD",
                  "BDT",
                  "BGN",
                  "BHD",
                  "BIF",
                  "BMD",
                  "BND",
                  "BOB",
                  "BRL",
                  "BSD",
                  "BWP",
                  "BYN",
                  "BZD",
                  "CAD",
                  "CHF",
                  "CLP",
                  "CNY",
                  "COP",
                  "CRC",
                  "CUP",
                  "CVE",
                  "CZK",
                  "DJF",
                  "DKK",
                  "DOP",
                  "DZD",
                  "EGP",
                  "ETB",
                  "EUR",
                  "FJD",
                  "FKP",
                  "GBP",
                  "GEL",
                  "GHS",
                  "GIP",
                  "GMD",
                  "GNF",
                  "GTQ",
                  "GYD",
                  "HKD",
                  "HNL",
                  "HRK",
                  "HTG",
                  "HUF",
                  "IDR",
                  "ILS",
                  "INR",
                  "IQD",
                  "JMD",
                  "JOD",
                  "JPY",
                  "KES",
                  "KGS",
                  "KHR",
                  "KMF",
                  "KRW",
                  "KWD",
                  "KYD",
                  "KZT",
                  "LAK",
                  "LBP",
                  "LKR",
                  "LRD",
                  "LSL",
                  "LYD",
                  "MAD",
                  "MDL",
                  "MGA",
                  "MKD",
                  "MMK",
                  "MNT",
                  "MOP",
                  "MRU",
                  "MUR",
                  "MVR",
                  "MWK",
                  "MXN",
                  "MYR",
                  "MZN",
                  "NAD",
                  "NGN",
                  "NIO",
                  "NOK",
                  "NPR",
                  "NZD",
                  "OMR",
                  "PAB",
                  "PEN",
                  "PGK",
                  "PHP",
                  "PKR",
                  "PLN",
                  "PYG",
                  "QAR",
                  "RON",
                  "RSD",
                  "RUB",
                  "RWF",
                  "SAR",
                  "SBD",
                  "SCR",
                  "SEK",
                  "SGD",
                  "SHP",
                  "SLE",
                  "SLL",
                  "SOS",
                  "SRD",
                  "SSP",
                  "STN",
                  "SVC",
                  "SZL",
                  "THB",
                  "TND",
                  "TOP",
                  "TRY",
                  "TTD",
                  "TWD",
                  "TZS",
                  "UAH",
                  "UGX",
                  "USD",
                  "UYU",
                  "UZS",
                  "VES",
                  "VND",
                  "VUV",
                  "WST",
                  "XAF",
                  "XCD",
                  "XOF",
                  "XPF",
                  "YER",
                  "ZAR",
                  "ZMW"
                ]
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string<requires_payment_method | requires_confirmation | requires_action | processing | requires_capture | canceled | succeeded | failed>",
                "description": "Current status of the payment",
                "example": "succeeded",
                "enum": [
                  "requires_payment_method",
                  "requires_confirmation",
                  "requires_action",
                  "processing",
                  "requires_capture",
                  "canceled",
                  "succeeded",
                  "failed"
                ]
              },
              {
                "name": "nextAction",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "PaymentNextActionDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/PaymentNextActionDTO",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string<use_sdk>",
                        "description": "Type of action required",
                        "example": "use_sdk",
                        "enum": [
                          "use_sdk"
                        ]
                      },
                      {
                        "name": "useSdk",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "UseSdkActionDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/UseSdkActionDTO",
                            "schema": [
                              {
                                "name": "token",
                                "kind": "required",
                                "type": "string",
                                "description": "<p>SDK token for client-side authentication</p>",
                                "example": "sdk_token_123"
                              }
                            ]
                          }
                        ],
                        "schema": []
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "captureMethod",
                "kind": "optional",
                "type": "string<automatic | manual>",
                "description": "The capture method for the payment",
                "example": "automatic",
                "default": "automatic",
                "enum": [
                  "automatic",
                  "manual"
                ]
              },
              {
                "name": "paymentMethod",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "PaymentMethodResponseDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/PaymentMethodResponseDTO",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string<token | card | network_token>",
                        "description": "Payment method type used for authorization.",
                        "example": "card",
                        "enum": [
                          "token",
                          "card",
                          "network_token"
                        ]
                      },
                      {
                        "name": "card",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "PaymentMethodCardDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/PaymentMethodCardDTO",
                            "schema": [
                              {
                                "name": "brand",
                                "kind": "required",
                                "type": "string",
                                "description": "Card brand. 'unknown' when the brand could not be determined.",
                                "example": "visa"
                              },
                              {
                                "name": "last4",
                                "kind": "required",
                                "type": "string",
                                "description": "Last four digits of the card",
                                "example": "4242"
                              },
                              {
                                "name": "expirationMonth",
                                "kind": "required",
                                "type": "string",
                                "description": "Card expiration month",
                                "example": "03"
                              },
                              {
                                "name": "expirationYear",
                                "kind": "required",
                                "type": "string",
                                "description": "Card expiration year",
                                "example": "2026"
                              },
                              {
                                "name": "cardholderName",
                                "kind": "optional",
                                "type": "string",
                                "description": "Cardholder name",
                                "example": "Jane Doe"
                              },
                              {
                                "name": "networkToken",
                                "kind": "optional",
                                "type": "object",
                                "description": "",
                                "complexType": "allOf",
                                "complexItems": [
                                  {
                                    "name": "NetworkTokenDTO",
                                    "description": "",
                                    "modelRef": "#/components/schemas/NetworkTokenDTO",
                                    "schema": [
                                      {
                                        "name": "used",
                                        "kind": "required",
                                        "type": "boolean",
                                        "description": "<p>Whether a network token (rather than the PAN) was used to authorize. Always false until network tokenization is used at the PSP.</p>",
                                        "example": false
                                      }
                                    ]
                                  }
                                ],
                                "schema": []
                              }
                            ]
                          }
                        ],
                        "schema": []
                      },
                      {
                        "name": "processorToken",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Processor vault token for stored-credential reuse. Present only when the processor returned a stored-credential token.</p>",
                        "example": "f28v7s"
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "processor",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "ProcessorDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/ProcessorDTO",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string<stripe | adyen | braintree | airwallex | connexpay | echo | fiserv>",
                        "description": "Processor used for the payment",
                        "enum": [
                          "stripe",
                          "adyen",
                          "braintree",
                          "airwallex",
                          "connexpay",
                          "echo",
                          "fiserv"
                        ]
                      },
                      {
                        "name": "transactionId",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Processor-assigned transaction id</p>",
                        "example": "pi_abc123"
                      },
                      {
                        "name": "chargeId",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Processor-assigned charge id</p>",
                        "example": "ch_xyz789"
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "authorization",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "AuthorizationDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/AuthorizationDTO",
                    "schema": [
                      {
                        "name": "authorizationCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "Processor authorization code",
                        "example": "AUTH123"
                      },
                      {
                        "name": "rawResponseCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "Raw processor response code",
                        "example": "card_declined"
                      },
                      {
                        "name": "rawResponseMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": "Raw processor response message",
                        "example": "Your card was declined."
                      },
                      {
                        "name": "processorResponseCode",
                        "kind": "optional",
                        "type": "string<approved | do_not_honor | generic_decline | insufficient_funds | limit_exceeded | expired_card | invalid_card_number | cvv_mismatch | avs_mismatch | invalid_account | call_issuer | lost_or_stolen_card | fraudulent | pickup_card | transaction_not_allowed | processor_unavailable | duplicate_transaction | invalid_amount | invalid_request | card_type_not_supported | configuration_error>",
                        "description": "<p>Processor response code normalized into a canonical cross-PSP vocabulary. Omitted when the raw code has no normalized mapping.</p>",
                        "example": "insufficient_funds",
                        "enum": [
                          "approved",
                          "do_not_honor",
                          "generic_decline",
                          "insufficient_funds",
                          "limit_exceeded",
                          "expired_card",
                          "invalid_card_number",
                          "cvv_mismatch",
                          "avs_mismatch",
                          "invalid_account",
                          "call_issuer",
                          "lost_or_stolen_card",
                          "fraudulent",
                          "pickup_card",
                          "transaction_not_allowed",
                          "processor_unavailable",
                          "duplicate_transaction",
                          "invalid_amount",
                          "invalid_request",
                          "card_type_not_supported",
                          "configuration_error"
                        ]
                      },
                      {
                        "name": "checks",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "CardChecksDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/CardChecksDTO",
                            "schema": [
                              {
                                "name": "addressCheck",
                                "kind": "optional",
                                "type": "string<pass | fail | unavailable | unchecked>",
                                "description": "<p>AVS (address) check result</p>",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "unavailable",
                                  "unchecked"
                                ]
                              },
                              {
                                "name": "cvcCheck",
                                "kind": "optional",
                                "type": "string<pass | fail | unavailable | unchecked>",
                                "description": "<p>CVV/CVC check result</p>",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "unavailable",
                                  "unchecked"
                                ]
                              }
                            ]
                          }
                        ],
                        "schema": []
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "authentication",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "AuthenticationDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/AuthenticationDTO",
                    "schema": [
                      {
                        "name": "threeDSecure",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "ThreeDSecureResultsDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/ThreeDSecureResultsDTO",
                            "schema": [
                              {
                                "name": "status",
                                "kind": "optional",
                                "type": "string<authenticated | attempted | failed | rejected | challenge_required | unavailable>",
                                "description": "3DS authentication outcome",
                                "enum": [
                                  "authenticated",
                                  "attempted",
                                  "failed",
                                  "rejected",
                                  "challenge_required",
                                  "unavailable"
                                ]
                              },
                              {
                                "name": "version",
                                "kind": "optional",
                                "type": "string<1.0.2 | 2.1.0 | 2.2.0 | 2.3.1>",
                                "description": "3DS protocol version",
                                "example": "2.2.0",
                                "enum": [
                                  "1.0.2",
                                  "2.1.0",
                                  "2.2.0",
                                  "2.3.1"
                                ]
                              },
                              {
                                "name": "eci",
                                "kind": "optional",
                                "type": "string<00 | 01 | 02 | 04 | 05 | 06 | 07>",
                                "description": "<p>Electronic Commerce Indicator (chargeback liability-shift evidence)</p>",
                                "example": "05",
                                "enum": [
                                  "00",
                                  "01",
                                  "02",
                                  "04",
                                  "05",
                                  "06",
                                  "07"
                                ]
                              }
                            ]
                          }
                        ],
                        "schema": []
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "metadata",
                "kind": "optional",
                "type": "object",
                "description": "<p>Set of key-value pairs for storing additional information about the payment</p>",
                "example": "",
                "schema": []
              },
              {
                "name": "fraud",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "PaymentFraudDTO",
                    "description": "",
                    "modelRef": "#/components/schemas/PaymentFraudDTO",
                    "schema": [
                      {
                        "name": "preAuth",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "FraudDecisionDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/FraudDecisionDTO",
                            "schema": [
                              {
                                "name": "decision",
                                "kind": "required",
                                "type": "string<approve | decline | not_reviewed>",
                                "description": "Fraud decision",
                                "enum": [
                                  "approve",
                                  "decline",
                                  "not_reviewed"
                                ]
                              }
                            ]
                          }
                        ],
                        "schema": []
                      },
                      {
                        "name": "postAuth",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "FraudDecisionDTO",
                            "description": "",
                            "modelRef": "#/components/schemas/FraudDecisionDTO",
                            "schema": [
                              {
                                "name": "decision",
                                "kind": "required",
                                "type": "string<approve | decline | not_reviewed>",
                                "description": "Fraud decision",
                                "enum": [
                                  "approve",
                                  "decline",
                                  "not_reviewed"
                                ]
                              }
                            ]
                          }
                        ],
                        "schema": []
                      }
                    ]
                  }
                ],
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/PaymentResponseDTO",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "dmlOBvLMiua-zwMy8CMkU",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /api/payments \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'idempotency-key: string' \\\n     --data-raw '{\n     \"orderId\": \"order-abc-123\",\n     \"amount\": 1000,\n     \"currency\": \"GBP\",\n     \"captureMethod\": \"automatic\",\n     \"channel\": \"web\",\n     \"connectionInformation\": {\n     \"customerIP\": \"192.168.1.1\"\n     },\n     \"browserInfo\": {\n     \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"\n     },\n     \"cartItems\": [\n     {\n     \"name\": \"Wireless Mouse\",\n     \"price\": 2999,\n     \"quantity\": 2,\n     \"type\": \"tangible\"\n     }\n     ],\n     \"shipping\": {\n     \"address\": {\n     \"country\": \"US\"\n     },\n     \"deliveryMethod\": \"FedEx Overnight\",\n     \"deliveryType\": \"physical\",\n     \"savedData\": {}\n     },\n     \"billing\": {\n     \"address\": {\n     \"country\": \"US\"\n     }\n     },\n     \"customer\": {\n     \"email\": \"john.doe@example.com\",\n     \"firstName\": \"John\",\n     \"lastName\": \"Doe\"\n     },\n     \"accountInfo\": {\n     \"customerEngagement\": {\n     \"wishlist\": {},\n     \"reviewsWritten\": {},\n     \"newsletters\": {}\n     }\n     },\n     \"tax\": {},\n     \"paymentMethod\": {\n     \"type\": \"card\",\n     \"card\": {\n     \"number\": \"4111111111111111\",\n     \"expirationMonth\": 12,\n     \"expirationYear\": 2028,\n     \"holderName\": \"John Doe\",\n     \"cvc\": \"123\"\n     }\n     },\n     \"discounts\": [\n     {\n     \"code\": \"SUMMER20\",\n     \"amount\": 2000\n     }\n     ]\n     }'"
        },
        {
          "id": "ms3DlywsQRd6Ak7WeWVHG",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"idempotency-key\", \"string\");\n\nvar raw = JSON.stringify({\n   \"orderId\": \"order-abc-123\",\n   \"amount\": 1000,\n   \"currency\": \"GBP\",\n   \"captureMethod\": \"automatic\",\n   \"channel\": \"web\",\n   \"connectionInformation\": {\n      \"customerIP\": \"192.168.1.1\"\n   },\n   \"browserInfo\": {\n      \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"\n   },\n   \"cartItems\": [\n      {\n         \"name\": \"Wireless Mouse\",\n         \"price\": 2999,\n         \"quantity\": 2,\n         \"type\": \"tangible\"\n      }\n   ],\n   \"shipping\": {\n      \"address\": {\n         \"country\": \"US\"\n      },\n      \"deliveryMethod\": \"FedEx Overnight\",\n      \"deliveryType\": \"physical\",\n      \"savedData\": {}\n   },\n   \"billing\": {\n      \"address\": {\n         \"country\": \"US\"\n      }\n   },\n   \"customer\": {\n      \"email\": \"john.doe@example.com\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\"\n   },\n   \"accountInfo\": {\n      \"customerEngagement\": {\n         \"wishlist\": {},\n         \"reviewsWritten\": {},\n         \"newsletters\": {}\n      }\n   },\n   \"tax\": {},\n   \"paymentMethod\": {\n      \"type\": \"card\",\n      \"card\": {\n         \"number\": \"4111111111111111\",\n         \"expirationMonth\": 12,\n         \"expirationYear\": 2028,\n         \"holderName\": \"John Doe\",\n         \"cvc\": \"123\"\n      }\n   },\n   \"discounts\": [\n      {\n         \"code\": \"SUMMER20\",\n         \"amount\": 2000\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/api/payments\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Xs4Ia-shbAESer_Z0Djkx",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/payments\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"idempotency-key\"] = \"string\"\nrequest.body = JSON.dump({\n   \"orderId\": \"order-abc-123\",\n   \"amount\": 1000,\n   \"currency\": \"GBP\",\n   \"captureMethod\": \"automatic\",\n   \"channel\": \"web\",\n   \"connectionInformation\": {\n      \"customerIP\": \"192.168.1.1\"\n   },\n   \"browserInfo\": {\n      \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"\n   },\n   \"cartItems\": [\n      {\n         \"name\": \"Wireless Mouse\",\n         \"price\": 2999,\n         \"quantity\": 2,\n         \"type\": \"tangible\"\n      }\n   ],\n   \"shipping\": {\n      \"address\": {\n         \"country\": \"US\"\n      },\n      \"deliveryMethod\": \"FedEx Overnight\",\n      \"deliveryType\": \"physical\",\n      \"savedData\": {}\n   },\n   \"billing\": {\n      \"address\": {\n         \"country\": \"US\"\n      }\n   },\n   \"customer\": {\n      \"email\": \"john.doe@example.com\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\"\n   },\n   \"accountInfo\": {\n      \"customerEngagement\": {\n         \"wishlist\": {},\n         \"reviewsWritten\": {},\n         \"newsletters\": {}\n      }\n   },\n   \"tax\": {},\n   \"paymentMethod\": {\n      \"type\": \"card\",\n      \"card\": {\n         \"number\": \"4111111111111111\",\n         \"expirationMonth\": 12,\n         \"expirationYear\": 2028,\n         \"holderName\": \"John Doe\",\n         \"cvc\": \"123\"\n      }\n   },\n   \"discounts\": [\n      {\n         \"code\": \"SUMMER20\",\n         \"amount\": 2000\n      }\n   ]\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jsl5FN3ApGoJ72v6EVT2i",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/payments\"\n\npayload = json.dumps({\n   \"orderId\": \"order-abc-123\",\n   \"amount\": 1000,\n   \"currency\": \"GBP\",\n   \"captureMethod\": \"automatic\",\n   \"channel\": \"web\",\n   \"connectionInformation\": {\n      \"customerIP\": \"192.168.1.1\"\n   },\n   \"browserInfo\": {\n      \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36\"\n   },\n   \"cartItems\": [\n      {\n         \"name\": \"Wireless Mouse\",\n         \"price\": 2999,\n         \"quantity\": 2,\n         \"type\": \"tangible\"\n      }\n   ],\n   \"shipping\": {\n      \"address\": {\n         \"country\": \"US\"\n      },\n      \"deliveryMethod\": \"FedEx Overnight\",\n      \"deliveryType\": \"physical\",\n      \"savedData\": {}\n   },\n   \"billing\": {\n      \"address\": {\n         \"country\": \"US\"\n      }\n   },\n   \"customer\": {\n      \"email\": \"john.doe@example.com\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\"\n   },\n   \"accountInfo\": {\n      \"customerEngagement\": {\n         \"wishlist\": {},\n         \"reviewsWritten\": {},\n         \"newsletters\": {}\n      }\n   },\n   \"tax\": {},\n   \"paymentMethod\": {\n      \"type\": \"card\",\n      \"card\": {\n         \"number\": \"4111111111111111\",\n         \"expirationMonth\": 12,\n         \"expirationYear\": 2028,\n         \"holderName\": \"John Doe\",\n         \"cvc\": \"123\"\n      }\n   },\n   \"discounts\": [\n      {\n         \"code\": \"SUMMER20\",\n         \"amount\": 2000\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'idempotency-key': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "dmlOBvLMiua-zwMy8CMkU"
    },
    "results": {
      "languages": [
        {
          "id": "FIAAnB1UGZNSf3-BA7ltU",
          "language": "201",
          "code": "// Payment created\n{\n  \"id\": \"\",\n  \"orderId\": \"order-abc-123\",\n  \"amount\": 9876,\n  \"capturedAmount\": 9876,\n  \"authorizedAmount\": 9876,\n  \"refundedAmount\": 0,\n  \"capturedAt\": \"\",\n  \"refundedAt\": \"\",\n  \"authorizedAt\": \"\",\n  \"authorizationExpiresAt\": \"\",\n  \"createdAt\": \"2025-07-14T12:34:56.789Z\",\n  \"currency\": \"GBP\",\n  \"status\": \"succeeded\",\n  \"nextAction\": {},\n  \"captureMethod\": \"automatic\",\n  \"paymentMethod\": {},\n  \"processor\": {},\n  \"authorization\": {},\n  \"authentication\": {},\n  \"metadata\": {},\n  \"fraud\": {}\n}"
        },
        {
          "id": "PskupPuTSlBFplWT6RhO_",
          "language": "400",
          "code": "// Bad request\n"
        },
        {
          "id": "JJtKFTPe6MavvlomHkgey",
          "language": "401",
          "code": "// Unauthorized\n"
        }
      ],
      "selectedLanguageId": "FIAAnB1UGZNSf3-BA7ltU"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}