{
  "openapi": "3.2.0",
  "info": {
    "title": "Orders",
    "description": "An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders.",
    "version": "2.32"
  },
  "servers": [
    {
      "url": "https://api-m.sandbox.paypal.com",
      "description": "PayPal API Sandbox"
    }
  ],
  "tags": [
    {
      "name": "externalcallback",
      "description": "PayPal will use the callback url defined in the create order request to send merchants shipping address and shipping options data while the buyer is in the PayPal checkout."
    },
    {
      "name": "orders",
      "description": "Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders."
    },
    {
      "name": "trackers",
      "description": "Use the `/trackers` resource to update and retrieve tracking information for PayPal orders."
    }
  ],
  "externalDocs": {
    "url": "../doc/USERGUIDE.md"
  },
  "paths": {
    "/v2/checkout/orders": {
      "post": {
        "operationId": "orders.create",
        "summary": "Create order",
        "description": "Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href=\"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#create-order\">Orders v2 errors</a>.</blockquote>",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants"
            ]
          }
        ],
        "parameters": [
          {
            "name": "PayPal-Request-Id",
            "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 108,
              "pattern": "^[\\S\\s]*$"
            },
            "examples": {
              "orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern": {
                "summary": "Create and authorize an order for a PayPal wallet vaulted account holder passing a usage pattern indicator using stored credentials (Single Shot).",
                "description": "Creates an order and authorizes payment with a PayPal wallet vault id as the payment source and a usage pattern (billing indicator) RECURRING_PREPAID passed using stored credentials.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "00_orders_create": {
                "summary": "Create Order - PayPal Wallet as Payment Source, Resulting in PAYER_ACTION_REQUIRED Response",
                "description": "Creates a new order. API caller receives payer-action link.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              }
            }
          },
          {
            "name": "PayPal-Partner-Attribution-Id",
            "description": "PayPal Partner can send a PayPal-Partner-Attribution-Id request header with the value that they have been assigned by the PayPal Partner program. This value is known as a BN Code. In order to reward such partners (through partner programs), all the activities (including API calls) that they are doing on behalf of the merchants need to be tracked.",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[\\S\\s]*$"
            }
          },
          {
            "$ref": "#/components/parameters/paypal_client_metadata_id"
          },
          {
            "name": "Prefer",
            "description": "The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 25,
              "pattern": "^[a-zA-Z=,-]*$",
              "default": "return=minimal"
            },
            "examples": {
              "orders_create_create_orders_with_shipping_type_pickup_in_store": {
                "summary": "Create Order - Buy Online Pickup In Store Shipping Type",
                "description": "Creates an order with minimal parameters and contains the Buy Online Pickup in Store-related fields.",
                "value": "return=representation"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order_request"
              },
              "examples": {
                "00_orders_create": {
                  "summary": "200 - Create Order - PayPal Wallet as Payment Source, Resulting in PAYER_ACTION_REQUIRED Response",
                  "description": "Creates a new order. API caller receives payer-action link.",
                  "value": {
                    "payment_source": {
                      "paypal": {
                        "experience_context": {
                          "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",
                          "landing_page": "LOGIN",
                          "shipping_preference": "GET_FROM_FILE",
                          "user_action": "PAY_NOW",
                          "return_url": "https://example.com/returnUrl",
                          "cancel_url": "https://example.com/cancelUrl"
                        }
                      }
                    },
                    "purchase_units": [
                      {
                        "invoice_id": "90210",
                        "amount": {
                          "currency_code": "USD",
                          "value": "230.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "220.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "10.00"
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "T-Shirt",
                            "description": "Super Fresh Shirt",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "20.00"
                            },
                            "quantity": "1",
                            "category": "PHYSICAL_GOODS",
                            "sku": "sku01",
                            "image_url": "https://example.com/static/images/items/1/tshirt_green.jpg",
                            "url": "https://example.com/url-to-the-item-being-purchased-1",
                            "upc": {
                              "type": "UPC-A",
                              "code": "123456789012"
                            }
                          },
                          {
                            "name": "Shoes",
                            "description": "Running, Size 10.5",
                            "sku": "sku02",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "100.00"
                            },
                            "quantity": "2",
                            "category": "PHYSICAL_GOODS",
                            "image_url": "https://example.com/static/images/items/1/shoes_running.jpg",
                            "url": "https://example.com/url-to-the-item-being-purchased-2",
                            "upc": {
                              "type": "UPC-A",
                              "code": "987654321012"
                            }
                          }
                        ]
                      }
                    ]
                  }
                },
                "orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern": {
                  "summary": "201 - Create and authorize an order for a PayPal wallet vaulted account holder passing a usage pattern indicator using stored credentials (Single Shot).",
                  "description": "Creates an order and authorizes payment with a PayPal wallet vault id as the payment source and a usage pattern (billing indicator) RECURRING_PREPAID passed using stored credentials.",
                  "value": {
                    "purchase_units": [
                      {
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00"
                        }
                      }
                    ],
                    "payment_source": {
                      "paypal": {
                        "vault_id": "2w915838hr181240m"
                      }
                    }
                  }
                },
                "orders_create_simple": {
                  "summary": "201 - Create Order - Minimal Request and Response",
                  "description": "Creates an order with only required parameters. By default, uses the minimal representation.",
                  "value": {
                    "purchase_units": [
                      {
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00"
                        }
                      }
                    ]
                  }
                },
                "orders_create_create_orders_with_shipping_type_pickup_in_store": {
                  "summary": "201 - Create Order - Buy Online Pickup In Store Shipping Type",
                  "description": "Creates an order with minimal parameters and contains the Buy Online Pickup in Store-related fields.",
                  "value": {
                    "purchase_units": [
                      {
                        "reference_id": "PUHF",
                        "amount": {
                          "currency_code": "USD",
                          "value": "50.00"
                        },
                        "payee": {
                          "email_address": "merchant@example.com"
                        },
                        "shipping": {
                          "address": {
                            "address_line_1": "123 Townsend St",
                            "address_line_2": "Floor 6",
                            "admin_area_2": "San Francisco",
                            "admin_area_1": "CA",
                            "postal_code": "94107",
                            "country_code": "US"
                          },
                          "type": "PICKUP_IN_STORE"
                        }
                      }
                    ]
                  }
                },
                "flow_400_4": {
                  "summary": "400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty",
                  "value": {}
                },
                "create_422_unprocessable_entity_missing_pickup_address": {
                  "summary": "422 - Create Order - 422 Unprocessable Entity Error - Missing Pickup Address",
                  "description": "This code sample attempts to create an order but the shipping address is required and `shipping.type` is set to PICKUP_FROM_PERSON ",
                  "value": {
                    "payment_source": {
                      "paypal": {
                        "experience_context": {
                          "return_url": "https://www.example.com/returnURL",
                          "cancel_url": "https://www.example.com/cancelURL",
                          "shipping_preference": "SET_PROVIDED_ADDRESS"
                        }
                      }
                    },
                    "purchase_units": [
                      {
                        "reference_id": "PUHF",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00"
                        },
                        "shipping": {
                          "type": "PICKUP_FROM_PERSON"
                        }
                      }
                    ]
                  }
                }
              }
            },
            "multipart/related": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "_default": {
                  "summary": "Default",
                  "value": {}
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "_default": {
                  "summary": "Default",
                  "value": {}
                }
              }
            },
            "multipart/mixed": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "_default": {
                  "summary": "Default",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows order details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "00_orders_create": {
                    "summary": "Create Order - PayPal Wallet as Payment Source, Resulting in PAYER_ACTION_REQUIRED Response",
                    "description": "Creates a new order. API caller receives payer-action link.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {}
                      },
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
                          "rel": "payer-action",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A successful request returns the HTTP `201 Created` status code and a JSON response body that includes by default a minimal response with the ID, status, and HATEOAS links. If you require the complete order resource representation, you must pass the <a href=\"https://developer.paypal.com/docs/api/orders/v2/#orders-create-header-parameters\"><code>Prefer: return=representation</code> request header</a>. This header value is not the default.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern": {
                    "summary": "Create and authorize an order for a PayPal wallet vaulted account holder passing a usage pattern indicator using stored credentials (Single Shot).",
                    "description": "Creates an order and authorizes payment with a PayPal wallet vault id as the payment source and a usage pattern (billing indicator) RECURRING_PREPAID passed using stored credentials.",
                    "value": {
                      "id": "8K832279M55989614",
                      "payment_source": {
                        "paypal": {
                          "email_address": "buyer@paypal.com",
                          "account_id": "XQHSN372NGSP2",
                          "account_status": "UNVERIFIED",
                          "name": {
                            "given_name": "Tom",
                            "surname": "Business"
                          },
                          "phone_number": {
                            "national_number": "8127081430"
                          },
                          "address": {
                            "country_code": "US"
                          }
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "default",
                          "amount": {
                            "currency_code": "USD",
                            "value": "100.00"
                          },
                          "payee": {
                            "email_address": "seller@paypal.com",
                            "merchant_id": "Q7C9N6S4YRQXG"
                          },
                          "shipping": {
                            "name": {
                              "full_name": "Tom Business"
                            },
                            "address": {
                              "address_line_1": "123 Fake St.",
                              "admin_area_2": "Baton Rouge",
                              "admin_area_1": "LA",
                              "postal_code": "70802",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "authorizations": [
                              {
                                "status": "CREATED",
                                "id": "7X550106NA4440028",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "expiration_time": "2024-06-05T18:46:54Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028/capture",
                                    "rel": "capture",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028/void",
                                    "rel": "void",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/checkout/orders/8K832279M55989614",
                                    "rel": "up",
                                    "method": "GET"
                                  }
                                ],
                                "create_time": "2024-05-07T18:46:54Z",
                                "update_time": "2024-05-07T18:46:54Z"
                              }
                            ]
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "Tom",
                          "surname": "Business"
                        },
                        "email_address": "buyer@paypal.com",
                        "payer_id": "XQHSN372NGSP2",
                        "phone": {
                          "phone_number": {
                            "national_number": "8127081430"
                          }
                        },
                        "address": {
                          "country_code": "US"
                        }
                      },
                      "create_time": "2024-05-07T18:46:15Z",
                      "update_time": "2024-05-07T18:46:54Z",
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/8K832279M55989614",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  },
                  "orders_create_create_orders_with_shipping_type_pickup_in_store": {
                    "summary": "Create Order - Buy Online Pickup In Store Shipping Type",
                    "description": "Creates an order with minimal parameters and contains the Buy Online Pickup in Store-related fields.",
                    "value": {
                      "id": "4SP74185RW2405200",
                      "purchase_units": [
                        {
                          "reference_id": "PUHF",
                          "amount": {
                            "currency_code": "USD",
                            "value": "50.00"
                          },
                          "payee": {
                            "email_address": "merchant@example.com"
                          },
                          "shipping": {
                            "address": {
                              "address_line_1": "123 Townsend St",
                              "address_line_2": "Floor 6",
                              "admin_area_2": "San Francisco",
                              "admin_area_1": "CA",
                              "postal_code": "94107",
                              "country_code": "US"
                            },
                            "type": "PICKUP_IN_STORE"
                          }
                        }
                      ],
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/4SP74185RW2405200",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=4SP74185RW2405200",
                          "rel": "approve",
                          "method": "GET"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/4SP74185RW2405200",
                          "rel": "edit",
                          "method": "PATCH"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/4SP74185RW2405200/authorize",
                          "rel": "authorize",
                          "method": "POST"
                        }
                      ]
                    }
                  },
                  "orders_create_simple": {
                    "summary": "Create Order - Minimal Request and Response",
                    "description": "Creates an order with only required parameters. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
                          "rel": "approve",
                          "method": "GET"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "edit",
                          "method": "PATCH"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/capture",
                          "rel": "capture",
                          "method": "POST"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "create_400_bad_request": {
                    "summary": "Create Order - 400 Bad Request Error - Purchase Unit is Empty",
                    "description": "This code sample attempts to create an order with empty purchase units. The request fails.",
                    "value": {
                      "name": "INVALID_REQUEST",
                      "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
                      "debug_id": "10398537340c8",
                      "details": [
                        {
                          "field": "/purchase_units",
                          "value": "[]",
                          "location": "body",
                          "issue": "INVALID_ARRAY_MIN_ITEMS",
                          "description": "The number of items in an array parameter is too small."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-INVALID_ARRAY_MIN_ITEMS",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "create_422_unprocessable_entity_missing_pickup_address": {
                    "summary": "Create Order - 422 Unprocessable Entity Error - Missing Pickup Address",
                    "description": "This code sample attempts to create an order but the shipping address is required and `shipping.type` is set to PICKUP_FROM_PERSON ",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "field": "/purchase_units/@reference_id=='PUHF'/shipping/address",
                          "issue": "MISSING_SHIPPING_ADDRESS",
                          "description": "The shipping address is required when `shipping_preference=SET_PROVIDED_ADDRESS`."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "f200264a4e02a",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#MISSING_SHIPPING_ADDRESS",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Create Order - PayPal Wallet as Payment Source, Resulting in PAYER_ACTION_REQUIRED Response",
            "description": "Creates a new order. API caller receives payer-action link.",
            "parameter_examples": [
              "parameters/@name=='PayPal-Request-Id'/examples/00_orders_create",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/00_orders_create",
            "response_example": "responses/200/content/application~1json/examples/00_orders_create"
          },
          {
            "title": "Create and authorize an order for a PayPal wallet vaulted account holder passing a usage pattern indicator using stored credentials (Single Shot).",
            "description": "Creates an order and authorizes payment with a PayPal wallet vault id as the payment source and a usage pattern (billing indicator) RECURRING_PREPAID passed using stored credentials.",
            "parameter_examples": [
              "parameters/@name=='PayPal-Request-Id'/examples/orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern",
            "response_example": "responses/201/content/application~1json/examples/orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern"
          },
          {
            "title": "Create Order - Minimal Request and Response",
            "description": "Creates an order with only required parameters. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_create_simple",
            "response_example": "responses/201/content/application~1json/examples/orders_create_simple"
          },
          {
            "title": "Create Order - Buy Online Pickup In Store Shipping Type",
            "description": "Creates an order with minimal parameters and contains the Buy Online Pickup in Store-related fields.",
            "parameter_examples": [
              "parameters/@name=='Authorization'/examples/bearer",
              "parameters/@name=='Prefer'/examples/orders_create_create_orders_with_shipping_type_pickup_in_store"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_create_create_orders_with_shipping_type_pickup_in_store",
            "response_example": "responses/201/content/application~1json/examples/orders_create_create_orders_with_shipping_type_pickup_in_store"
          },
          {
            "title": "Create Order - 400 Bad Request Error - Purchase Unit is Empty",
            "description": "This code sample attempts to create an order with empty purchase units. The request fails.",
            "parameter_examples": [
              "parameters/@name=='Authorization'/examples/bearer",
              "parameters/@name=='Prefer'/examples/orders_create_create_order_mixed_cart_with_shipping_options_bwp_unknown_status"
            ],
            "response_example": "responses/400/content/application~1json/examples/create_400_bad_request"
          },
          {
            "title": "Create Order - 422 Unprocessable Entity Error - Missing Pickup Address",
            "description": "This code sample attempts to create an order but the shipping address is required and `shipping.type` is set to PICKUP_FROM_PERSON ",
            "parameter_examples": [
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/create_422_unprocessable_entity_missing_pickup_address",
            "response_example": "responses/422/content/application~1json/examples/create_422_unprocessable_entity_missing_pickup_address"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "00_orders_create": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"experience_context\": {\n            //         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n            //         \"landing_page\": \"LOGIN\",\n            //         \"shipping_preference\": \"GET_FROM_FILE\",\n            //         \"user_action\": \"PAY_NOW\",\n            //         \"return_url\": \"https://example.com/returnUrl\",\n            //         \"cancel_url\": \"https://example.com/cancelUrl\"\n            //       }\n            //     }\n            //   },\n            //   \"purchase_units\": [\n            //     {\n            //       \"invoice_id\": \"90210\",\n            //       \"amount\": {\n            //         \"currency_code\": \"USD\",\n            //         \"value\": \"230.00\",\n            //         \"breakdown\": {\n            //           \"item_total\": {\n            //             \"currency_code\": \"USD\",\n            //             \"value\": \"220.00\"\n            //           },\n            //           \"shipping\": {\n            //             \"currency_code\": \"USD\",\n            //             \"value\": \"10.00\"\n            //           }\n            //         }\n            //       },\n            //       \"items\": [\n            //         {\n            //           \"name\": \"T-Shirt\",\n            //           \"description\": \"Super Fresh Shirt\",\n            //           \"unit_amount\": {\n            //             \"currency_code\": \"USD\",\n            //             \"value\": \"20.00\"\n            //           },\n            //           \"quantity\": \"1\",\n            //           \"category\": \"PHYSICAL_GOODS\",\n            //           \"sku\": \"sku01\",\n            //           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n            //           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n            //           \"upc\": {\n            //             \"type\": \"UPC-A\",\n            //             \"code\": \"123456789012\"\n            //           }\n            //         },\n            //         {\n            //           \"name\": \"Shoes\",\n            //           \"description\": \"Running, Size 10.5\",\n            //           \"sku\": \"sku02\",\n            //           \"unit_amount\": {\n            //             \"currency_code\": \"USD\",\n            //             \"value\": \"100.00\"\n            //           },\n            //           \"quantity\": \"2\",\n            //           \"category\": \"PHYSICAL_GOODS\",\n            //           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n            //           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n            //           \"upc\": {\n            //             \"type\": \"UPC-A\",\n            //             \"code\": \"987654321012\"\n            //           }\n            //         }\n            //       ]\n            //     }\n            //   ]\n            // }\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"experience_context\": {\n        //         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n        //         \"landing_page\": \"LOGIN\",\n        //         \"shipping_preference\": \"GET_FROM_FILE\",\n        //         \"user_action\": \"PAY_NOW\",\n        //         \"return_url\": \"https://example.com/returnUrl\",\n        //         \"cancel_url\": \"https://example.com/cancelUrl\"\n        //       }\n        //     }\n        //   },\n        //   \"purchase_units\": [\n        //     {\n        //       \"invoice_id\": \"90210\",\n        //       \"amount\": {\n        //         \"currency_code\": \"USD\",\n        //         \"value\": \"230.00\",\n        //         \"breakdown\": {\n        //           \"item_total\": {\n        //             \"currency_code\": \"USD\",\n        //             \"value\": \"220.00\"\n        //           },\n        //           \"shipping\": {\n        //             \"currency_code\": \"USD\",\n        //             \"value\": \"10.00\"\n        //           }\n        //         }\n        //       },\n        //       \"items\": [\n        //         {\n        //           \"name\": \"T-Shirt\",\n        //           \"description\": \"Super Fresh Shirt\",\n        //           \"unit_amount\": {\n        //             \"currency_code\": \"USD\",\n        //             \"value\": \"20.00\"\n        //           },\n        //           \"quantity\": \"1\",\n        //           \"category\": \"PHYSICAL_GOODS\",\n        //           \"sku\": \"sku01\",\n        //           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n        //           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n        //           \"upc\": {\n        //             \"type\": \"UPC-A\",\n        //             \"code\": \"123456789012\"\n        //           }\n        //         },\n        //         {\n        //           \"name\": \"Shoes\",\n        //           \"description\": \"Running, Size 10.5\",\n        //           \"sku\": \"sku02\",\n        //           \"unit_amount\": {\n        //             \"currency_code\": \"USD\",\n        //             \"value\": \"100.00\"\n        //           },\n        //           \"quantity\": \"2\",\n        //           \"category\": \"PHYSICAL_GOODS\",\n        //           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n        //           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n        //           \"upc\": {\n        //             \"type\": \"UPC-A\",\n        //             \"code\": \"987654321012\"\n        //           }\n        //         }\n        //       ]\n        //     }\n        //   ]\n        // }\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"experience_context\": {\n//         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n//         \"landing_page\": \"LOGIN\",\n//         \"shipping_preference\": \"GET_FROM_FILE\",\n//         \"user_action\": \"PAY_NOW\",\n//         \"return_url\": \"https://example.com/returnUrl\",\n//         \"cancel_url\": \"https://example.com/cancelUrl\"\n//       }\n//     }\n//   },\n//   \"purchase_units\": [\n//     {\n//       \"invoice_id\": \"90210\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"230.00\",\n//         \"breakdown\": {\n//           \"item_total\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"220.00\"\n//           },\n//           \"shipping\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"10.00\"\n//           }\n//         }\n//       },\n//       \"items\": [\n//         {\n//           \"name\": \"T-Shirt\",\n//           \"description\": \"Super Fresh Shirt\",\n//           \"unit_amount\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"20.00\"\n//           },\n//           \"quantity\": \"1\",\n//           \"category\": \"PHYSICAL_GOODS\",\n//           \"sku\": \"sku01\",\n//           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n//           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n//           \"upc\": {\n//             \"type\": \"UPC-A\",\n//             \"code\": \"123456789012\"\n//           }\n//         },\n//         {\n//           \"name\": \"Shoes\",\n//           \"description\": \"Running, Size 10.5\",\n//           \"sku\": \"sku02\",\n//           \"unit_amount\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"100.00\"\n//           },\n//           \"quantity\": \"2\",\n//           \"category\": \"PHYSICAL_GOODS\",\n//           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n//           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n//           \"upc\": {\n//             \"type\": \"UPC-A\",\n//             \"code\": \"987654321012\"\n//           }\n//         }\n//       ]\n//     }\n//   ]\n// }\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"experience_context\": {\n#         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n#         \"landing_page\": \"LOGIN\",\n#         \"shipping_preference\": \"GET_FROM_FILE\",\n#         \"user_action\": \"PAY_NOW\",\n#         \"return_url\": \"https://example.com/returnUrl\",\n#         \"cancel_url\": \"https://example.com/cancelUrl\"\n#       }\n#     }\n#   },\n#   \"purchase_units\": [\n#     {\n#       \"invoice_id\": \"90210\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"230.00\",\n#         \"breakdown\": {\n#           \"item_total\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"220.00\"\n#           },\n#           \"shipping\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"10.00\"\n#           }\n#         }\n#       },\n#       \"items\": [\n#         {\n#           \"name\": \"T-Shirt\",\n#           \"description\": \"Super Fresh Shirt\",\n#           \"unit_amount\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"20.00\"\n#           },\n#           \"quantity\": \"1\",\n#           \"category\": \"PHYSICAL_GOODS\",\n#           \"sku\": \"sku01\",\n#           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n#           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n#           \"upc\": {\n#             \"type\": \"UPC-A\",\n#             \"code\": \"123456789012\"\n#           }\n#         },\n#         {\n#           \"name\": \"Shoes\",\n#           \"description\": \"Running, Size 10.5\",\n#           \"sku\": \"sku02\",\n#           \"unit_amount\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"100.00\"\n#           },\n#           \"quantity\": \"2\",\n#           \"category\": \"PHYSICAL_GOODS\",\n#           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n#           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n#           \"upc\": {\n#             \"type\": \"UPC-A\",\n#             \"code\": \"987654321012\"\n#           }\n#         }\n#       ]\n#     }\n#   ]\n# }\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"experience_context\": {\n//         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n//         \"landing_page\": \"LOGIN\",\n//         \"shipping_preference\": \"GET_FROM_FILE\",\n//         \"user_action\": \"PAY_NOW\",\n//         \"return_url\": \"https://example.com/returnUrl\",\n//         \"cancel_url\": \"https://example.com/cancelUrl\"\n//       }\n//     }\n//   },\n//   \"purchase_units\": [\n//     {\n//       \"invoice_id\": \"90210\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"230.00\",\n//         \"breakdown\": {\n//           \"item_total\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"220.00\"\n//           },\n//           \"shipping\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"10.00\"\n//           }\n//         }\n//       },\n//       \"items\": [\n//         {\n//           \"name\": \"T-Shirt\",\n//           \"description\": \"Super Fresh Shirt\",\n//           \"unit_amount\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"20.00\"\n//           },\n//           \"quantity\": \"1\",\n//           \"category\": \"PHYSICAL_GOODS\",\n//           \"sku\": \"sku01\",\n//           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n//           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n//           \"upc\": {\n//             \"type\": \"UPC-A\",\n//             \"code\": \"123456789012\"\n//           }\n//         },\n//         {\n//           \"name\": \"Shoes\",\n//           \"description\": \"Running, Size 10.5\",\n//           \"sku\": \"sku02\",\n//           \"unit_amount\": {\n//             \"currency_code\": \"USD\",\n//             \"value\": \"100.00\"\n//           },\n//           \"quantity\": \"2\",\n//           \"category\": \"PHYSICAL_GOODS\",\n//           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n//           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n//           \"upc\": {\n//             \"type\": \"UPC-A\",\n//             \"code\": \"987654321012\"\n//           }\n//         }\n//       ]\n//     }\n//   ]\n// }\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"experience_context\": {\n#         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n#         \"landing_page\": \"LOGIN\",\n#         \"shipping_preference\": \"GET_FROM_FILE\",\n#         \"user_action\": \"PAY_NOW\",\n#         \"return_url\": \"https://example.com/returnUrl\",\n#         \"cancel_url\": \"https://example.com/cancelUrl\"\n#       }\n#     }\n#   },\n#   \"purchase_units\": [\n#     {\n#       \"invoice_id\": \"90210\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"230.00\",\n#         \"breakdown\": {\n#           \"item_total\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"220.00\"\n#           },\n#           \"shipping\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"10.00\"\n#           }\n#         }\n#       },\n#       \"items\": [\n#         {\n#           \"name\": \"T-Shirt\",\n#           \"description\": \"Super Fresh Shirt\",\n#           \"unit_amount\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"20.00\"\n#           },\n#           \"quantity\": \"1\",\n#           \"category\": \"PHYSICAL_GOODS\",\n#           \"sku\": \"sku01\",\n#           \"image_url\": \"https://example.com/static/images/items/1/tshirt_green.jpg\",\n#           \"url\": \"https://example.com/url-to-the-item-being-purchased-1\",\n#           \"upc\": {\n#             \"type\": \"UPC-A\",\n#             \"code\": \"123456789012\"\n#           }\n#         },\n#         {\n#           \"name\": \"Shoes\",\n#           \"description\": \"Running, Size 10.5\",\n#           \"sku\": \"sku02\",\n#           \"unit_amount\": {\n#             \"currency_code\": \"USD\",\n#             \"value\": \"100.00\"\n#           },\n#           \"quantity\": \"2\",\n#           \"category\": \"PHYSICAL_GOODS\",\n#           \"image_url\": \"https://example.com/static/images/items/1/shoes_running.jpg\",\n#           \"url\": \"https://example.com/url-to-the-item-being-purchased-2\",\n#           \"upc\": {\n#             \"type\": \"UPC-A\",\n#             \"code\": \"987654321012\"\n#           }\n#         }\n#       ]\n#     }\n#   ]\n# }\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_create_authorize_single_step_paypal_with_vault_id_and_stored_credentials_usage_pattern": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"purchase_units\": [\n            //     {\n            //       \"amount\": {\n            //         \"currency_code\": \"USD\",\n            //         \"value\": \"100.00\"\n            //       }\n            //     }\n            //   ],\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"vault_id\": \"2w915838hr181240m\"\n            //     }\n            //   }\n            // }\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"purchase_units\": [\n        //     {\n        //       \"amount\": {\n        //         \"currency_code\": \"USD\",\n        //         \"value\": \"100.00\"\n        //       }\n        //     }\n        //   ],\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"vault_id\": \"2w915838hr181240m\"\n        //     }\n        //   }\n        // }\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       }\n//     }\n//   ],\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"2w915838hr181240m\"\n//     }\n//   }\n// }\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       }\n#     }\n#   ],\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"2w915838hr181240m\"\n#     }\n#   }\n# }\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       }\n//     }\n//   ],\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"2w915838hr181240m\"\n//     }\n//   }\n// }\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       }\n#     }\n#   ],\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"2w915838hr181240m\"\n#     }\n#   }\n# }\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_create_simple": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"purchase_units\": [\n            //     {\n            //       \"amount\": {\n            //         \"currency_code\": \"USD\",\n            //         \"value\": \"100.00\"\n            //       }\n            //     }\n            //   ]\n            // }\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"purchase_units\": [\n        //     {\n        //       \"amount\": {\n        //         \"currency_code\": \"USD\",\n        //         \"value\": \"100.00\"\n        //       }\n        //     }\n        //   ]\n        // }\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       }\n//     }\n//   ]\n// }\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       }\n//     }\n//   ]\n// }\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_create_create_orders_with_shipping_type_pickup_in_store": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"purchase_units\": [\n            //     {\n            //       \"reference_id\": \"PUHF\",\n            //       \"amount\": {\n            //         \"currency_code\": \"USD\",\n            //         \"value\": \"50.00\"\n            //       },\n            //       \"payee\": {\n            //         \"email_address\": \"merchant@example.com\"\n            //       },\n            //       \"shipping\": {\n            //         \"address\": {\n            //           \"address_line_1\": \"123 Townsend St\",\n            //           \"address_line_2\": \"Floor 6\",\n            //           \"admin_area_2\": \"San Francisco\",\n            //           \"admin_area_1\": \"CA\",\n            //           \"postal_code\": \"94107\",\n            //           \"country_code\": \"US\"\n            //         },\n            //         \"type\": \"PICKUP_IN_STORE\"\n            //       }\n            //     }\n            //   ]\n            // }\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"purchase_units\": [\n        //     {\n        //       \"reference_id\": \"PUHF\",\n        //       \"amount\": {\n        //         \"currency_code\": \"USD\",\n        //         \"value\": \"50.00\"\n        //       },\n        //       \"payee\": {\n        //         \"email_address\": \"merchant@example.com\"\n        //       },\n        //       \"shipping\": {\n        //         \"address\": {\n        //           \"address_line_1\": \"123 Townsend St\",\n        //           \"address_line_2\": \"Floor 6\",\n        //           \"admin_area_2\": \"San Francisco\",\n        //           \"admin_area_1\": \"CA\",\n        //           \"postal_code\": \"94107\",\n        //           \"country_code\": \"US\"\n        //         },\n        //         \"type\": \"PICKUP_IN_STORE\"\n        //       }\n        //     }\n        //   ]\n        // }\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"reference_id\": \"PUHF\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"50.00\"\n//       },\n//       \"payee\": {\n//         \"email_address\": \"merchant@example.com\"\n//       },\n//       \"shipping\": {\n//         \"address\": {\n//           \"address_line_1\": \"123 Townsend St\",\n//           \"address_line_2\": \"Floor 6\",\n//           \"admin_area_2\": \"San Francisco\",\n//           \"admin_area_1\": \"CA\",\n//           \"postal_code\": \"94107\",\n//           \"country_code\": \"US\"\n//         },\n//         \"type\": \"PICKUP_IN_STORE\"\n//       }\n//     }\n//   ]\n// }\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"reference_id\": \"PUHF\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"50.00\"\n#       },\n#       \"payee\": {\n#         \"email_address\": \"merchant@example.com\"\n#       },\n#       \"shipping\": {\n#         \"address\": {\n#           \"address_line_1\": \"123 Townsend St\",\n#           \"address_line_2\": \"Floor 6\",\n#           \"admin_area_2\": \"San Francisco\",\n#           \"admin_area_1\": \"CA\",\n#           \"postal_code\": \"94107\",\n#           \"country_code\": \"US\"\n#         },\n#         \"type\": \"PICKUP_IN_STORE\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"purchase_units\": [\n//     {\n//       \"reference_id\": \"PUHF\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"50.00\"\n//       },\n//       \"payee\": {\n//         \"email_address\": \"merchant@example.com\"\n//       },\n//       \"shipping\": {\n//         \"address\": {\n//           \"address_line_1\": \"123 Townsend St\",\n//           \"address_line_2\": \"Floor 6\",\n//           \"admin_area_2\": \"San Francisco\",\n//           \"admin_area_1\": \"CA\",\n//           \"postal_code\": \"94107\",\n//           \"country_code\": \"US\"\n//         },\n//         \"type\": \"PICKUP_IN_STORE\"\n//       }\n//     }\n//   ]\n// }\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"purchase_units\": [\n#     {\n#       \"reference_id\": \"PUHF\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"50.00\"\n#       },\n#       \"payee\": {\n#         \"email_address\": \"merchant@example.com\"\n#       },\n#       \"shipping\": {\n#         \"address\": {\n#           \"address_line_1\": \"123 Townsend St\",\n#           \"address_line_2\": \"Floor 6\",\n#           \"admin_area_2\": \"San Francisco\",\n#           \"admin_area_1\": \"CA\",\n#           \"postal_code\": \"94107\",\n#           \"country_code\": \"US\"\n#         },\n#         \"type\": \"PICKUP_IN_STORE\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_400_4": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Create Order - 400 Bad Request Error - Purchase Unit is Empty\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "create_422_unprocessable_entity_missing_pickup_address": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"experience_context\": {\n            //         \"return_url\": \"https://www.example.com/returnURL\",\n            //         \"cancel_url\": \"https://www.example.com/cancelURL\",\n            //         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n            //       }\n            //     }\n            //   },\n            //   \"purchase_units\": [\n            //     {\n            //       \"reference_id\": \"PUHF\",\n            //       \"amount\": {\n            //         \"currency_code\": \"USD\",\n            //         \"value\": \"100.00\"\n            //       },\n            //       \"shipping\": {\n            //         \"type\": \"PICKUP_FROM_PERSON\"\n            //       }\n            //     }\n            //   ]\n            // }\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"experience_context\": {\n        //         \"return_url\": \"https://www.example.com/returnURL\",\n        //         \"cancel_url\": \"https://www.example.com/cancelURL\",\n        //         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n        //       }\n        //     }\n        //   },\n        //   \"purchase_units\": [\n        //     {\n        //       \"reference_id\": \"PUHF\",\n        //       \"amount\": {\n        //         \"currency_code\": \"USD\",\n        //         \"value\": \"100.00\"\n        //       },\n        //       \"shipping\": {\n        //         \"type\": \"PICKUP_FROM_PERSON\"\n        //       }\n        //     }\n        //   ]\n        // }\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"experience_context\": {\n//         \"return_url\": \"https://www.example.com/returnURL\",\n//         \"cancel_url\": \"https://www.example.com/cancelURL\",\n//         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n//       }\n//     }\n//   },\n//   \"purchase_units\": [\n//     {\n//       \"reference_id\": \"PUHF\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       },\n//       \"shipping\": {\n//         \"type\": \"PICKUP_FROM_PERSON\"\n//       }\n//     }\n//   ]\n// }\n\nconst collect = {\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"experience_context\": {\n#         \"return_url\": \"https://www.example.com/returnURL\",\n#         \"cancel_url\": \"https://www.example.com/cancelURL\",\n#         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n#       }\n#     }\n#   },\n#   \"purchase_units\": [\n#     {\n#       \"reference_id\": \"PUHF\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       },\n#       \"shipping\": {\n#         \"type\": \"PICKUP_FROM_PERSON\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"experience_context\": {\n//         \"return_url\": \"https://www.example.com/returnURL\",\n//         \"cancel_url\": \"https://www.example.com/cancelURL\",\n//         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n//       }\n//     }\n//   },\n//   \"purchase_units\": [\n//     {\n//       \"reference_id\": \"PUHF\",\n//       \"amount\": {\n//         \"currency_code\": \"USD\",\n//         \"value\": \"100.00\"\n//       },\n//       \"shipping\": {\n//         \"type\": \"PICKUP_FROM_PERSON\"\n//       }\n//     }\n//   ]\n// }\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"experience_context\": {\n#         \"return_url\": \"https://www.example.com/returnURL\",\n#         \"cancel_url\": \"https://www.example.com/cancelURL\",\n#         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\"\n#       }\n#     }\n#   },\n#   \"purchase_units\": [\n#     {\n#       \"reference_id\": \"PUHF\",\n#       \"amount\": {\n#         \"currency_code\": \"USD\",\n#         \"value\": \"100.00\"\n#       },\n#       \"shipping\": {\n#         \"type\": \"PICKUP_FROM_PERSON\"\n#       }\n#     }\n#   ]\n# }\n\ncollect = {\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          },
          "multipart/related": {
            "_default": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    ContentType = \"multipart/related\",\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder(\n    \"multipart/related\",\n)\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  contentType: 'multipart/related',\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'content_type': 'multipart/related',\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init(\n    'multipart/related',)\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'content_type' => 'multipart/related',\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          },
          "multipart/form-data": {
            "_default": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    ContentType = \"multipart/form-data\",\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder(\n    \"multipart/form-data\",\n)\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  contentType: 'multipart/form-data',\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'content_type': 'multipart/form-data',\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init(\n    'multipart/form-data',)\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'content_type' => 'multipart/form-data',\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          },
          "multipart/mixed": {
            "_default": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    ContentType = \"multipart/mixed\",\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderInput createOrderInput = new CreateOrderInput\n            {\n                Body = new OrderRequest\n                {\n                    Intent = CheckoutPaymentIntent.Capture,\n                    PurchaseUnits = new List<PurchaseUnitRequest>\n                    {\n                        new PurchaseUnitRequest\n                        {\n                            Amount = new AmountWithBreakdown\n                            {\n                                CurrencyCode = \"USD\",\n                                MValue = \"100.00\",\n                            },\n                        },\n                    },\n                },\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderAsync(createOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder(\n    \"multipart/mixed\",\n)\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderInput createOrderInput = new CreateOrderInput.Builder(\n            null,\n            new OrderRequest.Builder(\n                CheckoutPaymentIntent.CAPTURE,\n                Arrays.asList(\n                    new PurchaseUnitRequest.Builder(\n                        new AmountWithBreakdown.Builder(\n                            \"USD\",\n                            \"100.00\"\n                        )\n                        .build()\n                    )\n                    .build()\n                )\n            )\n            .build()\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.createOrderAsync(createOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  contentType: 'multipart/mixed',\n  body: {\n    intent: CheckoutPaymentIntent.Capture,\n    purchaseUnits: [\n      {\n        amount: {\n          currencyCode: 'USD',\n          value: '100.00',\n        },\n      }\n    ],\n  },\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.createOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_request import OrderRequest\nfrom paypalserversdk.models.checkout_payment_intent import CheckoutPaymentIntent\nfrom paypalserversdk.models.purchase_unit_request import PurchaseUnitRequest\nfrom paypalserversdk.models.amount_with_breakdown import AmountWithBreakdown\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'content_type': 'multipart/mixed',\n    'body': OrderRequest(\n        intent=CheckoutPaymentIntent.CAPTURE,\n        purchase_units=[\n            PurchaseUnitRequest(\n                amount=AmountWithBreakdown(\n                    currency_code='USD',\n                    value='100.00'\n                )\n            )\n        ]\n    ),\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.create_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init(\n    'multipart/mixed',)\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'body' => OrderRequestBuilder::init(\n        CheckoutPaymentIntent::CAPTURE,\n        [\n            PurchaseUnitRequestBuilder::init(\n                AmountWithBreakdownBuilder::init(\n                    'USD',\n                    '100.00'\n                )->build()\n            )->build()\n        ]\n    )->build(),\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->createOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'content_type' => 'multipart/mixed',\n  'body' => OrderRequest.new(\n    intent: CheckoutPaymentIntent::CAPTURE,\n    purchase_units: [\n      PurchaseUnitRequest.new(\n        amount: AmountWithBreakdown.new(\n          currency_code: 'USD',\n          value: '100.00'\n        )\n      )\n    ]\n  ),\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.create_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}": {
      "get": {
        "operationId": "orders.get",
        "summary": "Show order details",
        "description": "Shows details for an order, by ID.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href=\"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#get-order\">Orders v2 errors</a>.</blockquote>",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "description": "The ID of the order for which to show details.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "00_orders_get": {
                "summary": "Get Order - Show Order Details After Customer Approval",
                "description": "Shows order details immediately after customer approval.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          },
          {
            "name": "fields",
            "description": "A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 0,
              "maxLength": 2147483647,
              "pattern": "^[a-z_]*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows order details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "00_orders_get": {
                    "summary": "Get Order - Show Order Details After Customer Approval",
                    "description": "Shows order details immediately after customer approval.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "amount": {
                            "currency_code": "USD",
                            "value": "100.00"
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "payer_id": "QYR5Z8XDVJNXQ"
                      },
                      "create_time": "2018-04-01T21:18:49Z",
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
                          "rel": "approve",
                          "method": "GET"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "edit",
                          "method": "PATCH"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/capture",
                          "rel": "capture",
                          "method": "POST"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/404_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.get_404": {
                    "summary": "404 Resource not found",
                    "value": {
                      "name": "RESOURCE_NOT_FOUND",
                      "message": "The specified resource does not exist.",
                      "debug_id": "ccb6f410b107f",
                      "details": [
                        {
                          "issue": "INVALID_RESOURCE_ID",
                          "description": "Specified resource ID does not exist. Please check the resource ID and try again."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Get Order - Show Order Details After Customer Approval",
            "description": "Shows order details immediately after customer approval.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_get",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/200/content/application~1json/examples/00_orders_get"
          },
          {
            "title": "Get Order - 404 Not Found Error - Order Not Found",
            "description": "This code sample attempts to show details for an order, by ID, but the request fails because the order is not found.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_get"
            ],
            "response_example": "responses/404/content/application~1json/examples/generic"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            GetOrderInput getOrderInput = new GetOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.GetOrderAsync(getOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        GetOrderInput getOrderInput = new GetOrderInput.Builder(\n            \"5O190127TN364715T\"\n        )\n        .build();\n\n        ordersController.getOrderAsync(getOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T'\n}\n\ntry {\n  const response = await ordersController.getOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T'\n}\nresult = orders_controller.get_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T'\n];\n\n$apiResponse = $ordersController->getOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T'\n}\n\nresult = orders_controller.get_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "flow_0": {
                  "summary": "200 - Get Order - Show Order Details After Customer Approval",
                  "value": {}
                },
                "flow_1": {
                  "summary": "404 - Get Order - 404 Not Found Error - Order Not Found",
                  "value": {}
                }
              }
            }
          }
        },
        "x-sdkSampleMap": {
          "application/json": {
            "flow_0": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            GetOrderInput getOrderInput = new GetOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.GetOrderAsync(getOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        GetOrderInput getOrderInput = new GetOrderInput.Builder(\n            \"5O190127TN364715T\"\n        )\n        .build();\n\n        ordersController.getOrderAsync(getOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T'\n}\n\ntry {\n  const response = await ordersController.getOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\ncollect = {\n    'id': '5O190127TN364715T'\n}\nresult = orders_controller.get_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\n$collect = [\n    'id' => '5O190127TN364715T'\n];\n\n$apiResponse = $ordersController->getOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Get Order - Show Order Details After Customer Approval\n\ncollect = {\n  'id' => '5O190127TN364715T'\n}\n\nresult = orders_controller.get_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_1": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            GetOrderInput getOrderInput = new GetOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.GetOrderAsync(getOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        GetOrderInput getOrderInput = new GetOrderInput.Builder(\n            \"5O190127TN364715T\"\n        )\n        .build();\n\n        ordersController.getOrderAsync(getOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T'\n}\n\ntry {\n  const response = await ordersController.getOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\ncollect = {\n    'id': '5O190127TN364715T'\n}\nresult = orders_controller.get_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\n$collect = [\n    'id' => '5O190127TN364715T'\n];\n\n$apiResponse = $ordersController->getOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Get Order - 404 Not Found Error - Order Not Found\n\ncollect = {\n  'id' => '5O190127TN364715T'\n}\n\nresult = orders_controller.get_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "orders.patch",
        "summary": "Update order",
        "description": "Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.<br/><br/>To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: <code>\\\"/purchase_units/@reference_id=='default'/{attribute-or-object}\\\"</code>. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href=\"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#patch-order\">Orders v2 errors</a>.</blockquote>Patchable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody><tr><td><code>intent</code></td><td>replace</td><td></td></tr><tr><td><code>payer</code></td><td>replace, add</td><td>Using replace op for <code>payer</code> will replace the whole <code>payer</code> object with the value sent in request.</td></tr><tr><td><code>purchase_units</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].custom_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].description</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payee.email</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].shipping.name</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.email_address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.phone_number</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.options</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.type</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].soft_descriptor</code></td><td>replace, remove</td><td></td></tr><tr><td><code>purchase_units[].amount</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].items</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].invoice_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.disbursement_mode</code></td><td>replace</td><td>By default, <code>disbursement_mode</code> is <code>INSTANT</code>.</td></tr><tr><td><code>purchase_units[].payment_instruction.payee_receivable_fx_rate_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.platform_fees</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.airline</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.card</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>application_context.client_configuration</code></td><td>replace, add</td><td></td></tr></tbody></table>",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "description": "The ID of the order to update.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "00_orders_patch": {
                "summary": "Patch Order - Add Shipping Address",
                "description": "Updates an order to add shipping address to purchase unit.",
                "value": "5O190127TN364715T"
              },
              "orders_patch_add_items_and_replace_amount": {
                "summary": "Patch Order - Add Items and Replace Amount",
                "description": "Updates an order to add items to and replace the amount within a purchase unit. The amount breakdown with an item total is added to reflect the newly added items. Whenever the quantity or price of items is modified in an order with a PATCH, the purchase_units.amount must also be updated.",
                "value": "5O190127TN364715T"
              },
              "orders_patch_replace_amount": {
                "summary": "Patch Order - Replace Amount",
                "description": "Updates an order to revise the amount, adding the cost of shipping, to a purchase unit.",
                "value": "5O190127TN364715T"
              },
              "patch_422_payer_patch_not_allowed": {
                "summary": "Patch Order - 422 Unprocessable Entity Error - Payer Patch Not Allowed",
                "description": "This code sample attempts to update an order with a payer object. The request fails since buyer has already approved.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_request"
              },
              "examples": {
                "00_orders_patch": {
                  "summary": "200 - Patch Order - Add Shipping Address",
                  "description": "Updates an order to add shipping address to purchase unit.",
                  "value": [
                    {
                      "op": "replace",
                      "path": "/purchase_units/@reference_id=='PUHF'/shipping/address",
                      "value": {
                        "address_line_1": "2211 N First Street",
                        "address_line_2": "Building 17",
                        "admin_area_2": "San Jose",
                        "admin_area_1": "CA",
                        "postal_code": "95131",
                        "country_code": "US"
                      }
                    }
                  ]
                },
                "orders_patch_replace_amount": {
                  "summary": "200 - Patch Order - Replace Amount",
                  "description": "Updates an order to revise the amount, adding the cost of shipping, to a purchase unit.",
                  "value": [
                    {
                      "op": "replace",
                      "path": "/purchase_units/@reference_id=='PUHF'/amount",
                      "value": {
                        "currency_code": "USD",
                        "value": "200.00",
                        "breakdown": {
                          "item_total": {
                            "currency_code": "USD",
                            "value": "180.00"
                          },
                          "shipping": {
                            "currency_code": "USD",
                            "value": "20.00"
                          }
                        }
                      }
                    }
                  ]
                },
                "orders_patch_add_items_and_replace_amount": {
                  "summary": "200 - Patch Order - Add Items and Replace Amount",
                  "description": "Updates an order to add items to and replace the amount within a purchase unit. The amount breakdown with an item total is added to reflect the newly added items. Whenever the quantity or price of items is modified in an order with a PATCH, the purchase_units.amount must also be updated.",
                  "value": [
                    {
                      "op": "add",
                      "path": "/purchase_units/@reference_id=='PUHF'/items",
                      "value": [
                        {
                          "name": "T-Shirt",
                          "description": "Green XL",
                          "sku": "sku01",
                          "unit_amount": {
                            "currency_code": "USD",
                            "value": "90.00"
                          },
                          "tax": {
                            "currency_code": "USD",
                            "value": "10.00"
                          },
                          "quantity": "1",
                          "category": "PHYSICAL_GOODS"
                        },
                        {
                          "name": "Shoes",
                          "description": "Running, Size 10.5",
                          "sku": "sku02",
                          "unit_amount": {
                            "currency_code": "USD",
                            "value": "45.00"
                          },
                          "tax": {
                            "currency_code": "USD",
                            "value": "5.00"
                          },
                          "quantity": "2",
                          "category": "PHYSICAL_GOODS"
                        }
                      ]
                    },
                    {
                      "op": "replace",
                      "path": "/purchase_units/@reference_id=='PUHF'/amount",
                      "value": {
                        "currency_code": "USD",
                        "value": "205.00",
                        "breakdown": {
                          "item_total": {
                            "currency_code": "USD",
                            "value": "180.00"
                          },
                          "shipping": {
                            "currency_code": "USD",
                            "value": "5.00"
                          },
                          "handling": {
                            "currency_code": "USD",
                            "value": "0.00"
                          },
                          "tax_total": {
                            "currency_code": "USD",
                            "value": "20.00"
                          },
                          "shipping_discount": {
                            "currency_code": "USD",
                            "value": "0.00"
                          }
                        }
                      }
                    }
                  ]
                },
                "flow_400_3": {
                  "summary": "400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid",
                  "value": {}
                },
                "patch_422_payer_patch_not_allowed": {
                  "summary": "422 - Patch Order - 422 Unprocessable Entity Error - Payer Patch Not Allowed",
                  "description": "This code sample attempts to update an order with a payer object. The request fails since buyer has already approved.",
                  "value": [
                    {
                      "op": "add",
                      "path": "/payer",
                      "value": {
                        "name": {
                          "given_name": "TestFirst",
                          "surname": "TestLast"
                        },
                        "email_address": "payee@example.com",
                        "phone": {
                          "phone_number": {
                            "national_number": "19876543210"
                          }
                        },
                        "address": {
                          "address_line_1": "2211 North First Street",
                          "address_line_2": "Floor 6",
                          "admin_area_2": "San Jose",
                          "admin_area_1": "CA",
                          "postal_code": "95126",
                          "country_code": "US"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/204_response"
          },
          "400": {
            "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "patch_400_invalid_shipping_address": {
                    "summary": "Patch Order - 400 Bad Request Error - Shipping Address Invalid",
                    "description": "This code sample attempts to update an the shipping address with an invalid value. The request fails.",
                    "value": {
                      "name": "INVALID_REQUEST",
                      "details": [
                        {
                          "field": "/purchase_units/@reference_id=='Reference ID 2'/shipping/address",
                          "value": "x",
                          "location": "body",
                          "issue": "INVALID_PARAMETER_SYNTAX",
                          "description": "The value of a field does not conform to the expected format."
                        }
                      ],
                      "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
                      "debug_id": "f087ef02ffdb6",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "patch_422_payer_patch_not_allowed": {
                    "summary": "Patch Order - 422 Unprocessable Entity Error - Payer Patch Not Allowed",
                    "description": "This code sample attempts to update an order with a payer object. The request fails since buyer has already approved.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "field": "/payer",
                          "issue": "PAYER_PATCH_NOT_ALLOWED",
                          "description": "Payer path patch is not allowed after payer has approved the order.",
                          "location": "body"
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "90957fca61718",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-PAYER_PATCH_NOT_ALLOWED",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Patch Order - Add Shipping Address",
            "description": "Updates an order to add shipping address to purchase unit.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_patch",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/00_orders_patch"
          },
          {
            "title": "Patch Order - Replace Amount",
            "description": "Updates an order to revise the amount, adding the cost of shipping, to a purchase unit.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_patch_replace_amount",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_patch_replace_amount"
          },
          {
            "title": "Patch Order - Add Items and Replace Amount",
            "description": "Updates an order to add items to and replace the amount within a purchase unit. The amount breakdown with an item total is added to reflect the newly added items. Whenever the quantity or price of items is modified in an order with a PATCH, the purchase_units.amount must also be updated.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_patch_add_items_and_replace_amount",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_patch_add_items_and_replace_amount"
          },
          {
            "title": "Patch Order - 400 Bad Request Error - Shipping Address Invalid",
            "description": "This code sample attempts to update an the shipping address with an invalid value. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_patch_replace_amount_with_discount_breakdown",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/400/content/application~1json/examples/patch_400_invalid_shipping_address"
          },
          {
            "title": "Patch Order - 422 Unprocessable Entity Error - Payer Patch Not Allowed",
            "description": "This code sample attempts to update an order with a payer object. The request fails since buyer has already approved.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/patch_422_payer_patch_not_allowed",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/patch_422_payer_patch_not_allowed",
            "response_example": "responses/422/content/application~1json/examples/patch_422_payer_patch_not_allowed"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "00_orders_patch": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"replace\",\n            //     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n            //     \"value\": {\n            //       \"address_line_1\": \"2211 N First Street\",\n            //       \"address_line_2\": \"Building 17\",\n            //       \"admin_area_2\": \"San Jose\",\n            //       \"admin_area_1\": \"CA\",\n            //       \"postal_code\": \"95131\",\n            //       \"country_code\": \"US\"\n            //     }\n            //   }\n            // ]\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"replace\",\n        //     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n        //     \"value\": {\n        //       \"address_line_1\": \"2211 N First Street\",\n        //       \"address_line_2\": \"Building 17\",\n        //       \"admin_area_2\": \"San Jose\",\n        //       \"admin_area_1\": \"CA\",\n        //       \"postal_code\": \"95131\",\n        //       \"country_code\": \"US\"\n        //     }\n        //   }\n        // ]\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n//     \"value\": {\n//       \"address_line_1\": \"2211 N First Street\",\n//       \"address_line_2\": \"Building 17\",\n//       \"admin_area_2\": \"San Jose\",\n//       \"admin_area_1\": \"CA\",\n//       \"postal_code\": \"95131\",\n//       \"country_code\": \"US\"\n//     }\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n#     \"value\": {\n#       \"address_line_1\": \"2211 N First Street\",\n#       \"address_line_2\": \"Building 17\",\n#       \"admin_area_2\": \"San Jose\",\n#       \"admin_area_1\": \"CA\",\n#       \"postal_code\": \"95131\",\n#       \"country_code\": \"US\"\n#     }\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n//     \"value\": {\n//       \"address_line_1\": \"2211 N First Street\",\n//       \"address_line_2\": \"Building 17\",\n//       \"admin_area_2\": \"San Jose\",\n//       \"admin_area_1\": \"CA\",\n//       \"postal_code\": \"95131\",\n//       \"country_code\": \"US\"\n//     }\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/shipping/address\",\n#     \"value\": {\n#       \"address_line_1\": \"2211 N First Street\",\n#       \"address_line_2\": \"Building 17\",\n#       \"admin_area_2\": \"San Jose\",\n#       \"admin_area_1\": \"CA\",\n#       \"postal_code\": \"95131\",\n#       \"country_code\": \"US\"\n#     }\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_patch_replace_amount": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"replace\",\n            //     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n            //     \"value\": {\n            //       \"currency_code\": \"USD\",\n            //       \"value\": \"200.00\",\n            //       \"breakdown\": {\n            //         \"item_total\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"180.00\"\n            //         },\n            //         \"shipping\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"20.00\"\n            //         }\n            //       }\n            //     }\n            //   }\n            // ]\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"replace\",\n        //     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n        //     \"value\": {\n        //       \"currency_code\": \"USD\",\n        //       \"value\": \"200.00\",\n        //       \"breakdown\": {\n        //         \"item_total\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"180.00\"\n        //         },\n        //         \"shipping\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"20.00\"\n        //         }\n        //       }\n        //     }\n        //   }\n        // ]\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n//     \"value\": {\n//       \"currency_code\": \"USD\",\n//       \"value\": \"200.00\",\n//       \"breakdown\": {\n//         \"item_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"180.00\"\n//         },\n//         \"shipping\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"20.00\"\n//         }\n//       }\n//     }\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n#     \"value\": {\n#       \"currency_code\": \"USD\",\n#       \"value\": \"200.00\",\n#       \"breakdown\": {\n#         \"item_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"180.00\"\n#         },\n#         \"shipping\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"20.00\"\n#         }\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n//     \"value\": {\n//       \"currency_code\": \"USD\",\n//       \"value\": \"200.00\",\n//       \"breakdown\": {\n//         \"item_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"180.00\"\n//         },\n//         \"shipping\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"20.00\"\n//         }\n//       }\n//     }\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n#     \"value\": {\n#       \"currency_code\": \"USD\",\n#       \"value\": \"200.00\",\n#       \"breakdown\": {\n#         \"item_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"180.00\"\n#         },\n#         \"shipping\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"20.00\"\n#         }\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_patch_add_items_and_replace_amount": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"add\",\n            //     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n            //     \"value\": [\n            //       {\n            //         \"name\": \"T-Shirt\",\n            //         \"description\": \"Green XL\",\n            //         \"sku\": \"sku01\",\n            //         \"unit_amount\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"90.00\"\n            //         },\n            //         \"tax\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"10.00\"\n            //         },\n            //         \"quantity\": \"1\",\n            //         \"category\": \"PHYSICAL_GOODS\"\n            //       },\n            //       {\n            //         \"name\": \"Shoes\",\n            //         \"description\": \"Running, Size 10.5\",\n            //         \"sku\": \"sku02\",\n            //         \"unit_amount\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"45.00\"\n            //         },\n            //         \"tax\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"5.00\"\n            //         },\n            //         \"quantity\": \"2\",\n            //         \"category\": \"PHYSICAL_GOODS\"\n            //       }\n            //     ]\n            //   },\n            //   {\n            //     \"op\": \"replace\",\n            //     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n            //     \"value\": {\n            //       \"currency_code\": \"USD\",\n            //       \"value\": \"205.00\",\n            //       \"breakdown\": {\n            //         \"item_total\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"180.00\"\n            //         },\n            //         \"shipping\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"5.00\"\n            //         },\n            //         \"handling\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"0.00\"\n            //         },\n            //         \"tax_total\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"20.00\"\n            //         },\n            //         \"shipping_discount\": {\n            //           \"currency_code\": \"USD\",\n            //           \"value\": \"0.00\"\n            //         }\n            //       }\n            //     }\n            //   }\n            // ]\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"add\",\n        //     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n        //     \"value\": [\n        //       {\n        //         \"name\": \"T-Shirt\",\n        //         \"description\": \"Green XL\",\n        //         \"sku\": \"sku01\",\n        //         \"unit_amount\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"90.00\"\n        //         },\n        //         \"tax\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"10.00\"\n        //         },\n        //         \"quantity\": \"1\",\n        //         \"category\": \"PHYSICAL_GOODS\"\n        //       },\n        //       {\n        //         \"name\": \"Shoes\",\n        //         \"description\": \"Running, Size 10.5\",\n        //         \"sku\": \"sku02\",\n        //         \"unit_amount\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"45.00\"\n        //         },\n        //         \"tax\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"5.00\"\n        //         },\n        //         \"quantity\": \"2\",\n        //         \"category\": \"PHYSICAL_GOODS\"\n        //       }\n        //     ]\n        //   },\n        //   {\n        //     \"op\": \"replace\",\n        //     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n        //     \"value\": {\n        //       \"currency_code\": \"USD\",\n        //       \"value\": \"205.00\",\n        //       \"breakdown\": {\n        //         \"item_total\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"180.00\"\n        //         },\n        //         \"shipping\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"5.00\"\n        //         },\n        //         \"handling\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"0.00\"\n        //         },\n        //         \"tax_total\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"20.00\"\n        //         },\n        //         \"shipping_discount\": {\n        //           \"currency_code\": \"USD\",\n        //           \"value\": \"0.00\"\n        //         }\n        //       }\n        //     }\n        //   }\n        // ]\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n//     \"value\": [\n//       {\n//         \"name\": \"T-Shirt\",\n//         \"description\": \"Green XL\",\n//         \"sku\": \"sku01\",\n//         \"unit_amount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"90.00\"\n//         },\n//         \"tax\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"10.00\"\n//         },\n//         \"quantity\": \"1\",\n//         \"category\": \"PHYSICAL_GOODS\"\n//       },\n//       {\n//         \"name\": \"Shoes\",\n//         \"description\": \"Running, Size 10.5\",\n//         \"sku\": \"sku02\",\n//         \"unit_amount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"45.00\"\n//         },\n//         \"tax\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"5.00\"\n//         },\n//         \"quantity\": \"2\",\n//         \"category\": \"PHYSICAL_GOODS\"\n//       }\n//     ]\n//   },\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n//     \"value\": {\n//       \"currency_code\": \"USD\",\n//       \"value\": \"205.00\",\n//       \"breakdown\": {\n//         \"item_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"180.00\"\n//         },\n//         \"shipping\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"5.00\"\n//         },\n//         \"handling\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"0.00\"\n//         },\n//         \"tax_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"20.00\"\n//         },\n//         \"shipping_discount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"0.00\"\n//         }\n//       }\n//     }\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n#     \"value\": [\n#       {\n#         \"name\": \"T-Shirt\",\n#         \"description\": \"Green XL\",\n#         \"sku\": \"sku01\",\n#         \"unit_amount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"90.00\"\n#         },\n#         \"tax\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"10.00\"\n#         },\n#         \"quantity\": \"1\",\n#         \"category\": \"PHYSICAL_GOODS\"\n#       },\n#       {\n#         \"name\": \"Shoes\",\n#         \"description\": \"Running, Size 10.5\",\n#         \"sku\": \"sku02\",\n#         \"unit_amount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"45.00\"\n#         },\n#         \"tax\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"5.00\"\n#         },\n#         \"quantity\": \"2\",\n#         \"category\": \"PHYSICAL_GOODS\"\n#       }\n#     ]\n#   },\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n#     \"value\": {\n#       \"currency_code\": \"USD\",\n#       \"value\": \"205.00\",\n#       \"breakdown\": {\n#         \"item_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"180.00\"\n#         },\n#         \"shipping\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"5.00\"\n#         },\n#         \"handling\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"0.00\"\n#         },\n#         \"tax_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"20.00\"\n#         },\n#         \"shipping_discount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"0.00\"\n#         }\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n//     \"value\": [\n//       {\n//         \"name\": \"T-Shirt\",\n//         \"description\": \"Green XL\",\n//         \"sku\": \"sku01\",\n//         \"unit_amount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"90.00\"\n//         },\n//         \"tax\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"10.00\"\n//         },\n//         \"quantity\": \"1\",\n//         \"category\": \"PHYSICAL_GOODS\"\n//       },\n//       {\n//         \"name\": \"Shoes\",\n//         \"description\": \"Running, Size 10.5\",\n//         \"sku\": \"sku02\",\n//         \"unit_amount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"45.00\"\n//         },\n//         \"tax\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"5.00\"\n//         },\n//         \"quantity\": \"2\",\n//         \"category\": \"PHYSICAL_GOODS\"\n//       }\n//     ]\n//   },\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n//     \"value\": {\n//       \"currency_code\": \"USD\",\n//       \"value\": \"205.00\",\n//       \"breakdown\": {\n//         \"item_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"180.00\"\n//         },\n//         \"shipping\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"5.00\"\n//         },\n//         \"handling\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"0.00\"\n//         },\n//         \"tax_total\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"20.00\"\n//         },\n//         \"shipping_discount\": {\n//           \"currency_code\": \"USD\",\n//           \"value\": \"0.00\"\n//         }\n//       }\n//     }\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/items\",\n#     \"value\": [\n#       {\n#         \"name\": \"T-Shirt\",\n#         \"description\": \"Green XL\",\n#         \"sku\": \"sku01\",\n#         \"unit_amount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"90.00\"\n#         },\n#         \"tax\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"10.00\"\n#         },\n#         \"quantity\": \"1\",\n#         \"category\": \"PHYSICAL_GOODS\"\n#       },\n#       {\n#         \"name\": \"Shoes\",\n#         \"description\": \"Running, Size 10.5\",\n#         \"sku\": \"sku02\",\n#         \"unit_amount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"45.00\"\n#         },\n#         \"tax\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"5.00\"\n#         },\n#         \"quantity\": \"2\",\n#         \"category\": \"PHYSICAL_GOODS\"\n#       }\n#     ]\n#   },\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/purchase_units/@reference_id=='PUHF'/amount\",\n#     \"value\": {\n#       \"currency_code\": \"USD\",\n#       \"value\": \"205.00\",\n#       \"breakdown\": {\n#         \"item_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"180.00\"\n#         },\n#         \"shipping\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"5.00\"\n#         },\n#         \"handling\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"0.00\"\n#         },\n#         \"tax_total\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"20.00\"\n#         },\n#         \"shipping_discount\": {\n#           \"currency_code\": \"USD\",\n#           \"value\": \"0.00\"\n#         }\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_400_3": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Patch Order - 400 Bad Request Error - Shipping Address Invalid\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "patch_422_payer_patch_not_allowed": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"add\",\n            //     \"path\": \"/payer\",\n            //     \"value\": {\n            //       \"name\": {\n            //         \"given_name\": \"TestFirst\",\n            //         \"surname\": \"TestLast\"\n            //       },\n            //       \"email_address\": \"payee@example.com\",\n            //       \"phone\": {\n            //         \"phone_number\": {\n            //           \"national_number\": \"19876543210\"\n            //         }\n            //       },\n            //       \"address\": {\n            //         \"address_line_1\": \"2211 North First Street\",\n            //         \"address_line_2\": \"Floor 6\",\n            //         \"admin_area_2\": \"San Jose\",\n            //         \"admin_area_1\": \"CA\",\n            //         \"postal_code\": \"95126\",\n            //         \"country_code\": \"US\"\n            //       }\n            //     }\n            //   }\n            // ]\n\n            PatchOrderInput patchOrderInput = new PatchOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.PatchOrderAsync(patchOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"add\",\n        //     \"path\": \"/payer\",\n        //     \"value\": {\n        //       \"name\": {\n        //         \"given_name\": \"TestFirst\",\n        //         \"surname\": \"TestLast\"\n        //       },\n        //       \"email_address\": \"payee@example.com\",\n        //       \"phone\": {\n        //         \"phone_number\": {\n        //           \"national_number\": \"19876543210\"\n        //         }\n        //       },\n        //       \"address\": {\n        //         \"address_line_1\": \"2211 North First Street\",\n        //         \"address_line_2\": \"Floor 6\",\n        //         \"admin_area_2\": \"San Jose\",\n        //         \"admin_area_1\": \"CA\",\n        //         \"postal_code\": \"95126\",\n        //         \"country_code\": \"US\"\n        //       }\n        //     }\n        //   }\n        // ]\n\n        PatchOrderInput patchOrderInput = new PatchOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.patchOrderAsync(patchOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/payer\",\n//     \"value\": {\n//       \"name\": {\n//         \"given_name\": \"TestFirst\",\n//         \"surname\": \"TestLast\"\n//       },\n//       \"email_address\": \"payee@example.com\",\n//       \"phone\": {\n//         \"phone_number\": {\n//           \"national_number\": \"19876543210\"\n//         }\n//       },\n//       \"address\": {\n//         \"address_line_1\": \"2211 North First Street\",\n//         \"address_line_2\": \"Floor 6\",\n//         \"admin_area_2\": \"San Jose\",\n//         \"admin_area_1\": \"CA\",\n//         \"postal_code\": \"95126\",\n//         \"country_code\": \"US\"\n//       }\n//     }\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.patchOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/payer\",\n#     \"value\": {\n#       \"name\": {\n#         \"given_name\": \"TestFirst\",\n#         \"surname\": \"TestLast\"\n#       },\n#       \"email_address\": \"payee@example.com\",\n#       \"phone\": {\n#         \"phone_number\": {\n#           \"national_number\": \"19876543210\"\n#         }\n#       },\n#       \"address\": {\n#         \"address_line_1\": \"2211 North First Street\",\n#         \"address_line_2\": \"Floor 6\",\n#         \"admin_area_2\": \"San Jose\",\n#         \"admin_area_1\": \"CA\",\n#         \"postal_code\": \"95126\",\n#         \"country_code\": \"US\"\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.patch_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/payer\",\n//     \"value\": {\n//       \"name\": {\n//         \"given_name\": \"TestFirst\",\n//         \"surname\": \"TestLast\"\n//       },\n//       \"email_address\": \"payee@example.com\",\n//       \"phone\": {\n//         \"phone_number\": {\n//           \"national_number\": \"19876543210\"\n//         }\n//       },\n//       \"address\": {\n//         \"address_line_1\": \"2211 North First Street\",\n//         \"address_line_2\": \"Floor 6\",\n//         \"admin_area_2\": \"San Jose\",\n//         \"admin_area_1\": \"CA\",\n//         \"postal_code\": \"95126\",\n//         \"country_code\": \"US\"\n//       }\n//     }\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->patchOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/payer\",\n#     \"value\": {\n#       \"name\": {\n#         \"given_name\": \"TestFirst\",\n#         \"surname\": \"TestLast\"\n#       },\n#       \"email_address\": \"payee@example.com\",\n#       \"phone\": {\n#         \"phone_number\": {\n#           \"national_number\": \"19876543210\"\n#         }\n#       },\n#       \"address\": {\n#         \"address_line_1\": \"2211 North First Street\",\n#         \"address_line_2\": \"Floor 6\",\n#         \"admin_area_2\": \"San Jose\",\n#         \"admin_area_1\": \"CA\",\n#         \"postal_code\": \"95126\",\n#         \"country_code\": \"US\"\n#       }\n#     }\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.patch_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}/confirm-payment-source": {
      "post": {
        "operationId": "orders.confirm",
        "summary": "Confirm the Order",
        "description": "Payer confirms their intent to pay for the the Order with the given payment source.",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/initiatepayment",
              "https://uri.paypal.com/services/payments/orders/client_sdk_orders_api"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/paypal_client_metadata_id"
          },
          {
            "name": "id",
            "description": "The ID of the order for which the payer confirms their intent to pay.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "00_orders_confirm": {
                "summary": "Confirm Order - PayPal Wallet Resulting in Payer Action Required",
                "description": "The API Caller is adding or changing the PayPal wallet payment_source on an Order after the Order has been created. Orders status transitions to PAYER_ACTION_REQUIRED.",
                "value": "5O190127TN364715T"
              },
              "confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch": {
                "summary": "Confirm Order - 422 Unprocessable Entity Error -Using Card Vault ID for a PayPal Wallet Payment Source",
                "description": "Attempt to Confirm PayPal Wallet for an order with card vault id. The request fails with a MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE error.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          },
          {
            "name": "Prefer",
            "description": "The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 25,
              "pattern": "^[a-zA-Z=]*$",
              "default": "return=minimal"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/confirm_order_request"
              },
              "examples": {
                "00_orders_confirm": {
                  "summary": "200 - Confirm Order - 404 Not Found Error - Resource Not Found",
                  "description": "The API Caller is adding or changing the PayPal wallet payment_source on an Order after the Order has been created. Orders status transitions to PAYER_ACTION_REQUIRED.",
                  "value": {
                    "payment_source": {
                      "paypal": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "experience_context": {
                          "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",
                          "brand_name": "EXAMPLE INC",
                          "locale": "en-US",
                          "landing_page": "LOGIN",
                          "shipping_preference": "SET_PROVIDED_ADDRESS",
                          "user_action": "PAY_NOW",
                          "return_url": "https://example.com/returnUrl",
                          "cancel_url": "https://example.com/cancelUrl"
                        }
                      }
                    }
                  }
                },
                "flow_400_1": {
                  "summary": "400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source",
                  "value": {}
                },
                "flow_403_2": {
                  "summary": "403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID",
                  "value": {}
                },
                "confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch": {
                  "summary": "422 - Confirm Order - 422 Unprocessable Entity Error -Using Card Vault ID for a PayPal Wallet Payment Source",
                  "description": "Attempt to Confirm PayPal Wallet for an order with card vault id. The request fails with a MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE error.",
                  "value": {
                    "payment_source": {
                      "paypal": {
                        "vault_id": "8kk845"
                      }
                    }
                  }
                },
                "flow_500_5": {
                  "summary": "500 - Confirm Order - 500 Internal Server Error - A system error has occurred",
                  "value": {}
                },
                "orders.confirm_404_request": {
                  "summary": "404 - Resource Not Found",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful request indicates that the payment source was added to the Order. A successful request returns the HTTP `200 OK` status code with a JSON response body that shows order details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "00_orders_confirm": {
                    "summary": "Confirm Order - PayPal Wallet Resulting in Payer Action Required",
                    "description": "The API Caller is adding or changing the PayPal wallet payment_source on an Order after the Order has been created. Orders status transitions to PAYER_ACTION_REQUIRED.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com"
                        }
                      },
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com"
                      },
                      "links": [
                        {
                          "href": "https://api.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
                          "rel": "payer-action",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "confirm_400_bad_request_missing_required_parameter": {
                    "summary": "Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source",
                    "description": "This code sample attempts to confirm an order, but the payment source is missing. The request fails.",
                    "value": {
                      "name": "INVALID_REQUEST",
                      "details": [
                        {
                          "field": "/payment_source",
                          "issue": "MISSING_REQUIRED_PARAMETER",
                          "description": "A required field or parameter is missing.",
                          "location": "body"
                        }
                      ],
                      "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
                      "debug_id": "90957fca61718",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.confirm_403": {
                    "summary": "403 Authorization error",
                    "value": {
                      "name": "NOT_AUTHORIZED",
                      "message": "Authorization failed due to insufficient permissions.",
                      "debug_id": "9ecb6d8e2e112",
                      "details": [
                        {
                          "issue": "PERMISSION_DENIED",
                          "description": "You do not have permission to access or perform operations on this resource."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/overview/#error",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.confirm_404": {
                    "summary": "404 Resource not found",
                    "value": {
                      "name": "RESOURCE_NOT_FOUND",
                      "message": "The specified resource does not exist.",
                      "debug_id": "ccb6f410b107f",
                      "details": [
                        {
                          "issue": "INVALID_RESOURCE_ID",
                          "description": "Specified resource ID does not exist. Please check the resource ID and try again."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch": {
                    "summary": "Confirm Order - 422 Unprocessable Entity Error -Using Card Vault ID for a PayPal Wallet Payment Source",
                    "description": "Attempt to Confirm PayPal Wallet for an order with card vault id. The request fails with a MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE error.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "field": "/payment_source/paypal/vault_id",
                          "location": "body",
                          "issue": "MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE",
                          "description": "The vault_id does not match the payment_source provided. Please verify that the vault_id token used refers to the matching payment_source and try again. For example, a PayPal token cannot be passed in the vault_id field in the payment_source.card object."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "90957fca61718",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/500_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.confirm_500": {
                    "summary": "500 Internal server error",
                    "value": {
                      "name": "INTERNAL_SERVER_ERROR",
                      "message": "An internal server error has occurred.",
                      "debug_id": "1a5b2a886ea32",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INTERNAL_SERVER_ERROR",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Confirm Order - PayPal Wallet Resulting in Payer Action Required",
            "description": "The API Caller is adding or changing the PayPal wallet payment_source on an Order after the Order has been created. Orders status transitions to PAYER_ACTION_REQUIRED.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_confirm",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/00_orders_confirm",
            "response_example": "responses/200/content/application~1json/examples/00_orders_confirm"
          },
          {
            "title": "Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source",
            "description": "This code sample attempts to confirm an order, but the payment source is missing. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_confirm_apm_payment_source_klarna",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/400/content/application~1json/examples/confirm_400_bad_request_missing_required_parameter"
          },
          {
            "title": "Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID",
            "description": "This code sample attempts to confirm an order but the PayPal wallet vault ID was not found. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_confirm_apm_payment_source_klarna",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_confirm_apm_payment_source_klarna",
            "response_example": "responses/403/content/application~1json/examples/generic"
          },
          {
            "title": "Confirm Order - 404 Not Found Error - Resource Not Found",
            "description": "This code sample attempts to confirm an order but the specified order is not found. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_confirm"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/00_orders_confirm"
          },
          {
            "title": "Confirm Order - 422 Unprocessable Entity Error -Using Card Vault ID for a PayPal Wallet Payment Source",
            "description": "Attempt to Confirm PayPal Wallet for an order with card vault id. The request fails with a MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE error.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch",
            "response_example": "responses/422/content/application~1json/examples/confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch"
          },
          {
            "title": "Confirm Order - 500 Internal Server Error - A system error has occurred",
            "description": "This code sample attempts to confirm an order, but a system error occurred. The request fails. The same request body may be reused by the API Caller to retry.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_confirm_apm_payment_source_klarna",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_confirm_apm_payment_source_klarna",
            "response_example": "responses/500/content/application~1json/examples/generic"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "00_orders_confirm": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"name\": {\n            //         \"given_name\": \"John\",\n            //         \"surname\": \"Doe\"\n            //       },\n            //       \"email_address\": \"customer@example.com\",\n            //       \"experience_context\": {\n            //         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n            //         \"brand_name\": \"EXAMPLE INC\",\n            //         \"locale\": \"en-US\",\n            //         \"landing_page\": \"LOGIN\",\n            //         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n            //         \"user_action\": \"PAY_NOW\",\n            //         \"return_url\": \"https://example.com/returnUrl\",\n            //         \"cancel_url\": \"https://example.com/cancelUrl\"\n            //       }\n            //     }\n            //   }\n            // }\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"name\": {\n        //         \"given_name\": \"John\",\n        //         \"surname\": \"Doe\"\n        //       },\n        //       \"email_address\": \"customer@example.com\",\n        //       \"experience_context\": {\n        //         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n        //         \"brand_name\": \"EXAMPLE INC\",\n        //         \"locale\": \"en-US\",\n        //         \"landing_page\": \"LOGIN\",\n        //         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n        //         \"user_action\": \"PAY_NOW\",\n        //         \"return_url\": \"https://example.com/returnUrl\",\n        //         \"cancel_url\": \"https://example.com/cancelUrl\"\n        //       }\n        //     }\n        //   }\n        // }\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"name\": {\n//         \"given_name\": \"John\",\n//         \"surname\": \"Doe\"\n//       },\n//       \"email_address\": \"customer@example.com\",\n//       \"experience_context\": {\n//         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n//         \"brand_name\": \"EXAMPLE INC\",\n//         \"locale\": \"en-US\",\n//         \"landing_page\": \"LOGIN\",\n//         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n//         \"user_action\": \"PAY_NOW\",\n//         \"return_url\": \"https://example.com/returnUrl\",\n//         \"cancel_url\": \"https://example.com/cancelUrl\"\n//       }\n//     }\n//   }\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"name\": {\n#         \"given_name\": \"John\",\n#         \"surname\": \"Doe\"\n#       },\n#       \"email_address\": \"customer@example.com\",\n#       \"experience_context\": {\n#         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n#         \"brand_name\": \"EXAMPLE INC\",\n#         \"locale\": \"en-US\",\n#         \"landing_page\": \"LOGIN\",\n#         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n#         \"user_action\": \"PAY_NOW\",\n#         \"return_url\": \"https://example.com/returnUrl\",\n#         \"cancel_url\": \"https://example.com/cancelUrl\"\n#       }\n#     }\n#   }\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"name\": {\n//         \"given_name\": \"John\",\n//         \"surname\": \"Doe\"\n//       },\n//       \"email_address\": \"customer@example.com\",\n//       \"experience_context\": {\n//         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n//         \"brand_name\": \"EXAMPLE INC\",\n//         \"locale\": \"en-US\",\n//         \"landing_page\": \"LOGIN\",\n//         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n//         \"user_action\": \"PAY_NOW\",\n//         \"return_url\": \"https://example.com/returnUrl\",\n//         \"cancel_url\": \"https://example.com/cancelUrl\"\n//       }\n//     }\n//   }\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"name\": {\n#         \"given_name\": \"John\",\n#         \"surname\": \"Doe\"\n#       },\n#       \"email_address\": \"customer@example.com\",\n#       \"experience_context\": {\n#         \"payment_method_preference\": \"IMMEDIATE_PAYMENT_REQUIRED\",\n#         \"brand_name\": \"EXAMPLE INC\",\n#         \"locale\": \"en-US\",\n#         \"landing_page\": \"LOGIN\",\n#         \"shipping_preference\": \"SET_PROVIDED_ADDRESS\",\n#         \"user_action\": \"PAY_NOW\",\n#         \"return_url\": \"https://example.com/returnUrl\",\n#         \"cancel_url\": \"https://example.com/cancelUrl\"\n#       }\n#     }\n#   }\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_400_1": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Confirm Order - 400 Bad Request Error - Missing Required Parameter - Payment Source\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_403_2": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Confirm Order - 403 Forbidden Error -  Invalid PayPal Wallet Vault ID\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "confirm_422_unprocessable_entity_paypal_wallet_vault_id_payment_source_mismatch": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"vault_id\": \"8kk845\"\n            //     }\n            //   }\n            // }\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"vault_id\": \"8kk845\"\n        //     }\n        //   }\n        // }\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"8kk845\"\n//     }\n//   }\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"8kk845\"\n#     }\n#   }\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"8kk845\"\n//     }\n//   }\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"8kk845\"\n#     }\n#   }\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_500_5": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 500 - Confirm Order - 500 Internal Server Error - A system error has occurred\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders.confirm_404_request": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 404 - Resource Not Found\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.ConfirmOrderAsync(confirmOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 404 - Resource Not Found\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        ConfirmOrderInput confirmOrderInput = new ConfirmOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.confirmOrderAsync(confirmOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 404 - Resource Not Found\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.confirmOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Resource Not Found\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.confirm_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 404 - Resource Not Found\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->confirmOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Resource Not Found\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.confirm_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}/authorize": {
      "post": {
        "operationId": "orders.authorize",
        "summary": "Authorize payment for order",
        "description": "Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href=\"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#authorize-order\">Orders v2 errors</a>.</blockquote>",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants"
            ]
          }
        ],
        "parameters": [
          {
            "name": "PayPal-Request-Id",
            "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 108,
              "pattern": "^[\\S\\s]*$"
            },
            "examples": {
              "authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                "summary": "Authorize Order - 422 - Payer Action Required",
                "description": "This code sample attempts to authorize payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "orders_authorize_idempotent": {
                "summary": "Authorize Order - Idempotent Response with PayPal Wallet",
                "description": "Authorizes payment for an order with the same idempotency key. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "authorize_422_unprocessable_entity_payment_denied": {
                "summary": "Authorize Order - 422 Unprocessable Entity Error - Payment Denied",
                "description": "This code sample attempts to authorize an order, but the payment is denied by PayPal. This can occur due to various reasons such as insufficient funds, expired card, incorrect payment information, or payment gateway issues.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "00_orders_authorize": {
                "summary": "Authorize Order - PayPal Wallet as Payment Source",
                "description": "Authorize payment for an order after PayPal wallet approval. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "orders_authorize_paypal_wallet_vault_id": {
                "summary": "Authorize Order - PayPal Wallet Vault ID",
                "description": "Authorizes payment for an order through a previously acquired vault id for a PayPal wallet. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              }
            }
          },
          {
            "name": "Prefer",
            "description": "The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 25,
              "pattern": "^[a-zA-Z=,-]*$",
              "default": "return=minimal"
            }
          },
          {
            "$ref": "#/components/parameters/paypal_client_metadata_id"
          },
          {
            "name": "id",
            "description": "The ID of the order for which to authorize.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "00_orders_authorize": {
                "summary": "Authorize Order - PayPal Wallet as Payment Source",
                "description": "Authorize payment for an order after PayPal wallet approval. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              },
              "authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                "summary": "Authorize Order - 422 - Payer Action Required",
                "description": "This code sample attempts to authorize payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                "value": "9SY02093A2309081P"
              },
              "authorize_422_unprocessable_entity_payment_denied": {
                "summary": "Authorize Order - 422 Unprocessable Entity Error - Payment Denied",
                "description": "This code sample attempts to authorize an order, but the payment is denied by PayPal. This can occur due to various reasons such as insufficient funds, expired card, incorrect payment information, or payment gateway issues.",
                "value": "5O190127TN364715T"
              },
              "orders_authorize_idempotent": {
                "summary": "Authorize Order - Idempotent Response with PayPal Wallet",
                "description": "Authorizes payment for an order with the same idempotency key. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              },
              "orders_authorize_paypal_wallet_vault_id": {
                "summary": "Authorize Order - PayPal Wallet Vault ID",
                "description": "Authorizes payment for an order through a previously acquired vault id for a PayPal wallet. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order_authorize_request"
              },
              "examples": {
                "00_orders_authorize": {
                  "summary": "201 - Authorize Order - PayPal Wallet as Payment Source",
                  "description": "Authorize payment for an order after PayPal wallet approval. By default, uses the minimal representation.",
                  "value": {}
                },
                "orders_authorize_idempotent": {
                  "summary": "200 - Authorize Order - Idempotent Response with PayPal Wallet",
                  "description": "Authorizes payment for an order with the same idempotency key. By default, uses the minimal representation.",
                  "value": {}
                },
                "orders_authorize_paypal_wallet_vault_id": {
                  "summary": "201 - Authorize Order - PayPal Wallet Vault ID",
                  "description": "Authorizes payment for an order through a previously acquired vault id for a PayPal wallet. By default, uses the minimal representation.",
                  "value": {
                    "payment_source": {
                      "paypal": {
                        "vault_id": "nkq2y9g"
                      }
                    }
                  }
                },
                "flow_403_3": {
                  "summary": "403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed",
                  "value": {}
                },
                "authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                  "summary": "422 - Authorize Order - 422 - Payer Action Required",
                  "description": "This code sample attempts to authorize payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                  "value": {}
                },
                "authorize_422_unprocessable_entity_payment_denied": {
                  "summary": "422 - Authorize Order - 422 Unprocessable Entity Error - Payment Denied",
                  "description": "This code sample attempts to authorize an order, but the payment is denied by PayPal. This can occur due to various reasons such as insufficient funds, expired card, incorrect payment information, or payment gateway issues.",
                  "value": {
                    "payment_source": {
                      "card": {
                        "vault_id": "8cg02452we902502k"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows authorized payment details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order_authorize_response"
                },
                "examples": {
                  "orders_authorize_idempotent": {
                    "summary": "Authorize Order - Idempotent Response with PayPal Wallet",
                    "description": "Authorizes payment for an order with the same idempotency key. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "account_status": "VERIFIED",
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "shipping": {
                            "address": {
                              "address_line_1": "2211 N First Street",
                              "address_line_2": "Building 17",
                              "admin_area_2": "San Jose",
                              "admin_area_1": "CA",
                              "postal_code": "95131",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "authorizations": [
                              {
                                "id": "0AW2184448108334S",
                                "status": "CREATED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "expiration_time": "2018-05-01T21:20:49Z",
                                "create_time": "2018-04-01T21:20:49Z",
                                "update_time": "2018-04-01T21:20:49Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/capture",
                                    "rel": "capture",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/void",
                                    "rel": "void",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/reauthorize",
                                    "rel": "reauthorize",
                                    "method": "POST"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "payer_id": "QYR5Z8XDVJNXQ"
                      },
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows authorized payment details. If a duplicate response is retried, returns the HTTP `200 OK` status code. By default, the response is minimal. If you need the complete resource representation, you must pass the <a href=\"https://developer.paypal.com/docs/api/orders/v2/#orders-authorize-header-parameters\"><code>Prefer: return=representation</code> request header</a>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order_authorize_response"
                },
                "examples": {
                  "00_orders_authorize": {
                    "summary": "Authorize Order - PayPal Wallet as Payment Source",
                    "description": "Authorize payment for an order after PayPal wallet approval. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "payments": {
                            "authorizations": [
                              {
                                "id": "3C679366HH908993F",
                                "status": "CREATED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "expiration_time": "2021-10-08T23:37:39Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/5O190127TN364715T",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/5O190127TN364715T/capture",
                                    "rel": "capture",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/5O190127TN364715T/void",
                                    "rel": "void",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                                    "rel": "up",
                                    "method": "GET"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "payer_id": "QYR5Z8XDVJNXQ"
                      },
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  },
                  "orders_authorize_paypal_wallet_vault_id": {
                    "summary": "Authorize Order - PayPal Wallet Vault ID",
                    "description": "Authorizes payment for an order through a previously acquired vault id for a PayPal wallet. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ",
                          "account_status": "VERIFIED"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "shipping": {
                            "address": {
                              "address_line_1": "2211 N First Street",
                              "address_line_2": "Building 17",
                              "admin_area_2": "San Jose",
                              "admin_area_1": "CA",
                              "postal_code": "95131",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "authorizations": [
                              {
                                "id": "0AW2184448108334S",
                                "status": "CREATED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "expiration_time": "2022-01-29T21:20:49Z",
                                "create_time": "2021-12-29T21:20:49Z",
                                "update_time": "2021-12-29T21:20:49Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/capture",
                                    "rel": "capture",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/void",
                                    "rel": "void",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/reauthorize",
                                    "rel": "reauthorize",
                                    "method": "POST"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.authorize_403": {
                    "summary": "403 Authorization error",
                    "value": {
                      "name": "NOT_AUTHORIZED",
                      "message": "Authorization failed due to insufficient permissions.",
                      "debug_id": "9ecb6d8e2e112",
                      "details": [
                        {
                          "issue": "PERMISSION_DENIED",
                          "description": "You do not have permission to access or perform operations on this resource."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/overview/#error",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                    "summary": "Authorize Order - 422 - Payer Action Required",
                    "description": "This code sample attempts to authorize payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "issue": "PAYER_ACTION_REQUIRED",
                          "description": "Transaction cannot complete successfully, instruct the buyer to return to PayPal."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "f63fbc340a6ce",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-PAYER_ACTION_REQUIRED",
                          "rel": "information_link",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=9SY02093A2309081P",
                          "rel": "payer-action",
                          "method": "GET"
                        }
                      ]
                    }
                  },
                  "authorize_422_unprocessable_entity_payment_denied": {
                    "summary": "Authorize Order - 422 Unprocessable Entity Error - Payment Denied",
                    "description": "This code sample attempts to authorize an order, but the payment is denied by PayPal. This can occur due to various reasons such as insufficient funds, expired card, incorrect payment information, or payment gateway issues.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "issue": "PAYMENT_DENIED",
                          "description": "PayPal has declined to process this transaction."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "eb476257836d9",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/orders/v2/#error-PAYMENT_DENIED",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Authorize Order - PayPal Wallet as Payment Source",
            "description": "Authorize payment for an order after PayPal wallet approval. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_authorize",
              "parameters/@name=='PayPal-Request-Id'/examples/00_orders_authorize",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/201/content/application~1json/examples/00_orders_authorize"
          },
          {
            "title": "Authorize Order - Idempotent Response with PayPal Wallet",
            "description": "Authorizes payment for an order with the same idempotency key. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_authorize_idempotent",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_authorize_idempotent",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/200/content/application~1json/examples/orders_authorize_idempotent"
          },
          {
            "title": "Authorize Order - PayPal Wallet Vault ID",
            "description": "Authorizes payment for an order through a previously acquired vault id for a PayPal wallet. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_authorize_paypal_wallet_vault_id",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_authorize_paypal_wallet_vault_id",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_authorize_paypal_wallet_vault_id",
            "response_example": "responses/201/content/application~1json/examples/orders_authorize_paypal_wallet_vault_id"
          },
          {
            "title": "Authorize Order - 403 Forbidden Error - Charity is not confirmed",
            "description": "This code sample attempts to authorize a donation order, but charity is not confirmed.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_authorize_paypal_billing_agreement_id",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_authorize_paypal_billing_agreement_id",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_authorize_paypal_billing_agreement_id",
            "response_example": "responses/403/content/application~1json/examples/generic"
          },
          {
            "title": "Authorize Order - 422 - Payer Action Required",
            "description": "This code sample attempts to authorize payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc",
              "parameters/@name=='PayPal-Request-Id'/examples/authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc",
            "response_example": "responses/422/content/application~1json/examples/authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc"
          },
          {
            "title": "Authorize Order - 422 Unprocessable Entity Error - Payment Denied",
            "description": "This code sample attempts to authorize an order, but the payment is denied by PayPal. This can occur due to various reasons such as insufficient funds, expired card, incorrect payment information, or payment gateway issues.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/authorize_422_unprocessable_entity_payment_denied",
              "parameters/@name=='PayPal-Request-Id'/examples/authorize_422_unprocessable_entity_payment_denied",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/authorize_422_unprocessable_entity_payment_denied",
            "response_example": "responses/422/content/application~1json/examples/authorize_422_unprocessable_entity_payment_denied"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "00_orders_authorize": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Authorize Order - PayPal Wallet as Payment Source\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_authorize_idempotent": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Authorize Order - Idempotent Response with PayPal Wallet\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_authorize_paypal_wallet_vault_id": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"paypal\": {\n            //       \"vault_id\": \"nkq2y9g\"\n            //     }\n            //   }\n            // }\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"paypal\": {\n        //       \"vault_id\": \"nkq2y9g\"\n        //     }\n        //   }\n        // }\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"nkq2y9g\"\n//     }\n//   }\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"nkq2y9g\"\n#     }\n#   }\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"paypal\": {\n//       \"vault_id\": \"nkq2y9g\"\n//     }\n//   }\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"paypal\": {\n#       \"vault_id\": \"nkq2y9g\"\n#     }\n#   }\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_403_3": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Authorize Order - 403 Forbidden Error - Charity is not confirmed\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "authorize_422_payer_action_required_cib_psd2_sca_ba_in_sc": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"9SY02093A2309081P\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"9SY02093A2309081P\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '9SY02093A2309081P',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\ncollect = {\n    'id': '9SY02093A2309081P',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\n$collect = [\n    'id' => '9SY02093A2309081P',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Authorize Order - 422 - Payer Action Required\n\ncollect = {\n  'id' => '9SY02093A2309081P',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "authorize_422_unprocessable_entity_payment_denied": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"payment_source\": {\n            //     \"card\": {\n            //       \"vault_id\": \"8cg02452we902502k\"\n            //     }\n            //   }\n            // }\n\n            AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<OrderAuthorizeResponse> result = await ordersController.AuthorizeOrderAsync(authorizeOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"payment_source\": {\n        //     \"card\": {\n        //       \"vault_id\": \"8cg02452we902502k\"\n        //     }\n        //   }\n        // }\n\n        AuthorizeOrderInput authorizeOrderInput = new AuthorizeOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.authorizeOrderAsync(authorizeOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"card\": {\n//       \"vault_id\": \"8cg02452we902502k\"\n//     }\n//   }\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.authorizeOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"card\": {\n#       \"vault_id\": \"8cg02452we902502k\"\n#     }\n#   }\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.authorize_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"payment_source\": {\n//     \"card\": {\n//       \"vault_id\": \"8cg02452we902502k\"\n//     }\n//   }\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->authorizeOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"payment_source\": {\n#     \"card\": {\n#       \"vault_id\": \"8cg02452we902502k\"\n#     }\n#   }\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.authorize_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}/capture": {
      "post": {
        "operationId": "orders.capture",
        "summary": "Capture payment for order",
        "description": "Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href=\"https://developer.paypal.com/api/rest/reference/orders/v2/errors/#capture-order\">Orders v2 errors</a>.</blockquote>",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants"
            ]
          }
        ],
        "parameters": [
          {
            "name": "PayPal-Request-Id",
            "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 108,
              "pattern": "^[\\S\\s]*$"
            },
            "examples": {
              "orders_capture_wallet_idempotent": {
                "summary": "Capture Order - Idempotent Response with PayPal Wallet",
                "description": "Captures payment for an order after wallet approval with the same idempotency key. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "capture_422_unprocessable_entity": {
                "summary": "Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent",
                "description": "This code sample attempts to capture payment for an order that was created with `intent=AUTHORIZE`. The operation is incorrect.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "00_orders_capture": {
                "summary": "Capture Order - PayPal Wallet as Payment Source",
                "description": "Captures payment for an order after wallet approval. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "capture_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                "summary": "Capture Order - 422 - Payer Action Required",
                "description": "This code sample attempts to capture payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              },
              "orders_capture_vault_wallet": {
                "summary": "Capture Order - Minimal Representation with PayPal Wallet Vault ID",
                "description": "The partner captures payment for an order after PayPal Wallet approval. By default, uses the minimal representation.",
                "value": "7b92603e-77ed-4896-8e78-5dea2050476a"
              }
            }
          },
          {
            "name": "Prefer",
            "description": "The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 25,
              "pattern": "^[a-zA-Z=,-]*$",
              "default": "return=minimal"
            }
          },
          {
            "$ref": "#/components/parameters/paypal_client_metadata_id"
          },
          {
            "name": "id",
            "description": "The ID of the order for which to capture a payment.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "00_orders_capture": {
                "summary": "Capture Order - PayPal Wallet as Payment Source",
                "description": "Captures payment for an order after wallet approval. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              },
              "capture_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                "summary": "Capture Order - 422 - Payer Action Required",
                "description": "This code sample attempts to capture payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                "value": "5O190127TN364715T"
              },
              "capture_422_unprocessable_entity": {
                "summary": "Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent",
                "description": "This code sample attempts to capture payment for an order that was created with `intent=AUTHORIZE`. The operation is incorrect.",
                "value": "5O190127TN364715T"
              },
              "orders_capture_vault_wallet": {
                "summary": "Capture Order - Minimal Representation with PayPal Wallet Vault ID",
                "description": "The partner captures payment for an order after PayPal Wallet approval. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              },
              "orders_capture_wallet_idempotent": {
                "summary": "Capture Order - Idempotent Response with PayPal Wallet",
                "description": "Captures payment for an order after wallet approval with the same idempotency key. By default, uses the minimal representation.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order_capture_request"
              },
              "examples": {
                "00_orders_capture": {
                  "summary": "201 - Capture Order - PayPal Wallet as Payment Source",
                  "description": "Captures payment for an order after wallet approval. By default, uses the minimal representation.",
                  "value": {}
                },
                "orders_capture_wallet_idempotent": {
                  "summary": "200 - Capture Order - Idempotent Response with PayPal Wallet",
                  "description": "Captures payment for an order after wallet approval with the same idempotency key. By default, uses the minimal representation.",
                  "value": {}
                },
                "orders_capture_vault_wallet": {
                  "summary": "201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID",
                  "description": "The partner captures payment for an order after PayPal Wallet approval. By default, uses the minimal representation.",
                  "value": {}
                },
                "flow_403_3": {
                  "summary": "403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID",
                  "value": {}
                },
                "flow_404_4": {
                  "summary": "404 - Capture Order - 404 Not Found Error - Resource Not Found",
                  "value": {}
                },
                "capture_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                  "summary": "422 - Capture Order - 422 - Payer Action Required",
                  "description": "This code sample attempts to capture payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                  "value": {}
                },
                "capture_422_unprocessable_entity": {
                  "summary": "422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent",
                  "description": "This code sample attempts to capture payment for an order that was created with `intent=AUTHORIZE`. The operation is incorrect.",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows captured payment details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "orders_capture_wallet_idempotent": {
                    "summary": "Capture Order - Idempotent Response with PayPal Wallet",
                    "description": "Captures payment for an order after wallet approval with the same idempotency key. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ",
                          "account_status": "VERIFIED"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "shipping": {
                            "address": {
                              "address_line_1": "2211 N First Street",
                              "address_line_2": "Building 17",
                              "admin_area_2": "San Jose",
                              "admin_area_1": "CA",
                              "postal_code": "95131",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "captures": [
                              {
                                "id": "3C679366HH908993F",
                                "status": "COMPLETED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "final_capture": true,
                                "seller_receivable_breakdown": {
                                  "gross_amount": {
                                    "currency_code": "USD",
                                    "value": "100.00"
                                  },
                                  "paypal_fee": {
                                    "currency_code": "USD",
                                    "value": "3.00"
                                  },
                                  "net_amount": {
                                    "currency_code": "USD",
                                    "value": "97.00"
                                  }
                                },
                                "create_time": "2018-04-01T21:20:49Z",
                                "update_time": "2018-04-01T21:20:49Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/3C679366HH908993F",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/3C679366HH908993F/refund",
                                    "rel": "refund",
                                    "method": "POST"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "payer_id": "QYR5Z8XDVJNXQ"
                      },
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows captured payment details. If a duplicate response is retried, returns the HTTP `200 OK` status code. By default, the response is minimal. If you need the complete resource representation, pass the <a href=\"https://developer.paypal.com/docs/api/orders/v2/#orders-authorize-header-parameters\"><code>Prefer: return=representation</code> request header</a>.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "00_orders_capture": {
                    "summary": "Capture Order - PayPal Wallet as Payment Source",
                    "description": "Captures payment for an order after wallet approval. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "name": {
                            "given_name": "John",
                            "surname": "Doe"
                          },
                          "email_address": "customer@example.com",
                          "account_id": "QYR5Z8XDVJNXQ"
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "shipping": {
                            "address": {
                              "address_line_1": "2211 N First Street",
                              "address_line_2": "Building 17",
                              "admin_area_2": "San Jose",
                              "admin_area_1": "CA",
                              "postal_code": "95131",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "captures": [
                              {
                                "id": "3C679366HH908993F",
                                "status": "COMPLETED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "final_capture": true,
                                "seller_receivable_breakdown": {
                                  "gross_amount": {
                                    "currency_code": "USD",
                                    "value": "100.00"
                                  },
                                  "paypal_fee": {
                                    "currency_code": "USD",
                                    "value": "3.00"
                                  },
                                  "net_amount": {
                                    "currency_code": "USD",
                                    "value": "97.00"
                                  }
                                },
                                "create_time": "2018-04-01T21:20:49Z",
                                "update_time": "2018-04-01T21:20:49Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/3C679366HH908993F",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/3C679366HH908993F/refund",
                                    "rel": "refund",
                                    "method": "POST"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "payer": {
                        "name": {
                          "given_name": "John",
                          "surname": "Doe"
                        },
                        "email_address": "customer@example.com",
                        "payer_id": "QYR5Z8XDVJNXQ"
                      },
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  },
                  "orders_capture_vault_wallet": {
                    "summary": "Capture Order - Minimal Representation with PayPal Wallet Vault ID",
                    "description": "The partner captures payment for an order after PayPal Wallet approval. By default, uses the minimal representation.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "payment_source": {
                        "paypal": {
                          "attributes": {
                            "vault": {
                              "id": "m6yd4yw",
                              "status": "CREATED"
                            }
                          }
                        }
                      },
                      "purchase_units": [
                        {
                          "reference_id": "refernece_id_1001",
                          "shipping": {
                            "name": {
                              "full_name": "William Chris"
                            },
                            "address": {
                              "address_line_1": "500 Hillside Street",
                              "address_line_2": "#100",
                              "admin_area_2": "San Jose",
                              "admin_area_1": "CA",
                              "postal_code": "95131",
                              "country_code": "US"
                            }
                          },
                          "payments": {
                            "captures": [
                              {
                                "id": "54986457XR262021N",
                                "status": "COMPLETED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "31.01"
                                },
                                "final_capture": true,
                                "seller_protection": {
                                  "status": "ELIGIBLE",
                                  "dispute_categories": [
                                    "ITEM_NOT_RECEIVED",
                                    "UNAUTHORIZED_TRANSACTION"
                                  ]
                                },
                                "seller_receivable_breakdown": {
                                  "gross_amount": {
                                    "currency_code": "USD",
                                    "value": "31.01"
                                  },
                                  "platform_fees": [
                                    {
                                      "amount": {
                                        "currency_code": "USD",
                                        "value": "10.01"
                                      },
                                      "payee": {
                                        "merchant_id": "J8NCBBULP5JH2"
                                      }
                                    }
                                  ],
                                  "net_amount": {
                                    "currency_code": "USD",
                                    "value": "21.00"
                                  }
                                },
                                "invoice_id": "invoice_id_380358551C5240203",
                                "custom_id": "custom_id_1001",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/54986457XR262021N",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/54986457XR262021N/refund",
                                    "rel": "refund",
                                    "method": "POST"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/checkout/orders/12645781RH9888226",
                                    "rel": "up",
                                    "method": "GET"
                                  }
                                ],
                                "create_time": "2020-06-08T23:11:34Z",
                                "update_time": "2020-06-08T23:11:34Z"
                              }
                            ]
                          }
                        }
                      ],
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        },
                        {
                          "href": "https://api-m.paypal.com/v2/vault/payment-tokens/m6yd4yw",
                          "rel": "payment-token",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.capture_403": {
                    "summary": "403 Authorization error",
                    "value": {
                      "name": "NOT_AUTHORIZED",
                      "message": "Authorization failed due to insufficient permissions.",
                      "debug_id": "9ecb6d8e2e112",
                      "details": [
                        {
                          "issue": "PERMISSION_DENIED",
                          "description": "You do not have permission to access or perform operations on this resource."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/overview/#error",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/404_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.capture_404": {
                    "summary": "404 Resource not found",
                    "value": {
                      "name": "RESOURCE_NOT_FOUND",
                      "message": "The specified resource does not exist.",
                      "debug_id": "ccb6f410b107f",
                      "details": [
                        {
                          "issue": "INVALID_RESOURCE_ID",
                          "description": "Specified resource ID does not exist. Please check the resource ID and try again."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "capture_422_payer_action_required_cib_psd2_sca_ba_in_sc": {
                    "summary": "Capture Order - 422 - Payer Action Required",
                    "description": "This code sample attempts to capture payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "issue": "PAYER_ACTION_REQUIRED",
                          "description": "Transaction cannot complete successfully, instruct the buyer to return to PayPal."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "f63fbc340a6ce",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-PAYER_ACTION_REQUIRED",
                          "rel": "information_link",
                          "method": "GET"
                        },
                        {
                          "href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
                          "rel": "payer-action",
                          "method": "GET"
                        }
                      ]
                    }
                  },
                  "capture_422_unprocessable_entity": {
                    "summary": "Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent",
                    "description": "This code sample attempts to capture payment for an order that was created with `intent=AUTHORIZE`. The operation is incorrect.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "details": [
                        {
                          "location": "body",
                          "issue": "ACTION_DOES_NOT_MATCH_INTENT",
                          "description": "The order was created with an intent of `AUTHORIZE`. To complete authorization, use `/v2/checkout/orders/{order_id}/authorize`. Or, alternately create an order with an intent of `CAPTURE`."
                        }
                      ],
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "90957fca61718",
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-ACTION_DOES_NOT_MATCH_INTENT",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Capture Order - PayPal Wallet as Payment Source",
            "description": "Captures payment for an order after wallet approval. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/00_orders_capture",
              "parameters/@name=='PayPal-Request-Id'/examples/00_orders_capture",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/201/content/application~1json/examples/00_orders_capture"
          },
          {
            "title": "Capture Order - Idempotent Response with PayPal Wallet",
            "description": "Captures payment for an order after wallet approval with the same idempotency key. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_capture_wallet_idempotent",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_capture_wallet_idempotent",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/200/content/application~1json/examples/orders_capture_wallet_idempotent"
          },
          {
            "title": "Capture Order - Minimal Representation with PayPal Wallet Vault ID",
            "description": "The partner captures payment for an order after PayPal Wallet approval. By default, uses the minimal representation.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_capture_vault_wallet",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_capture_vault_wallet",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/201/content/application~1json/examples/orders_capture_vault_wallet"
          },
          {
            "title": "Capture Order - 403 Forbidden Error - Invalid Card Vault ID",
            "description": "This code sample attempts to capture an order that was created with the `CAPTURE` intent but the card vault id can not be found. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
              "parameters/@name=='Authorization'/examples/bearer",
              "parameters/@name=='Prefer'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
            "response_example": "responses/403/content/application~1json/examples/generic"
          },
          {
            "title": "Capture Order - 404 Not Found Error - Resource Not Found",
            "description": "This code sample attempts to capture an order but the specified order is not found. The request fails.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
              "parameters/@name=='PayPal-Request-Id'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
              "parameters/@name=='Authorization'/examples/bearer",
              "parameters/@name=='Prefer'/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_capture_orders_capture_bank_ach_debit_verified_account_customer_id_vault_instruction_vaulted",
            "response_example": "responses/404/content/application~1json/examples/generic"
          },
          {
            "title": "Capture Order - 422 - Payer Action Required",
            "description": "This code sample attempts to capture payment for an order that was created by the api caller and the payment could not be processed due to PSD2 SCA compliance requirement.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/capture_422_payer_action_required_cib_psd2_sca_ba_in_sc",
              "parameters/@name=='PayPal-Request-Id'/examples/capture_422_payer_action_required_cib_psd2_sca_ba_in_sc",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/capture_422_payer_action_required_cib_psd2_sca_ba_in_sc",
            "response_example": "responses/422/content/application~1json/examples/capture_422_payer_action_required_cib_psd2_sca_ba_in_sc"
          },
          {
            "title": "Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent",
            "description": "This code sample attempts to capture payment for an order that was created with `intent=AUTHORIZE`. The operation is incorrect.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/capture_422_unprocessable_entity",
              "parameters/@name=='PayPal-Request-Id'/examples/capture_422_unprocessable_entity",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/422/content/application~1json/examples/capture_422_unprocessable_entity"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "00_orders_capture": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Capture Order - PayPal Wallet as Payment Source\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_capture_wallet_idempotent": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 200 - Capture Order - Idempotent Response with PayPal Wallet\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_capture_vault_wallet": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 201 - Capture Order - Minimal Representation with PayPal Wallet Vault ID\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_403_3": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 403 - Capture Order - 403 Forbidden Error - Invalid Card Vault ID\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_404_4": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 404 - Capture Order - 404 Not Found Error - Resource Not Found\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "capture_422_payer_action_required_cib_psd2_sca_ba_in_sc": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 422 - Capture Order - 422 - Payer Action Required\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 422 - Capture Order - 422 - Payer Action Required\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 422 - Capture Order - 422 - Payer Action Required\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Capture Order - 422 - Payer Action Required\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 422 - Capture Order - 422 - Payer Action Required\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Capture Order - 422 - Payer Action Required\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "capture_422_unprocessable_entity": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CaptureOrderInput captureOrderInput = new CaptureOrderInput\n            {\n                Id = \"5O190127TN364715T\",\n                Prefer = \"return=minimal\",\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CaptureOrderAsync(captureOrderInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CaptureOrderInput captureOrderInput = new CaptureOrderInput.Builder(\n            \"5O190127TN364715T\",\n            null\n        )\n        .prefer(\"return=minimal\")\n        .build();\n\n        ordersController.captureOrderAsync(captureOrderInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  prefer: 'return=minimal'\n}\n\ntry {\n  const response = await ordersController.captureOrder(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'prefer': 'return=minimal'\n}\nresult = orders_controller.capture_order(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'prefer' => 'return=minimal'\n];\n\n$apiResponse = $ordersController->captureOrder($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 422 - Capture Order - 422 Unprocessable Entity Error - Action Does Not Match Intent\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'prefer' => 'return=minimal'\n}\n\nresult = orders_controller.capture_order(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}/track": {
      "post": {
        "operationId": "orders.track.create",
        "summary": "Add tracking information for an Order.",
        "description": "Adds tracking information for an Order.",
        "tags": [
          "orders"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "description": "The ID of the order that the tracking information is associated with.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "orders_track_create_complete_request": {
                "summary": "Add Tracking to Order - Carrier Information and Items Breakdown",
                "description": "Adds tracking information for a PayPal order.",
                "value": "5O190127TN364715T"
              },
              "orders_track_create_idempotent_complete_request": {
                "summary": "Add Tracking to Order - Idempotent Response",
                "description": "Adds tracking information for a PayPal Order with the same capture id & tracking number. Idempotency for trackers is based on the capture_id and tracking_number combination sent in the request body.",
                "value": "5O190127TN364715T"
              },
              "track_create_422_unprocessable_entity_invalid_capture_status": {
                "summary": "Add Tracking to Order - 422 Unprocessable Entity Error - Invalid Capture Status.",
                "description": "This code sample attempts to add tracking information for a PayPal order but the request fails as capture status is invalid.",
                "value": "5O190127TN364715T"
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order_tracker_request"
              },
              "examples": {
                "orders_track_create_complete_request": {
                  "summary": "201 - Add Tracking to Order - Carrier Information and Items Breakdown",
                  "description": "Adds tracking information for a PayPal order.",
                  "value": {
                    "capture_id": "8MC585209K746392H",
                    "tracking_number": "443844607820",
                    "notify_payer": false,
                    "items": [
                      {
                        "name": "T-Shirt",
                        "sku": "sku02",
                        "quantity": "1",
                        "upc": {
                          "type": "UPC-A",
                          "code": "012345678901"
                        },
                        "image_url": "https://www.example.com/example.jpg",
                        "url": "https://www.example.com/example"
                      }
                    ]
                  }
                },
                "orders_track_create_idempotent_complete_request": {
                  "summary": "500 - Add Tracking to Order - 500 Internal Server Error",
                  "description": "Adds tracking information for a PayPal Order with the same capture id & tracking number. Idempotency for trackers is based on the capture_id and tracking_number combination sent in the request body.",
                  "value": {
                    "capture_id": "8MC585209K746392H",
                    "tracking_number": "443844607820",
                    "notify_payer": false,
                    "items": [
                      {
                        "name": "T-Shirt",
                        "sku": "sku01",
                        "quantity": "1",
                        "upc": {
                          "type": "UPC-A",
                          "code": "012345678901"
                        },
                        "image_url": "https://www.example.com/example.jpg",
                        "url": "https://www.example.com/example"
                      }
                    ]
                  }
                },
                "flow_400_2": {
                  "summary": "400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter",
                  "value": {}
                },
                "track_create_422_unprocessable_entity_invalid_capture_status": {
                  "summary": "422 - Add Tracking to Order - 422 Unprocessable Entity Error - Invalid Capture Status.",
                  "description": "This code sample attempts to add tracking information for a PayPal order but the request fails as capture status is invalid.",
                  "value": {
                    "capture_id": "8MC585209K746392H",
                    "tracking_number": "443844607820"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows tracker details. If a duplicate response is retried, returns the HTTP `200 OK` status code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order"
                },
                "examples": {
                  "orders_track_create_complete_request": {
                    "summary": "Add Tracking to Order - Carrier Information and Items Breakdown",
                    "description": "Adds tracking information for a PayPal order.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "purchase_units": [
                        {
                          "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                          "items": [
                            {
                              "name": "Air Jordan Shoe",
                              "sku": "sku01",
                              "quantity": "1",
                              "unit_amount": {
                                "currency_code": "USD",
                                "value": "50.00"
                              }
                            },
                            {
                              "name": "T-Shirt",
                              "sku": "sku02",
                              "quantity": "1",
                              "unit_amount": {
                                "currency_code": "USD",
                                "value": "50.00"
                              }
                            }
                          ],
                          "shipping": {
                            "trackers": [
                              {
                                "id": "8MC585209K746392H-443844607820",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                                    "rel": "up",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/trackers/8MC585209K746392H-443844607820",
                                    "rel": "edit",
                                    "method": "PATCH"
                                  }
                                ],
                                "create_time": "2022-08-12T21:20:49Z",
                                "update_time": "2022-08-12T21:20:49Z"
                              }
                            ]
                          },
                          "payments": {
                            "captures": [
                              {
                                "id": "8MC585209K746392H",
                                "status": "COMPLETED",
                                "amount": {
                                  "currency_code": "USD",
                                  "value": "100.00"
                                },
                                "seller_protection": {
                                  "status": "NOT_ELIGIBLE"
                                },
                                "final_capture": true,
                                "seller_receivable_breakdown": {
                                  "gross_amount": {
                                    "currency_code": "USD",
                                    "value": "100.00"
                                  },
                                  "paypal_fee": {
                                    "currency_code": "USD",
                                    "value": "3.00"
                                  },
                                  "net_amount": {
                                    "currency_code": "USD",
                                    "value": "97.00"
                                  }
                                },
                                "create_time": "2018-04-01T21:20:49Z",
                                "update_time": "2018-04-01T21:20:49Z",
                                "links": [
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/8MC585209K746392H",
                                    "rel": "self",
                                    "method": "GET"
                                  },
                                  {
                                    "href": "https://api-m.paypal.com/v2/payments/captures/8MC585209K746392H/refund",
                                    "rel": "refund",
                                    "method": "POST"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "links": [
                        {
                          "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
                          "rel": "self",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "track_create_400_missing_parameter": {
                    "summary": "Add Tracking to Order - 400 Bad Request - Missing Required Parameter",
                    "description": "This code sample attempts to add tracking information for a PayPal order but required parameter capture id is not passed.",
                    "value": {
                      "name": "INVALID_REQUEST",
                      "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
                      "debug_id": "360ee42996992",
                      "details": [
                        {
                          "field": "/capture_id",
                          "issue": "MISSING_REQUIRED_PARAMETER",
                          "description": "A required field / parameter is missing.",
                          "location": "body"
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "track_create_422_unprocessable_entity_invalid_capture_status": {
                    "summary": "Add Tracking to Order - 422 Unprocessable Entity Error - Invalid Capture Status.",
                    "description": "This code sample attempts to add tracking information for a PayPal order but the request fails as capture status is invalid.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "360ee42996992",
                      "details": [
                        {
                          "issue": "CAPTURE_STATUS_NOT_VALID",
                          "description": "Invalid capture status. Tracker information can only be added to captures in `COMPLETED` state."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/orders/v2/#error-CAPTURE_STATUS_NOT_VALID",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Add Tracking to Order - Carrier Information and Items Breakdown",
            "description": "Adds tracking information for a PayPal order.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_track_create_complete_request",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_track_create_complete_request",
            "response_example": "responses/201/content/application~1json/examples/orders_track_create_complete_request"
          },
          {
            "title": "Add Tracking to Order - Idempotent Response",
            "description": "Adds tracking information for a PayPal Order with the same capture id & tracking number. Idempotency for trackers is based on the capture_id and tracking_number combination sent in the request body.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_track_create_idempotent_complete_request",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_track_create_idempotent_complete_request",
            "response_example": "responses/200/content/application~1json/examples/orders_track_create_idempotent_complete_request"
          },
          {
            "title": "Add Tracking to Order - 400 Bad Request - Missing Required Parameter",
            "description": "This code sample attempts to add tracking information for a PayPal order but required parameter capture id is not passed.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_track_create_idempotent_complete_request",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/400/content/application~1json/examples/track_create_400_missing_parameter"
          },
          {
            "title": "Add Tracking to Order - 403 Forbidden - No Permission for the Order",
            "description": "This code sample attempts to add tracking information for a Paypal Order, but the API caller does not have permission to act on this resource.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_track_create_idempotent_complete_request",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_track_create_idempotent_complete_request",
            "response_example": "responses/403/content/application~1json/examples/generic"
          },
          {
            "title": "Add Tracking to Order - 422 Unprocessable Entity Error - Invalid Capture Status.",
            "description": "This code sample attempts to add tracking information for a PayPal order but the request fails as capture status is invalid.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/track_create_422_unprocessable_entity_invalid_capture_status",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/track_create_422_unprocessable_entity_invalid_capture_status",
            "response_example": "responses/422/content/application~1json/examples/track_create_422_unprocessable_entity_invalid_capture_status"
          },
          {
            "title": "Add Tracking to Order - 500 Internal Server Error",
            "description": "This code sample attempts to add tracking information for a PayPal Order but the request fails due to an internal server error.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/orders_track_create_idempotent_complete_request",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_track_create_idempotent_complete_request",
            "response_example": "responses/500/content/application~1json/examples/generic"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new OrderTrackerRequest\n                {\n                    CaptureId = \"74L756601X447022Y\",\n                    NotifyPayer = false,\n                },\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderTrackingAsync(createOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            null,\n            new OrderTrackerRequest.Builder(\n                \"74L756601X447022Y\"\n            )\n            .notifyPayer(false)\n            .build()\n        )\n        .build();\n\n        ordersController.createOrderTrackingAsync(createOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: {\n    captureId: '74L756601X447022Y',\n    notifyPayer: false,\n  }\n}\n\ntry {\n  const response = await ordersController.createOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_tracker_request import OrderTrackerRequest\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': OrderTrackerRequest(\n        capture_id='74L756601X447022Y',\n        notify_payer=False\n    )\n}\nresult = orders_controller.create_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => OrderTrackerRequestBuilder::init(\n        '74L756601X447022Y'\n    )\n        ->notifyPayer(false)\n        ->build()\n];\n\n$apiResponse = $ordersController->createOrderTracking($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => OrderTrackerRequest.new(\n    capture_id: '74L756601X447022Y',\n    notify_payer: false\n  )\n}\n\nresult = orders_controller.create_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "orders_track_create_complete_request": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"capture_id\": \"8MC585209K746392H\",\n            //   \"tracking_number\": \"443844607820\",\n            //   \"notify_payer\": false,\n            //   \"items\": [\n            //     {\n            //       \"name\": \"T-Shirt\",\n            //       \"sku\": \"sku02\",\n            //       \"quantity\": \"1\",\n            //       \"upc\": {\n            //         \"type\": \"UPC-A\",\n            //         \"code\": \"012345678901\"\n            //       },\n            //       \"image_url\": \"https://www.example.com/example.jpg\",\n            //       \"url\": \"https://www.example.com/example\"\n            //     }\n            //   ]\n            // }\n\n            CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new OrderTrackerRequest\n                {\n                    CaptureId = \"74L756601X447022Y\",\n                    NotifyPayer = false,\n                },\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderTrackingAsync(createOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"capture_id\": \"8MC585209K746392H\",\n        //   \"tracking_number\": \"443844607820\",\n        //   \"notify_payer\": false,\n        //   \"items\": [\n        //     {\n        //       \"name\": \"T-Shirt\",\n        //       \"sku\": \"sku02\",\n        //       \"quantity\": \"1\",\n        //       \"upc\": {\n        //         \"type\": \"UPC-A\",\n        //         \"code\": \"012345678901\"\n        //       },\n        //       \"image_url\": \"https://www.example.com/example.jpg\",\n        //       \"url\": \"https://www.example.com/example\"\n        //     }\n        //   ]\n        // }\n\n        CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            null,\n            new OrderTrackerRequest.Builder(\n                \"74L756601X447022Y\"\n            )\n            .notifyPayer(false)\n            .build()\n        )\n        .build();\n\n        ordersController.createOrderTrackingAsync(createOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\",\n//   \"notify_payer\": false,\n//   \"items\": [\n//     {\n//       \"name\": \"T-Shirt\",\n//       \"sku\": \"sku02\",\n//       \"quantity\": \"1\",\n//       \"upc\": {\n//         \"type\": \"UPC-A\",\n//         \"code\": \"012345678901\"\n//       },\n//       \"image_url\": \"https://www.example.com/example.jpg\",\n//       \"url\": \"https://www.example.com/example\"\n//     }\n//   ]\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: {\n    captureId: '74L756601X447022Y',\n    notifyPayer: false,\n  }\n}\n\ntry {\n  const response = await ordersController.createOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_tracker_request import OrderTrackerRequest\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\",\n#   \"notify_payer\": false,\n#   \"items\": [\n#     {\n#       \"name\": \"T-Shirt\",\n#       \"sku\": \"sku02\",\n#       \"quantity\": \"1\",\n#       \"upc\": {\n#         \"type\": \"UPC-A\",\n#         \"code\": \"012345678901\"\n#       },\n#       \"image_url\": \"https://www.example.com/example.jpg\",\n#       \"url\": \"https://www.example.com/example\"\n#     }\n#   ]\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': OrderTrackerRequest(\n        capture_id='74L756601X447022Y',\n        notify_payer=False\n    )\n}\nresult = orders_controller.create_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\",\n//   \"notify_payer\": false,\n//   \"items\": [\n//     {\n//       \"name\": \"T-Shirt\",\n//       \"sku\": \"sku02\",\n//       \"quantity\": \"1\",\n//       \"upc\": {\n//         \"type\": \"UPC-A\",\n//         \"code\": \"012345678901\"\n//       },\n//       \"image_url\": \"https://www.example.com/example.jpg\",\n//       \"url\": \"https://www.example.com/example\"\n//     }\n//   ]\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => OrderTrackerRequestBuilder::init(\n        '74L756601X447022Y'\n    )\n        ->notifyPayer(false)\n        ->build()\n];\n\n$apiResponse = $ordersController->createOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\",\n#   \"notify_payer\": false,\n#   \"items\": [\n#     {\n#       \"name\": \"T-Shirt\",\n#       \"sku\": \"sku02\",\n#       \"quantity\": \"1\",\n#       \"upc\": {\n#         \"type\": \"UPC-A\",\n#         \"code\": \"012345678901\"\n#       },\n#       \"image_url\": \"https://www.example.com/example.jpg\",\n#       \"url\": \"https://www.example.com/example\"\n#     }\n#   ]\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => OrderTrackerRequest.new(\n    capture_id: '74L756601X447022Y',\n    notify_payer: false\n  )\n}\n\nresult = orders_controller.create_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_track_create_idempotent_complete_request": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"capture_id\": \"8MC585209K746392H\",\n            //   \"tracking_number\": \"443844607820\",\n            //   \"notify_payer\": false,\n            //   \"items\": [\n            //     {\n            //       \"name\": \"T-Shirt\",\n            //       \"sku\": \"sku01\",\n            //       \"quantity\": \"1\",\n            //       \"upc\": {\n            //         \"type\": \"UPC-A\",\n            //         \"code\": \"012345678901\"\n            //       },\n            //       \"image_url\": \"https://www.example.com/example.jpg\",\n            //       \"url\": \"https://www.example.com/example\"\n            //     }\n            //   ]\n            // }\n\n            CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new OrderTrackerRequest\n                {\n                    CaptureId = \"74L756601X447022Y\",\n                    NotifyPayer = false,\n                },\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderTrackingAsync(createOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"capture_id\": \"8MC585209K746392H\",\n        //   \"tracking_number\": \"443844607820\",\n        //   \"notify_payer\": false,\n        //   \"items\": [\n        //     {\n        //       \"name\": \"T-Shirt\",\n        //       \"sku\": \"sku01\",\n        //       \"quantity\": \"1\",\n        //       \"upc\": {\n        //         \"type\": \"UPC-A\",\n        //         \"code\": \"012345678901\"\n        //       },\n        //       \"image_url\": \"https://www.example.com/example.jpg\",\n        //       \"url\": \"https://www.example.com/example\"\n        //     }\n        //   ]\n        // }\n\n        CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            null,\n            new OrderTrackerRequest.Builder(\n                \"74L756601X447022Y\"\n            )\n            .notifyPayer(false)\n            .build()\n        )\n        .build();\n\n        ordersController.createOrderTrackingAsync(createOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\",\n//   \"notify_payer\": false,\n//   \"items\": [\n//     {\n//       \"name\": \"T-Shirt\",\n//       \"sku\": \"sku01\",\n//       \"quantity\": \"1\",\n//       \"upc\": {\n//         \"type\": \"UPC-A\",\n//         \"code\": \"012345678901\"\n//       },\n//       \"image_url\": \"https://www.example.com/example.jpg\",\n//       \"url\": \"https://www.example.com/example\"\n//     }\n//   ]\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: {\n    captureId: '74L756601X447022Y',\n    notifyPayer: false,\n  }\n}\n\ntry {\n  const response = await ordersController.createOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_tracker_request import OrderTrackerRequest\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\",\n#   \"notify_payer\": false,\n#   \"items\": [\n#     {\n#       \"name\": \"T-Shirt\",\n#       \"sku\": \"sku01\",\n#       \"quantity\": \"1\",\n#       \"upc\": {\n#         \"type\": \"UPC-A\",\n#         \"code\": \"012345678901\"\n#       },\n#       \"image_url\": \"https://www.example.com/example.jpg\",\n#       \"url\": \"https://www.example.com/example\"\n#     }\n#   ]\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': OrderTrackerRequest(\n        capture_id='74L756601X447022Y',\n        notify_payer=False\n    )\n}\nresult = orders_controller.create_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\",\n//   \"notify_payer\": false,\n//   \"items\": [\n//     {\n//       \"name\": \"T-Shirt\",\n//       \"sku\": \"sku01\",\n//       \"quantity\": \"1\",\n//       \"upc\": {\n//         \"type\": \"UPC-A\",\n//         \"code\": \"012345678901\"\n//       },\n//       \"image_url\": \"https://www.example.com/example.jpg\",\n//       \"url\": \"https://www.example.com/example\"\n//     }\n//   ]\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => OrderTrackerRequestBuilder::init(\n        '74L756601X447022Y'\n    )\n        ->notifyPayer(false)\n        ->build()\n];\n\n$apiResponse = $ordersController->createOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\",\n#   \"notify_payer\": false,\n#   \"items\": [\n#     {\n#       \"name\": \"T-Shirt\",\n#       \"sku\": \"sku01\",\n#       \"quantity\": \"1\",\n#       \"upc\": {\n#         \"type\": \"UPC-A\",\n#         \"code\": \"012345678901\"\n#       },\n#       \"image_url\": \"https://www.example.com/example.jpg\",\n#       \"url\": \"https://www.example.com/example\"\n#     }\n#   ]\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => OrderTrackerRequest.new(\n    capture_id: '74L756601X447022Y',\n    notify_payer: false\n  )\n}\n\nresult = orders_controller.create_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_400_2": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new OrderTrackerRequest\n                {\n                    CaptureId = \"74L756601X447022Y\",\n                    NotifyPayer = false,\n                },\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderTrackingAsync(createOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            null,\n            new OrderTrackerRequest.Builder(\n                \"74L756601X447022Y\"\n            )\n            .notifyPayer(false)\n            .build()\n        )\n        .build();\n\n        ordersController.createOrderTrackingAsync(createOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: {\n    captureId: '74L756601X447022Y',\n    notifyPayer: false,\n  }\n}\n\ntry {\n  const response = await ordersController.createOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_tracker_request import OrderTrackerRequest\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': OrderTrackerRequest(\n        capture_id='74L756601X447022Y',\n        notify_payer=False\n    )\n}\nresult = orders_controller.create_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => OrderTrackerRequestBuilder::init(\n        '74L756601X447022Y'\n    )\n        ->notifyPayer(false)\n        ->build()\n];\n\n$apiResponse = $ordersController->createOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Add Tracking to Order - 400 Bad Request - Missing Required Parameter\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => OrderTrackerRequest.new(\n    capture_id: '74L756601X447022Y',\n    notify_payer: false\n  )\n}\n\nresult = orders_controller.create_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "track_create_422_unprocessable_entity_invalid_capture_status": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // {\n            //   \"capture_id\": \"8MC585209K746392H\",\n            //   \"tracking_number\": \"443844607820\"\n            // }\n\n            CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                Body = new OrderTrackerRequest\n                {\n                    CaptureId = \"74L756601X447022Y\",\n                    NotifyPayer = false,\n                },\n            };\n\n            try\n            {\n                ApiResponse<Order> result = await ordersController.CreateOrderTrackingAsync(createOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // {\n        //   \"capture_id\": \"8MC585209K746392H\",\n        //   \"tracking_number\": \"443844607820\"\n        // }\n\n        CreateOrderTrackingInput createOrderTrackingInput = new CreateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            null,\n            new OrderTrackerRequest.Builder(\n                \"74L756601X447022Y\"\n            )\n            .notifyPayer(false)\n            .build()\n        )\n        .build();\n\n        ordersController.createOrderTrackingAsync(createOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\"\n// }\n\nconst collect = {\n  id: '5O190127TN364715T',\n  body: {\n    captureId: '74L756601X447022Y',\n    notifyPayer: false,\n  }\n}\n\ntry {\n  const response = await ordersController.createOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.order_tracker_request import OrderTrackerRequest\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\"\n# }\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'body': OrderTrackerRequest(\n        capture_id='74L756601X447022Y',\n        notify_payer=False\n    )\n}\nresult = orders_controller.create_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// {\n//   \"capture_id\": \"8MC585209K746392H\",\n//   \"tracking_number\": \"443844607820\"\n// }\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'body' => OrderTrackerRequestBuilder::init(\n        '74L756601X447022Y'\n    )\n        ->notifyPayer(false)\n        ->build()\n];\n\n$apiResponse = $ordersController->createOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# {\n#   \"capture_id\": \"8MC585209K746392H\",\n#   \"tracking_number\": \"443844607820\"\n# }\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'body' => OrderTrackerRequest.new(\n    capture_id: '74L756601X447022Y',\n    notify_payer: false\n  )\n}\n\nresult = orders_controller.create_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/{id}/trackers/{tracker_id}": {
      "patch": {
        "operationId": "orders.trackers.patch",
        "summary": "Update or cancel tracking information for an order",
        "description": "Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody></tr><tr><td><code>items</code></td><td>replace</td><td>Using replace op for <code>items</code> will replace the entire <code>items</code> object with the value sent in request.</td></tr><tr><td><code>notify_payer</code></td><td>replace, add</td><td></td></tr><tr><td><code>status</code></td><td>replace</td><td>Only patching status to CANCELLED is currently supported.</td></tr></tbody></table>",
        "tags": [
          "trackers"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "description": "The ID of the order that the tracking information is associated with.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "example": {
                "value": "5O190127TN364715T",
                "summary": "Example id value",
                "description": "An example value for the id parameter."
              }
            }
          },
          {
            "name": "tracker_id",
            "description": "The order tracking ID.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "pattern": "^[A-Z0-9]+$"
            },
            "examples": {
              "example": {
                "value": "8MC585209K746392H443844607820",
                "summary": "Example tracker_id value",
                "description": "An example value for the tracker_id parameter."
              }
            }
          },
          {
            "$ref": "#/components/parameters/authorization"
          },
          {
            "$ref": "#/components/parameters/paypal_auth_assertion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_request"
              },
              "examples": {
                "orders_trackers_patch_replace_status": {
                  "summary": "200 - Patch Tracking Information - Replace the Status of the Tracker.",
                  "description": "Updates order tracking information to replace the existing status with a new status.",
                  "value": [
                    {
                      "op": "replace",
                      "path": "/status",
                      "value": "CANCELLED"
                    }
                  ]
                },
                "orders_trackers_patch_add_notify-payer": {
                  "summary": "500 - Patch Tracking Information - 500 Internal Server Error.",
                  "description": "Updates an order tracking information to add notification for a shipment.",
                  "value": [
                    {
                      "op": "add",
                      "path": "/notify_payer",
                      "value": true
                    }
                  ]
                },
                "flow_400_2": {
                  "summary": "400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.",
                  "value": {}
                },
                "trackers_patch_422_cannot_patch_cancelled_tracker": {
                  "summary": "422 - Patch Tracking Information - 422 UNPROCESSABLE ENTITY Error - Cannot patch cancelled tracker.",
                  "description": "This code sample attempts to update an order's Tracking information but the request fails as the tracker had been previously transitioned into the \"cancelled\" state.",
                  "value": [
                    {
                      "op": "replace",
                      "path": "items",
                      "value": [
                        {
                          "name": "T-Shirt",
                          "sku": "sku01",
                          "quantity": "1",
                          "upc": {
                            "type": "UPC-A",
                            "code": "upc001"
                          },
                          "image_url": "https://www.example.com/example1.jpg",
                          "url": "https://www.example.com/example"
                        },
                        {
                          "name": "NeoPhone",
                          "sku": "sku02",
                          "quantity": "2",
                          "upc": {
                            "type": "UPC-A",
                            "code": "upc002"
                          },
                          "image_url": "https://www.example.com/example2.jpg",
                          "url": "https://www.example.com/example"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/204_response"
          },
          "400": {
            "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "trackers_patch_400_invalid_patch_value": {
                    "summary": "Patch Tracking Information - 400 Bad Request Error - Invalid Request.",
                    "description": "This code sample attempts to update an order tracking information to replace notify_payer, but the request fails due to invalid value in the request.",
                    "value": {
                      "name": "INVALID_REQUEST",
                      "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
                      "debug_id": "2f541ace12987",
                      "details": [
                        {
                          "field": "/notify_payer",
                          "issue": "INVALID_PARAMETER_VALUE",
                          "description": "The value of a field is invalid.",
                          "location": "body"
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_VALUE",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/404_error_response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "orders.trackers.patch_404": {
                    "summary": "404 Resource not found",
                    "value": {
                      "name": "RESOURCE_NOT_FOUND",
                      "message": "The specified resource does not exist.",
                      "debug_id": "ccb6f410b107f",
                      "details": [
                        {
                          "issue": "INVALID_RESOURCE_ID",
                          "description": "Specified resource ID does not exist. Please check the resource ID and try again."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/payments/v2/#error-INVALID_RESOURCE_ID",
                          "rel": "information_link"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be performed, semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error"
                },
                "examples": {
                  "trackers_patch_422_cannot_patch_cancelled_tracker": {
                    "summary": "Patch Tracking Information - 422 UNPROCESSABLE ENTITY Error - Cannot patch cancelled tracker.",
                    "description": "This code sample attempts to update an order's Tracking information but the request fails as the tracker had been previously transitioned into the \"cancelled\" state.",
                    "value": {
                      "name": "UNPROCESSABLE_ENTITY",
                      "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
                      "debug_id": "3178dbf457625",
                      "details": [
                        {
                          "field": "path",
                          "value": "/status",
                          "location": "body",
                          "issue": "CANNOT_PATCH_CANCELLED_TRACKER",
                          "description": "Cancelled trackers cannot be modified."
                        }
                      ],
                      "links": [
                        {
                          "href": "https://developer.paypal.com/docs/api/orders/v2/#error-NOT_PATCHABLE",
                          "rel": "information_link",
                          "method": "GET"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Patch Tracking Information - Replace the Status of the Tracker.",
            "description": "Updates order tracking information to replace the existing status with a new status.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_trackers_patch_replace_status"
          },
          {
            "title": "Patch Tracking Information - Add Notification for a Shipment.",
            "description": "Updates an order tracking information to add notification for a shipment.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_trackers_patch_add_notify-payer"
          },
          {
            "title": "Patch Tracking Information - 400 Bad Request Error - Invalid Request.",
            "description": "This code sample attempts to update an order tracking information to replace notify_payer, but the request fails due to invalid value in the request.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "response_example": "responses/400/content/application~1json/examples/trackers_patch_400_invalid_patch_value"
          },
          {
            "title": "Patch Tracking Information - 403 Forbidden.",
            "description": "This code sample attempts to update an Order Tracking information, but the API caller does not have permission to act on this resource.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_trackers_patch_add_notify-payer",
            "response_example": "responses/403/content/application~1json/examples/generic"
          },
          {
            "title": "Patch Tracking Information - 404 Not Found Error - Tracker ID Not Found.",
            "description": "This code sample attempts to update an Order Tracking information but the request fails as specified tracker id is not found.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_trackers_patch_add_notify-payer",
            "response_example": "responses/404/content/application~1json/examples/generic"
          },
          {
            "title": "Patch Tracking Information - 422 UNPROCESSABLE ENTITY Error - Cannot patch cancelled tracker.",
            "description": "This code sample attempts to update an order's Tracking information but the request fails as the tracker had been previously transitioned into the \"cancelled\" state.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/trackers_patch_422_cannot_patch_cancelled_tracker",
            "response_example": "responses/422/content/application~1json/examples/trackers_patch_422_cannot_patch_cancelled_tracker"
          },
          {
            "title": "Patch Tracking Information - 500 Internal Server Error.",
            "description": "This code sample attempts to update an Order Tracking information but the request fails due to an internal server error.",
            "parameter_examples": [
              "parameters/@name=='id'/examples/example",
              "parameters/@name=='tracker_id'/examples/example",
              "parameters/@name=='Authorization'/examples/bearer"
            ],
            "request_body_example": "requestBody/content/application~1json/examples/orders_trackers_patch_add_notify-payer",
            "response_example": "responses/500/content/application~1json/examples/generic"
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": ".NET",
            "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                TrackerId = \"1YU08902781691411\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.UpdateOrderTrackingAsync(updateOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
          },
          {
            "lang": "java",
            "label": "Java",
            "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            \"1YU08902781691411\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.updateOrderTrackingAsync(updateOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
          },
          {
            "lang": "typescript",
            "label": "Node",
            "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  trackerId: '1YU08902781691411',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.updateOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'tracker_id': '1YU08902781691411',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.update_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
          },
          {
            "lang": "php",
            "label": "PHP",
            "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'trackerId' => '1YU08902781691411',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->updateOrderTracking($collect);"
          },
          {
            "lang": "ruby",
            "label": "Ruby",
            "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'tracker_id' => '1YU08902781691411',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.update_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
          }
        ],
        "x-sdkSampleMap": {
          "application/json": {
            "orders_trackers_patch_replace_status": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"replace\",\n            //     \"path\": \"/status\",\n            //     \"value\": \"CANCELLED\"\n            //   }\n            // ]\n\n            UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                TrackerId = \"1YU08902781691411\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.UpdateOrderTrackingAsync(updateOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"replace\",\n        //     \"path\": \"/status\",\n        //     \"value\": \"CANCELLED\"\n        //   }\n        // ]\n\n        UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            \"1YU08902781691411\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.updateOrderTrackingAsync(updateOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/status\",\n//     \"value\": \"CANCELLED\"\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  trackerId: '1YU08902781691411',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.updateOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/status\",\n#     \"value\": \"CANCELLED\"\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'tracker_id': '1YU08902781691411',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.update_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"/status\",\n//     \"value\": \"CANCELLED\"\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'trackerId' => '1YU08902781691411',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->updateOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"/status\",\n#     \"value\": \"CANCELLED\"\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'tracker_id' => '1YU08902781691411',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.update_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "orders_trackers_patch_add_notify-payer": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"add\",\n            //     \"path\": \"/notify_payer\",\n            //     \"value\": true\n            //   }\n            // ]\n\n            UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                TrackerId = \"1YU08902781691411\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.UpdateOrderTrackingAsync(updateOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"add\",\n        //     \"path\": \"/notify_payer\",\n        //     \"value\": true\n        //   }\n        // ]\n\n        UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            \"1YU08902781691411\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.updateOrderTrackingAsync(updateOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/notify_payer\",\n//     \"value\": true\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  trackerId: '1YU08902781691411',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.updateOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/notify_payer\",\n#     \"value\": true\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'tracker_id': '1YU08902781691411',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.update_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"add\",\n//     \"path\": \"/notify_payer\",\n//     \"value\": true\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'trackerId' => '1YU08902781691411',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->updateOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"add\",\n#     \"path\": \"/notify_payer\",\n#     \"value\": true\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'tracker_id' => '1YU08902781691411',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.update_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "flow_400_2": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            // Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                TrackerId = \"1YU08902781691411\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.UpdateOrderTrackingAsync(updateOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        // Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            \"1YU08902781691411\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.updateOrderTrackingAsync(updateOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\n// Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\nconst collect = {\n  id: '5O190127TN364715T',\n  trackerId: '1YU08902781691411',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.updateOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'tracker_id': '1YU08902781691411',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.update_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'trackerId' => '1YU08902781691411',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->updateOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Scenario: 400 - Patch Tracking Information - 400 Bad Request Error - Invalid Request.\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'tracker_id' => '1YU08902781691411',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.update_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ],
            "trackers_patch_422_cannot_patch_cancelled_tracker": [
              {
                "lang": "csharp",
                "label": ".NET",
                "source": "using Microsoft.Extensions.Logging;\nusing PaypalServerSdk.Standard;\nusing PaypalServerSdk.Standard.Authentication;\nusing PaypalServerSdk.Standard.Controllers;\nusing PaypalServerSdk.Standard.Exceptions;\nusing PaypalServerSdk.Standard.Http.Response;\nusing PaypalServerSdk.Standard.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace TestConsoleProject\n{\n    public class Program\n    {\n        public static async Task Main()\n        {\n            PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n                .ClientCredentialsAuth(\n                    new ClientCredentialsAuthModel.Builder(\n                        \"OAuthClientId\",\n                        \"OAuthClientSecret\"\n                    )\n                    .Build())\n                .Environment(PaypalServerSdk.Standard.Environment.Sandbox)\n                .LoggingConfig(config => config\n                    .LogLevel(LogLevel.Information)\n                    .RequestConfig(reqConfig => reqConfig.Body(true))\n                    .ResponseConfig(respConfig => respConfig.Headers(true))\n                )\n                .Build();\n\n            OrdersController ordersController = client.OrdersController;\n\n            // Request body for this sample:\n            // [\n            //   {\n            //     \"op\": \"replace\",\n            //     \"path\": \"items\",\n            //     \"value\": [\n            //       {\n            //         \"name\": \"T-Shirt\",\n            //         \"sku\": \"sku01\",\n            //         \"quantity\": \"1\",\n            //         \"upc\": {\n            //           \"type\": \"UPC-A\",\n            //           \"code\": \"upc001\"\n            //         },\n            //         \"image_url\": \"https://www.example.com/example1.jpg\",\n            //         \"url\": \"https://www.example.com/example\"\n            //       },\n            //       {\n            //         \"name\": \"NeoPhone\",\n            //         \"sku\": \"sku02\",\n            //         \"quantity\": \"2\",\n            //         \"upc\": {\n            //           \"type\": \"UPC-A\",\n            //           \"code\": \"upc002\"\n            //         },\n            //         \"image_url\": \"https://www.example.com/example2.jpg\",\n            //         \"url\": \"https://www.example.com/example\"\n            //       }\n            //     ]\n            //   }\n            // ]\n\n            UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput\n            {\n                Id = \"5O190127TN364715T\",\n                TrackerId = \"1YU08902781691411\",\n                Body = new List<Patch>\n                {\n                    new Patch\n                    {\n                        Op = PatchOp.Add,\n                    },\n                },\n            };\n\n            try\n            {\n                await ordersController.UpdateOrderTrackingAsync(updateOrderTrackingInput);\n            }\n            catch (ApiException e)\n            {\n                Console.WriteLine(e.Message);\n            }\n        }\n    }\n}"
              },
              {
                "lang": "java",
                "label": "Java",
                "source": "import com.paypal.sdk.Environment;\nimport com.paypal.sdk.PaypalServerSdkClient;\nimport com.paypal.sdk.authentication.ClientCredentialsAuthModel;\nimport com.paypal.sdk.controllers.OrdersController;\nimport com.paypal.sdk.exceptions.ApiException;\nimport com.paypal.sdk.http.response.ApiResponse;\nimport com.paypal.sdk.models.*;\nimport java.util.Arrays;\nimport org.slf4j.event.Level;\n\npublic class Program {\n    public static void main(String[] args) {\n        PaypalServerSdkClient client = new PaypalServerSdkClient.Builder()\n            .loggingConfig(builder -> builder\n                    .level(Level.DEBUG)\n                    .requestConfig(logConfigBuilder -> logConfigBuilder.body(true))\n                    .responseConfig(logConfigBuilder -> logConfigBuilder.headers(true)))\n            .clientCredentialsAuth(new ClientCredentialsAuthModel.Builder(\n                    \"OAuthClientId\",\n                    \"OAuthClientSecret\"\n                )\n                .build())\n            .environment(Environment.SANDBOX)\n            .build();\n\n        OrdersController ordersController = client.getOrdersController();\n\n        // Request body for this sample:\n        // [\n        //   {\n        //     \"op\": \"replace\",\n        //     \"path\": \"items\",\n        //     \"value\": [\n        //       {\n        //         \"name\": \"T-Shirt\",\n        //         \"sku\": \"sku01\",\n        //         \"quantity\": \"1\",\n        //         \"upc\": {\n        //           \"type\": \"UPC-A\",\n        //           \"code\": \"upc001\"\n        //         },\n        //         \"image_url\": \"https://www.example.com/example1.jpg\",\n        //         \"url\": \"https://www.example.com/example\"\n        //       },\n        //       {\n        //         \"name\": \"NeoPhone\",\n        //         \"sku\": \"sku02\",\n        //         \"quantity\": \"2\",\n        //         \"upc\": {\n        //           \"type\": \"UPC-A\",\n        //           \"code\": \"upc002\"\n        //         },\n        //         \"image_url\": \"https://www.example.com/example2.jpg\",\n        //         \"url\": \"https://www.example.com/example\"\n        //       }\n        //     ]\n        //   }\n        // ]\n\n        UpdateOrderTrackingInput updateOrderTrackingInput = new UpdateOrderTrackingInput.Builder(\n            \"5O190127TN364715T\",\n            \"1YU08902781691411\",\n            null\n        )\n        .body(Arrays.asList(\n                new Patch.Builder(\n                    PatchOp.ADD\n                )\n                .build()\n            ))\n        .build();\n\n        ordersController.updateOrderTrackingAsync(updateOrderTrackingInput).thenAccept(result -> {\n            System.out.println(result);\n        }).exceptionally(exception -> {\n            exception.printStackTrace();\n            return null;\n        });\n    }\n}"
              },
              {
                "lang": "typescript",
                "label": "Node",
                "source": "import { Client, Environment, LogLevel, ApiError } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: { logBody: true },\n    logResponse: { logHeaders: true },\n  },\n});\n\nconst ordersController = client.ordersController;\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"items\",\n//     \"value\": [\n//       {\n//         \"name\": \"T-Shirt\",\n//         \"sku\": \"sku01\",\n//         \"quantity\": \"1\",\n//         \"upc\": {\n//           \"type\": \"UPC-A\",\n//           \"code\": \"upc001\"\n//         },\n//         \"image_url\": \"https://www.example.com/example1.jpg\",\n//         \"url\": \"https://www.example.com/example\"\n//       },\n//       {\n//         \"name\": \"NeoPhone\",\n//         \"sku\": \"sku02\",\n//         \"quantity\": \"2\",\n//         \"upc\": {\n//           \"type\": \"UPC-A\",\n//           \"code\": \"upc002\"\n//         },\n//         \"image_url\": \"https://www.example.com/example2.jpg\",\n//         \"url\": \"https://www.example.com/example\"\n//       }\n//     ]\n//   }\n// ]\n\nconst collect = {\n  id: '5O190127TN364715T',\n  trackerId: '1YU08902781691411',\n  body: [\n    {\n      op: PatchOp.Add,\n    }\n  ]\n}\n\ntry {\n  const response = await ordersController.updateOrderTracking(collect);\n  console.log(response.result);\n} catch (error) {\n  if (error instanceof ApiError) {\n    console.log(error.statusCode);\n    console.log(error.body);\n  }\n}"
              },
              {
                "lang": "python",
                "label": "Python",
                "source": "import logging\n\nfrom paypalserversdk.configuration import Environment\nfrom paypalserversdk.http.auth.o_auth_2 import ClientCredentialsAuthCredentials\nfrom paypalserversdk.logging.configuration.api_logging_configuration import (\n    LoggingConfiguration, RequestLoggingConfiguration, ResponseLoggingConfiguration\n)\nfrom paypalserversdk.paypal_serversdk_client import PaypalServersdkClient\nfrom paypalserversdk.models.patch_op import PatchOp\n\nclient = PaypalServersdkClient(\n    client_credentials_auth_credentials=ClientCredentialsAuthCredentials(\n        o_auth_client_id='OAuthClientId',\n        o_auth_client_secret='OAuthClientSecret'\n    ),\n    environment=Environment.SANDBOX,\n    logging_configuration=LoggingConfiguration(\n        log_level=logging.INFO,\n        request_logging_config=RequestLoggingConfiguration(log_body=True),\n        response_logging_config=ResponseLoggingConfiguration(log_headers=True)\n    )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"items\",\n#     \"value\": [\n#       {\n#         \"name\": \"T-Shirt\",\n#         \"sku\": \"sku01\",\n#         \"quantity\": \"1\",\n#         \"upc\": {\n#           \"type\": \"UPC-A\",\n#           \"code\": \"upc001\"\n#         },\n#         \"image_url\": \"https://www.example.com/example1.jpg\",\n#         \"url\": \"https://www.example.com/example\"\n#       },\n#       {\n#         \"name\": \"NeoPhone\",\n#         \"sku\": \"sku02\",\n#         \"quantity\": \"2\",\n#         \"upc\": {\n#           \"type\": \"UPC-A\",\n#           \"code\": \"upc002\"\n#         },\n#         \"image_url\": \"https://www.example.com/example2.jpg\",\n#         \"url\": \"https://www.example.com/example\"\n#       }\n#     ]\n#   }\n# ]\n\ncollect = {\n    'id': '5O190127TN364715T',\n    'tracker_id': '1YU08902781691411',\n    'body': [\n        Patch(\n            op=PatchOp.ADD\n        )\n    ]\n}\nresult = orders_controller.update_order_tracking(collect)\n\nif result.is_success():\n    print(result.body)\nelif result.is_error():\n    print(result.errors)"
              },
              {
                "lang": "php",
                "label": "PHP",
                "source": "<?php\nuse PaypalServerSdkLib\\PaypalServerSdkClientBuilder;\nuse PaypalServerSdkLib\\Environment;\nuse PaypalServerSdkLib\\Authentication\\ClientCredentialsAuthCredentialsBuilder;\nuse PaypalServerSdkLib\\Logging\\LoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\RequestLoggingConfigurationBuilder;\nuse PaypalServerSdkLib\\Logging\\ResponseLoggingConfigurationBuilder;\nuse Psr\\Log\\LogLevel;\n\n$client = PaypalServerSdkClientBuilder::init()\n    ->clientCredentialsAuthCredentials(\n        ClientCredentialsAuthCredentialsBuilder::init(\n            'OAuthClientId',\n            'OAuthClientSecret'\n        )\n    )\n    ->environment(Environment::SANDBOX)\n    ->loggingConfiguration(\n        LoggingConfigurationBuilder::init()\n            ->level(LogLevel::INFO)\n            ->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))\n            ->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))\n    )\n    ->build();\n\n$OrdersController = $client->getOrdersController();\n\n// Request body for this sample:\n// [\n//   {\n//     \"op\": \"replace\",\n//     \"path\": \"items\",\n//     \"value\": [\n//       {\n//         \"name\": \"T-Shirt\",\n//         \"sku\": \"sku01\",\n//         \"quantity\": \"1\",\n//         \"upc\": {\n//           \"type\": \"UPC-A\",\n//           \"code\": \"upc001\"\n//         },\n//         \"image_url\": \"https://www.example.com/example1.jpg\",\n//         \"url\": \"https://www.example.com/example\"\n//       },\n//       {\n//         \"name\": \"NeoPhone\",\n//         \"sku\": \"sku02\",\n//         \"quantity\": \"2\",\n//         \"upc\": {\n//           \"type\": \"UPC-A\",\n//           \"code\": \"upc002\"\n//         },\n//         \"image_url\": \"https://www.example.com/example2.jpg\",\n//         \"url\": \"https://www.example.com/example\"\n//       }\n//     ]\n//   }\n// ]\n\n$collect = [\n    'id' => '5O190127TN364715T',\n    'trackerId' => '1YU08902781691411',\n    'body' => [\n        PatchBuilder::init(\n            PatchOp::ADD\n        )->build()\n    ]\n];\n\n$apiResponse = $ordersController->updateOrderTracking($collect);"
              },
              {
                "lang": "ruby",
                "label": "Ruby",
                "source": "require 'paypal_server_sdk'\ninclude PaypalServerSdk\n\nclient = Client.new(\n  client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new(\n    o_auth_client_id: 'OAuthClientId',\n    o_auth_client_secret: 'OAuthClientSecret'\n  ),\n  environment: Environment::SANDBOX,\n  logging_configuration: LoggingConfiguration.new(\n    log_level: Logger::INFO,\n    request_logging_config: RequestLoggingConfiguration.new(log_body: true),\n    response_logging_config: ResponseLoggingConfiguration.new(log_headers: true)\n  )\n)\n\norders_controller = client.orders_controller\n\n# Request body for this sample:\n# [\n#   {\n#     \"op\": \"replace\",\n#     \"path\": \"items\",\n#     \"value\": [\n#       {\n#         \"name\": \"T-Shirt\",\n#         \"sku\": \"sku01\",\n#         \"quantity\": \"1\",\n#         \"upc\": {\n#           \"type\": \"UPC-A\",\n#           \"code\": \"upc001\"\n#         },\n#         \"image_url\": \"https://www.example.com/example1.jpg\",\n#         \"url\": \"https://www.example.com/example\"\n#       },\n#       {\n#         \"name\": \"NeoPhone\",\n#         \"sku\": \"sku02\",\n#         \"quantity\": \"2\",\n#         \"upc\": {\n#           \"type\": \"UPC-A\",\n#           \"code\": \"upc002\"\n#         },\n#         \"image_url\": \"https://www.example.com/example2.jpg\",\n#         \"url\": \"https://www.example.com/example\"\n#       }\n#     ]\n#   }\n# ]\n\ncollect = {\n  'id' => '5O190127TN364715T',\n  'tracker_id' => '1YU08902781691411',\n  'body' => [\n    Patch.new(\n      op: PatchOp::ADD\n    )\n  ]\n}\n\nresult = orders_controller.update_order_tracking(collect)\n\nif result.success?\n  puts result.data\nelsif result.error?\n  warn result.errors\nend"
              }
            ]
          }
        }
      }
    },
    "/v2/checkout/orders/order-update-callback": {
      "post": {
        "operationId": "server.callback",
        "summary": "Receive updated order information via callback URL",
        "description": "The documentation for this 'endpoint' is different from the other endpoints under v2 Orders. For this endpoint the role of client and server is reversed. The client sending the request is PayPal, and the server sending the response is the merchant. In the request, PayPal will send the buyer's redacted shipping address and selected shipping option to the callback URL defined the create order request. The response from the merchant will update the Orders resource.",
        "tags": [
          "externalcallback"
        ],
        "security": [
          {
            "Oauth2": [
              "https://uri.paypal.com/services/payments/payment"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/authorization"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order_update_callback_request"
              },
              "examples": {
                "orders_shippingOptionsExternalCallback_discount_code_callback_add_code": {
                  "summary": "200 - Discount Code Callback Request - Adding a Discount Code",
                  "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code. The merchant responds with the updated order details, reflecting the discount applied successfully.",
                  "value": {
                    "id": "5O190127TN364715T",
                    "shipping_address": {
                      "country_code": "US",
                      "admin_area_1": "TX",
                      "admin_area_2": "Dallas",
                      "postal_code": "75001"
                    },
                    "purchase_units": [
                      {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax_total": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "0.00"
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "T-Shirt",
                            "description": "Green XL",
                            "sku": "sku01",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "quantity": "1",
                            "category": "PHYSICAL_GOODS"
                          }
                        ]
                      }
                    ]
                  }
                },
                "orders_shippingOptionsExternalCallback_discount_code_callback_add_code_no_address": {
                  "summary": "200 - Discount Code Callback Request - Adding a Discount Code - No Address",
                  "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code to an order that does not require shipping. The merchant responds with the updated order details, reflecting the discount applied successfully.",
                  "value": {
                    "id": "5O190127TN364715T",
                    "purchase_units": [
                      {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax_total": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "0.00"
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "E-book",
                            "description": "Digital E-book",
                            "sku": "sku01",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "quantity": "1",
                            "category": "DIGITAL_GOODS"
                          }
                        ]
                      }
                    ]
                  }
                },
                "orders_shippingOptionsExternalCallback_discount_code_callback_remove_code": {
                  "summary": "200 - Discount Code Callback Request - Removing a Discount Code",
                  "description": "The PayPal callback server sends a request with the discount code the buyer wants to remove, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer removes a discount code. The merchant responds with the updated order details, reflecting the discount removal.",
                  "value": {
                    "id": "5O190127TN364715T",
                    "shipping_address": {
                      "country_code": "US",
                      "admin_area_1": "TX",
                      "admin_area_2": "Dallas",
                      "postal_code": "75001"
                    },
                    "purchase_units": [
                      {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "90.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax_total": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "0.00"
                            },
                            "discount": {
                              "currency_code": "USD",
                              "value": "10.00"
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "T-Shirt",
                            "description": "Green XL",
                            "sku": "sku01",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "quantity": "1",
                            "category": "PHYSICAL_GOODS"
                          }
                        ]
                      }
                    ]
                  }
                },
                "orders_shippingOptionsExternalCallback_shipping_address_callback_address_alone": {
                  "summary": "200 - Shipping Options Callback Request - Shipping Address Only Event",
                  "description": "The PayPal callback server sends request with a buyer's shipping address, and the purchase_units of the order, to the merchant listener URL. The request payload is an example of the event that will be sent as soon as the buyer is presented with the \"PayPal Buyer Approval\" page. The merchant responds with a the appropriate tax calculation for the shipping address, and a list of available shipping options.",
                  "value": {
                    "id": "8HFTASDATTV",
                    "shipping_address": {
                      "country_code": "US",
                      "admin_area_1": "TX",
                      "admin_area_2": "Dallas",
                      "postal_code": "75001"
                    },
                    "purchase_units": [
                      {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00"
                        }
                      }
                    ]
                  }
                },
                "orders_shippingOptionsExternalCallback_shipping_address_callback_with_address_and_options": {
                  "summary": "200 - Shipping Options Callback Request - Shipping Address and Shipping Options Event",
                  "description": "The PayPal callback server sends request with a buyer's shipping address, the shipping option the buyer selected, and the purchase_units of the order, to the merchant listener URL. The merchant responds with a the appropriate tax calculation and breakdown for the given address and shipping option combination.",
                  "value": {
                    "id": "5O190127TN364715T",
                    "shipping_address": {
                      "country_code": "US",
                      "admin_area_1": "TX",
                      "admin_area_2": "Dallas",
                      "postal_code": "75001"
                    },
                    "purchase_units": [
                      {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The callback to merchant was successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order_update_callback_response"
                },
                "examples": {
                  "orders_shippingOptionsExternalCallback_discount_code_callback_add_code": {
                    "summary": "Discount Code Callback Request - Adding a Discount Code",
                    "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code. The merchant responds with the updated order details, reflecting the discount applied successfully.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "purchase_units": {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "90.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax_total": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "0.00"
                            },
                            "discount": {
                              "currency_code": "USD",
                              "value": "10.00",
                              "breakdown": [
                                {
                                  "value": "10.00",
                                  "currency_code": "USD",
                                  "discount_code": "SUMMER_SALE",
                                  "description": "$10 off for summer sale"
                                }
                              ]
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "T-Shirt",
                            "description": "Green XL",
                            "sku": "sku01",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "quantity": "1",
                            "category": "PHYSICAL_GOODS"
                          }
                        ],
                        "shipping": {
                          "options": [
                            {
                              "id": "FEDEX",
                              "amount": {
                                "currency_code": "USD",
                                "value": "0.00"
                              },
                              "type": "SHIPPING",
                              "label": "Free Shipping",
                              "selected": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "orders_shippingOptionsExternalCallback_discount_code_callback_add_code_no_address": {
                    "summary": "Discount Code Callback Request - Adding a Discount Code - No Address",
                    "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code to an order that does not require shipping. The merchant responds with the updated order details, reflecting the discount applied successfully.",
                    "value": {
                      "id": "5O190127TN364715T"
                    }
                  },
                  "orders_shippingOptionsExternalCallback_discount_code_callback_remove_code": {
                    "summary": "Discount Code Callback Request - Removing a Discount Code",
                    "description": "The PayPal callback server sends a request with the discount code the buyer wants to remove, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer removes a discount code. The merchant responds with the updated order details, reflecting the discount removal.",
                    "value": {
                      "id": "5O190127TN364715T",
                      "purchase_units": {
                        "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
                        "amount": {
                          "currency_code": "USD",
                          "value": "100.00",
                          "breakdown": {
                            "item_total": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax_total": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "shipping": {
                              "currency_code": "USD",
                              "value": "0.00"
                            }
                          }
                        },
                        "items": [
                          {
                            "name": "T-Shirt",
                            "description": "Green XL",
                            "sku": "sku01",
                            "unit_amount": {
                              "currency_code": "USD",
                              "value": "90.00"
                            },
                            "tax": {
                              "currency_code": "USD",
                              "value": "10.00"
                            },
                            "quantity": "1",
                            "category": "PHYSICAL_GOODS"
                          }
                        ],
                        "shipping": {
                          "options": [
                            {
                              "id": "FEDEX",
                              "amount": {
                                "currency_code": "USD",
                                "value": "0.00"
                              },
                              "type": "SHIPPING",
                              "label": "Free Shipping",
                              "selected": true
                            }
                          ]
                        }
                      }
                    }
                  },
                  "orders_shippingOptionsExternalCallback_shipping_address_callback_address_alone": {
                    "summary": "Shipping Options Callback Request - Shipping Address Only Event",
                    "description": "The PayPal callback server sends request with a buyer's shipping address, and the purchase_units of the order, to the merchant listener URL. The request payload is an example of the event that will be sent as soon as the buyer is presented with the \"PayPal Buyer Approval\" page. The merchant responds with a the appropriate tax calculation for the shipping address, and a list of available shipping options.",
                    "value": {
                      "id": "8HFTASDATTV"
                    }
                  },
                  "orders_shippingOptionsExternalCallback_shipping_address_callback_with_address_and_options": {
                    "summary": "Shipping Options Callback Request - Shipping Address and Shipping Options Event",
                    "description": "The PayPal callback server sends request with a buyer's shipping address, the shipping option the buyer selected, and the purchase_units of the order, to the merchant listener URL. The merchant responds with a the appropriate tax calculation and breakdown for the given address and shipping option combination.",
                    "value": {
                      "id": "8HFTASDATTV"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is not well-formed, is syntactically incorrect, or violates the schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order_update_callback_error_response"
                }
              }
            }
          },
          "422": {
            "description": "The requested action could not be completed, was semantically incorrect, or failed business validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/order_update_callback_error_response"
                }
              }
            }
          }
        },
        "x-exampleFlows": [
          {
            "title": "Discount Code Callback Request - Adding a Discount Code",
            "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code. The merchant responds with the updated order details, reflecting the discount applied successfully.",
            "request_body_example": "requestBody/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_add_code",
            "response_example": "responses/200/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_add_code"
          },
          {
            "title": "Discount Code Callback Request - Adding a Discount Code - No Address",
            "description": "The PayPal callback server sends a request with the discount code provided by the buyer, along with the purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer applies a discount code to an order that does not require shipping. The merchant responds with the updated order details, reflecting the discount applied successfully.",
            "request_body_example": "requestBody/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_add_code_no_address",
            "response_example": "responses/200/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_add_code_no_address"
          },
          {
            "title": "Discount Code Callback Request - Removing a Discount Code",
            "description": "The PayPal callback server sends a request with the discount code the buyer wants to remove, along with the buyer's address and purchase_units of the order, to the merchant listener URL. The request payload represents the event triggered when the buyer removes a discount code. The merchant responds with the updated order details, reflecting the discount removal.",
            "request_body_example": "requestBody/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_remove_code",
            "response_example": "responses/200/content/application~1json/examples/orders_shippingOptionsExternalCallback_discount_code_callback_remove_code"
          },
          {
            "title": "Shipping Options Callback Request - Shipping Address Only Event",
            "description": "The PayPal callback server sends request with a buyer's shipping address, and the purchase_units of the order, to the merchant listener URL. The request payload is an example of the event that will be sent as soon as the buyer is presented with the \"PayPal Buyer Approval\" page. The merchant responds with a the appropriate tax calculation for the shipping address, and a list of available shipping options.",
            "request_body_example": "requestBody/content/application~1json/examples/orders_shippingOptionsExternalCallback_shipping_address_callback_address_alone",
            "response_example": "responses/200/content/application~1json/examples/orders_shippingOptionsExternalCallback_shipping_address_callback_address_alone"
          },
          {
            "title": "Shipping Options Callback Request - Shipping Address and Shipping Options Event",
            "description": "The PayPal callback server sends request with a buyer's shipping address, the shipping option the buyer selected, and the purchase_units of the order, to the merchant listener URL. The merchant responds with a the appropriate tax calculation and breakdown for the given address and shipping option combination.",
            "request_body_example": "requestBody/content/application~1json/examples/orders_shippingOptionsExternalCallback_shipping_address_callback_with_address_and_options",
            "response_example": "responses/200/content/application~1json/examples/orders_shippingOptionsExternalCallback_shipping_address_callback_with_address_and_options"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Oauth2": {
        "type": "oauth2",
        "description": "Oauth 2.0 authentication",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/api/oauth-proxy",
            "scopes": {
              "https://uri.paypal.com/services/payments/payment": "Manage payments and checkout workflow.",
              "https://uri.paypal.com/services/payments/payment/reference-transaction": "Permission to initiate reference transaction",
              "https://uri.paypal.com/services/payments/initiatepayment": "Initiates payments and checkout workflows.",
              "https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants": "Allows client-side integration on Create, Get, Patch, Authorize & Capture Order endpoints.",
              "https://uri.paypal.com/services/payments/orders/client_sdk_orders_api": "Enables secure client-side integration on confirm payment source endpoint",
              "https://uri.paypal.com/services/payments/orders/provision-card": "Manage card provisioning merchants."
            }
          }
        }
      }
    },
    "parameters": {
      "paypal_client_metadata_id": {
        "name": "PayPal-Client-Metadata-Id",
        "in": "header",
        "description": "A GUID value originating from Fraudnet and Dyson passed from external API clients via HTTP header. The value is used by Risk decisions to correlate calls which, in turn, might result in lower decline rates..",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/guid"
        },
        "examples": {
          "guid": {
            "summary": "A GUID.",
            "description": "A paypal-client-metadata-id header with a randomized value.",
            "value": "1295065d-6f34-42dc-ac65-fac0c86af250"
          }
        }
      },
      "authorization": {
        "name": "Authorization",
        "in": "header",
        "description": "Holds authorization information for external API calls.",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/standard_header_schema"
        },
        "examples": {
          "bearer": {
            "summary": "Bearer authorization.",
            "description": "An authorization header with information for the Bearer authorization scheme. The authorization parameter value is randomized for this example.",
            "value": "Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ"
          }
        }
      },
      "paypal_auth_assertion": {
        "name": "PayPal-Auth-Assertion",
        "in": "header",
        "description": "Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.",
        "required": false,
        "schema": {
          "description": "Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.",
          "type": "string",
          "minLength": 1,
          "maxLength": 10000,
          "pattern": "^.*$"
        },
        "examples": {
          "auth_assertion": {
            "summary": "An auth assertion.",
            "description": "A paypal-auth-assertion header with a randomized value.",
            "value": "eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9"
          }
        }
      }
    },
    "schemas": {
      "guid": {
        "title": "GUID",
        "description": "A Globally Unique Identifier (GUID) value.",
        "type": "string",
        "minLength": 1,
        "maxLength": 68,
        "pattern": "^[A-Za-z0-9-{}(),]*$"
      },
      "standard_header_schema": {
        "title": "Schema Object for standard headers",
        "description": "Standard headers are generally less restrictive in structure due to historical precedent across browsers, etc. This is a common schema for use in defining most standard headers.",
        "type": "string",
        "minLength": 1,
        "maxLength": 16000,
        "pattern": "^.*$"
      },
      "checkout_payment_intent": {
        "title": "checkout_payment_intent",
        "description": "The intent to either capture payment immediately or authorize a payment for an order after order creation.",
        "type": "string",
        "enum": [
          "CAPTURE",
          "AUTHORIZE"
        ]
      },
      "email": {
        "title": "email",
        "description": "The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>",
        "type": "string",
        "minLength": 3,
        "maxLength": 254,
        "pattern": "^.*(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\]).*$"
      },
      "account_id": {
        "title": "PayPal Account Identifier",
        "description": "The account identifier for a PayPal account.",
        "type": "string",
        "minLength": 13,
        "maxLength": 13,
        "pattern": "^[2-9A-HJ-NP-Z]{13}$"
      },
      "payer_base": {
        "title": "payer_base",
        "description": "The customer who approves and pays for the order. The customer is also known as the payer.",
        "type": "object",
        "properties": {
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of the payer."
              }
            ]
          },
          "payer_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account_id"
              },
              {
                "description": "The PayPal-assigned ID for the payer.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "name": {
        "title": "Name",
        "description": "The name of the party.",
        "type": "object",
        "properties": {
          "prefix": {
            "description": "The prefix, or title, to the party's name.",
            "type": "string",
            "minLength": 0,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "given_name": {
            "description": "When the party is a person, the party's given, or first, name.",
            "type": "string",
            "minLength": 0,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "surname": {
            "description": "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.",
            "type": "string",
            "minLength": 0,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "middle_name": {
            "description": "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name.",
            "type": "string",
            "minLength": 0,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "suffix": {
            "description": "The suffix for the party's name.",
            "type": "string",
            "minLength": 0,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "full_name": {
            "description": "When the party is a person, the party's full name.",
            "type": "string",
            "minLength": 0,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "phone_type": {
        "title": "Phone Type",
        "description": "The phone type.",
        "type": "string",
        "enum": [
          "FAX",
          "HOME",
          "MOBILE",
          "OTHER",
          "PAGER"
        ]
      },
      "phone_number_without_country_code": {
        "title": "Phone Number Format Requiring National Number Excluding Country Code",
        "description": "A structured representation of a phone number conforming to the international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en),requiring only the national_number field.",
        "type": "object",
        "required": [
          "national_number"
        ],
        "properties": {
          "national_number": {
            "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 14,
            "pattern": "^[0-9]{1,14}?$"
          }
        }
      },
      "phone_with_type": {
        "title": "phone_with_type",
        "description": "The phone information.",
        "type": "object",
        "required": [
          "phone_number"
        ],
        "properties": {
          "phone_type": {
            "$ref": "#/components/schemas/phone_type"
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_number_without_country_code"
              },
              {
                "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property."
              }
            ]
          }
        }
      },
      "date_no_time": {
        "description": "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.",
        "type": "string",
        "minLength": 10,
        "maxLength": 10,
        "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"
      },
      "tax_info": {
        "title": "tax_info",
        "description": "The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required.",
        "type": "object",
        "required": [
          "tax_id",
          "tax_id_type"
        ],
        "properties": {
          "tax_id": {
            "description": "The customer's tax ID value.",
            "type": "string",
            "minLength": 1,
            "maxLength": 14,
            "pattern": "^.*([a-zA-Z0-9]).*$"
          },
          "tax_id_type": {
            "description": "The customer's tax ID type.",
            "type": "string",
            "enum": [
              "BR_CPF",
              "BR_CNPJ"
            ]
          }
        }
      },
      "country_code": {
        "description": "The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.</blockquote>",
        "type": "string",
        "minLength": 2,
        "maxLength": 2,
        "pattern": "^([A-Z]{2}|C2)$"
      },
      "address_portable": {
        "title": "Portable Postal Address (Medium-Grained)",
        "description": "The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).",
        "type": "object",
        "required": [
          "country_code"
        ],
        "properties": {
          "address_line_1": {
            "description": "The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.",
            "type": "string",
            "minLength": 0,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          },
          "address_line_2": {
            "description": "The second line of the address, for example, a suite or apartment number.",
            "type": "string",
            "minLength": 0,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          },
          "address_line_3": {
            "description": "The third line of the address, if needed. Examples include a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address.",
            "type": "string",
            "minLength": 0,
            "maxLength": 100,
            "pattern": "^[\\S\\s]*$"
          },
          "admin_area_4": {
            "description": "The neighborhood, ward, or district. This is smaller than `admin_area_level_3` or `sub_locality`. Value is:<ul><li>The postal sorting code that is used in Guernsey and many French territories, such as French Guiana.</li><li>The fine-grained administrative levels in China.</li></ul>",
            "type": "string",
            "minLength": 0,
            "maxLength": 100,
            "pattern": "^[\\S\\s]*$"
          },
          "admin_area_3": {
            "description": "The sub-locality, suburb, neighborhood, or district. This is smaller than `admin_area_level_2`. Value is:<ul><li>Brazil. Suburb, *bairro*, or neighborhood.</li><li>India. Sub-locality or district. Street name information isn't always available, but a sub-locality or district can be a very small area.</li></ul>",
            "type": "string",
            "minLength": 0,
            "maxLength": 100,
            "pattern": "^[\\S\\s]*$"
          },
          "admin_area_2": {
            "description": "A city, town, or village. Smaller than `admin_area_level_1`.",
            "type": "string",
            "minLength": 0,
            "maxLength": 120,
            "pattern": "^[\\S\\s]*$"
          },
          "admin_area_1": {
            "description": "The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.</li><li>Japan. A prefecture.</li><li>Switzerland. A *kanton*.</li></ul>",
            "type": "string",
            "minLength": 0,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          },
          "postal_code": {
            "description": "The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).",
            "type": "string",
            "minLength": 0,
            "maxLength": 60,
            "pattern": "^[\\S\\s]*$"
          },
          "country_code": {
            "$ref": "#/components/schemas/country_code"
          },
          "address_details": {
            "title": "Address Details",
            "description": "The non-portable additional address details include fine-grain address information for Compliance, Risk, and other scenarios. This isn't portable with common third-party and open source applications. This can include data that is redundant with core fields. For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type`.",
            "type": "object",
            "properties": {
              "street_number": {
                "description": "The street number.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              },
              "street_name": {
                "description": "The street name. Just `Drury` in `Drury Lane`.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              },
              "street_type": {
                "description": "The street type. For example, avenue, boulevard, road, or expressway.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              },
              "delivery_service": {
                "description": "The delivery service. Post office box, bag number, or post office name.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              },
              "building_name": {
                "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, <code>Craven House</code>.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              },
              "sub_building": {
                "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.",
                "type": "string",
                "minLength": 0,
                "maxLength": 100,
                "pattern": "^[\\S\\s]*$"
              }
            }
          }
        }
      },
      "country_code-2": {
        "description": "The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is <code>GB</code> and not <code>UK</code> as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.</blockquote>",
        "type": "string",
        "minLength": 2,
        "maxLength": 2,
        "pattern": "^([A-Z]{2}|C2)$"
      },
      "payer": {
        "title": "payer",
        "description": "The customer who approves and pays for the order. The customer is also known as the payer.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/payer_base"
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/name"
                  },
                  {
                    "description": "The name of the payer. Supports only the `given_name` and `surname` properties.",
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "prefix"
                          ]
                        },
                        {
                          "required": [
                            "middle_name"
                          ]
                        },
                        {
                          "required": [
                            "suffix"
                          ]
                        },
                        {
                          "required": [
                            "alternate_full_name"
                          ]
                        },
                        {
                          "required": [
                            "full_name"
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              "phone": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/phone_with_type"
                  },
                  {
                    "description": "The phone number of the customer. Available only when you enable the **Contact Telephone Number** option in the <a href=\"https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-website-payments\">**Profile & Settings**</a> for the merchant's PayPal account. The `phone.phone_number` supports only `national_number`."
                  }
                ]
              },
              "birth_date": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/date_no_time"
                  },
                  {
                    "description": "The birth date of the payer in `YYYY-MM-DD` format."
                  }
                ]
              },
              "tax_info": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/tax_info"
                  },
                  {
                    "description": "The tax information of the payer. Required only for Brazilian payer's. Both `tax_id` and `tax_id_type` are required."
                  }
                ]
              },
              "address": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/address_portable"
                  },
                  {
                    "description": "The address of the payer. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties. Also referred to as the billing address of the customer.",
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "address_line_3"
                          ]
                        },
                        {
                          "required": [
                            "admin_area_3"
                          ]
                        },
                        {
                          "required": [
                            "admin_area_4"
                          ]
                        },
                        {
                          "required": [
                            "address_details"
                          ]
                        }
                      ]
                    }
                  }
                ]
              }
            }
          }
        ]
      },
      "currency_code": {
        "description": "The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.",
        "type": "string",
        "minLength": 3,
        "maxLength": 3,
        "pattern": "^[\\S\\s]*$"
      },
      "money": {
        "title": "Money",
        "description": "The currency and amount for a financial transaction, such as a balance or payment due.",
        "type": "object",
        "required": [
          "currency_code",
          "value"
        ],
        "properties": {
          "currency_code": {
            "$ref": "#/components/schemas/currency_code"
          },
          "value": {
            "description": "The value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).",
            "type": "string",
            "minLength": 0,
            "maxLength": 32,
            "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$"
          }
        }
      },
      "discount_with_breakdown": {
        "title": "discount_with_breakdown",
        "description": "The discount amount and currency code. For list of supported currencies and decimal precision, see the PayPal REST APIs <a href=\"/docs/integration/direct/rest/currency-codes/\">Currency Codes</a>.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/money"
          },
          {
            "type": "object"
          }
        ]
      },
      "amount_breakdown": {
        "title": "amount_breakdown",
        "description": "The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.",
        "type": "object",
        "properties": {
          "item_total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The subtotal for all items. Required if the request includes `purchase_units[].items[].unit_amount`. Must equal the sum of `(items[].unit_amount * items[].quantity)` for all items. <code>item_total.value</code> can not be a negative number."
              }
            ]
          },
          "shipping": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The shipping fee for all items within a given `purchase_unit`. <code>shipping.value</code> can not be a negative number."
              }
            ]
          },
          "handling": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The handling fee for all items within a given `purchase_unit`. <code>handling.value</code> can not be a negative number."
              }
            ]
          },
          "tax_total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The total tax for all items. Required if the request includes `purchase_units.items.tax`. Must equal the sum of `(items[].tax * items[].quantity)` for all items. <code>tax_total.value</code> can not be a negative number."
              }
            ]
          },
          "insurance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The insurance fee for all items within a given `purchase_unit`. <code>insurance.value</code> can not be a negative number."
              }
            ]
          },
          "shipping_discount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The shipping discount for all items within a given `purchase_unit`. <code>shipping_discount.value</code> can not be a negative number."
              }
            ]
          },
          "discount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/discount_with_breakdown"
              },
              {
                "description": "The discount for all items within a given `purchase_unit`. <code>discount.value</code> can not be a negative number."
              }
            ]
          }
        }
      },
      "amount_with_breakdown": {
        "title": "amount_with_breakdown",
        "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.<br/>The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs <a href=\"/docs/integration/direct/rest/currency-codes/\">Currency Codes</a>.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/money"
          },
          {
            "type": "object",
            "properties": {
              "breakdown": {
                "$ref": "#/components/schemas/amount_breakdown"
              }
            }
          }
        ]
      },
      "payee_base": {
        "title": "payee_base",
        "description": "The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee.",
        "type": "object",
        "properties": {
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of merchant."
              }
            ]
          },
          "merchant_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account_id"
              },
              {
                "description": "The encrypted PayPal account ID of the merchant."
              }
            ]
          }
        }
      },
      "phone": {
        "title": "Phone",
        "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).",
        "type": "object",
        "required": [
          "country_code",
          "national_number"
        ],
        "properties": {
          "country_code": {
            "title": "country_calling_code",
            "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 3,
            "pattern": "^[0-9]{1,3}?$"
          },
          "national_number": {
            "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 14,
            "pattern": "^[0-9]{1,14}?$"
          },
          "extension_number": {
            "description": "The extension number.",
            "type": "string",
            "minLength": 1,
            "maxLength": 15,
            "pattern": "^[0-9]{1,15}?$"
          }
        }
      },
      "payee": {
        "title": "payee",
        "description": "The merchant who receives the funds and fulfills the order. The merchant is also known as the payee.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/payee_base"
          },
          {
            "type": "object"
          }
        ]
      },
      "platform_fee": {
        "title": "platform_fee",
        "description": "The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit.",
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "title": "amount",
                "description": "The fee for this transaction."
              }
            ]
          },
          "payee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payee_base"
              },
              {
                "title": "payee",
                "description": "The recipient of the fee for this transaction."
              }
            ]
          }
        }
      },
      "disbursement_mode": {
        "title": "disbursement_mode",
        "description": "The funds that are held on behalf of the merchant.",
        "type": "string",
        "enum": [
          "INSTANT",
          "DELAYED"
        ],
        "default": "INSTANT"
      },
      "payment_instruction": {
        "title": "payment_instruction",
        "description": "Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order.",
        "type": "object",
        "properties": {
          "platform_fees": {
            "description": "An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.",
            "type": "array",
            "minItems": 0,
            "maxItems": 1,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/platform_fee"
                },
                {
                  "title": "platform_fee"
                }
              ]
            }
          },
          "disbursement_mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/disbursement_mode"
              },
              {
                "description": "The funds that are held payee by the marketplace/platform. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability."
              }
            ]
          },
          "payee_pricing_tier_id": {
            "description": "This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error.",
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": "^.*$"
          },
          "payee_receivable_fx_rate_id": {
            "description": "FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.",
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "pattern": "^.*$"
          }
        }
      },
      "universal_product_code": {
        "title": "universal_product_code",
        "description": "The Universal Product Code of the item.",
        "type": "object",
        "required": [
          "code",
          "type"
        ],
        "properties": {
          "type": {
            "title": "Universal Product Code Type",
            "description": "The Universal Product Code type.",
            "type": "string",
            "enum": [
              "UPC-A",
              "UPC-B",
              "UPC-C",
              "UPC-D",
              "UPC-E",
              "UPC-2",
              "UPC-5"
            ]
          },
          "code": {
            "description": "The UPC product code of the item.",
            "type": "string",
            "minLength": 6,
            "maxLength": 17,
            "pattern": "^[0-9]{0,17}$"
          }
        }
      },
      "pricing_scheme": {
        "title": "pricing_scheme",
        "description": "The pricing scheme details.",
        "type": "object",
        "required": [
          "pricing_model"
        ],
        "properties": {
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The price the customer will be charged based on the pricing model"
              }
            ]
          },
          "pricing_model": {
            "description": "The pricing model for the billing cycle.",
            "type": "string",
            "enum": [
              "FIXED",
              "VARIABLE",
              "AUTO_RELOAD"
            ]
          },
          "reload_threshold_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The threshold amount on which the reload charge would be triggered. This will be associated with the account-balance where if the account-balance goes below this amount then customer would incur reload charge."
              }
            ]
          }
        }
      },
      "billing_cycle": {
        "title": "billing_cycle",
        "description": "The billing cycle providing details of the billing frequency, amount, duration and if the billing cycle is a free, discounted or regular billing cycle. The sequence of the billing cycle will be in the following order - free trial billing cycle(s), discounted trial billing cycle(s), regular billing cycle(s).",
        "type": "object",
        "required": [
          "tenure_type"
        ],
        "properties": {
          "tenure_type": {
            "description": "The tenure type of the billing cycle identifies if the billing cycle is a trial(free or discounted) or regular billing cycle.",
            "type": "string",
            "enum": [
              "REGULAR",
              "TRIAL"
            ]
          },
          "pricing_scheme": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pricing_scheme"
              },
              {
                "description": "The active pricing scheme for this billing cycle. A free trial billing cycle does not require a pricing scheme."
              }
            ]
          },
          "total_cycles": {
            "description": "The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between <code>1</code> and <code>999</code> for <code>total_cycles</code>). Regular billing cycles can be executed infinite times (value of <code>0</code> for <code>total_cycles</code>) or a finite number of times (value between <code>1</code> and <code>999</code> for <code>total_cycles</code>).",
            "type": "integer",
            "minimum": 0,
            "maximum": 999,
            "default": 1
          },
          "sequence": {
            "description": "The order in which this cycle is to run among other billing cycles. For example, a trial billing cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial cycle runs before the regular cycle.",
            "type": "integer",
            "minimum": 1,
            "maximum": 3,
            "default": 1
          },
          "start_date": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_no_time"
              },
              {
                "description": "The start date for the billing cycle, in YYYY-MM-DD. This field should be not be provided if the billing cycle starts at the time of checkout. When this field is not provided, the billing cycle amount will be included in any data validations confirming that the total provided by the merchant match the sum of individual items due at the time of checkout. Only one billing cycle (with sequence equal to 1) can have a no start date."
              }
            ]
          }
        }
      },
      "order_billing_plan": {
        "title": "order_billing_plan",
        "description": "Metadata for merchant-managed recurring billing plans. Valid only during the saved payment method token or billing agreement creation.",
        "type": "object",
        "required": [
          "billing_cycles"
        ],
        "properties": {
          "billing_cycles": {
            "description": "An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.",
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/billing_cycle"
            }
          },
          "setup_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The setup fee for the recurring plan. Ensure its part of the item amount."
              }
            ]
          },
          "name": {
            "description": "Name of the recurring plan.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[A-Za-z0-9() +',.:-]+$"
          }
        }
      },
      "item_request": {
        "title": "item_request",
        "description": "The details for the items to be purchased.",
        "type": "object",
        "required": [
          "name",
          "quantity",
          "unit_amount"
        ],
        "properties": {
          "name": {
            "description": "The item name or title. <blockquote>This field supports up to 3000 characters, but <strong>any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response</strong> representation of this field</blockquote>.",
            "type": "string",
            "minLength": 1,
            "maxLength": 3000,
            "pattern": "^[\\S\\s]*$"
          },
          "unit_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The item price or rate per unit. If you specify <code>unit_amount</code>, <code>purchase_units[].amount.breakdown.item_total</code> is required. Must equal <code>unit_amount * quantity</code> for all items. <code>unit_amount.value</code> can not be a negative number."
              }
            ]
          },
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The item tax for each unit. If <code>tax</code> is specified, <code>purchase_units[].amount.breakdown.tax_total</code> is required. Must equal <code>tax * quantity</code> for all items. <code>tax.value</code> can not be a negative number."
              }
            ]
          },
          "quantity": {
            "description": "The item quantity. Must be a whole number.",
            "type": "string",
            "minLength": 0,
            "maxLength": 10,
            "pattern": "^[1-9][0-9]{0,9}$"
          },
          "description": {
            "description": "<blockquote>This field supports up to 4000 characters, but <strong>any content beyond 2048 characters (including spaces) will be truncated. The 2048 character limit is reflected in the response</strong> representation of this field</blockquote>.",
            "type": "string",
            "minLength": 0,
            "maxLength": 4000,
            "pattern": "^[\\S\\s]*$"
          },
          "sku": {
            "description": "The stock keeping unit (SKU) for the item.",
            "type": "string",
            "minLength": 0,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "url": {
            "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "category": {
            "description": "The item category type.",
            "type": "string",
            "enum": [
              "DIGITAL_GOODS",
              "PHYSICAL_GOODS",
              "DONATION"
            ]
          },
          "image_url": {
            "description": "The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "upc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/universal_product_code"
              },
              {
                "description": "The Universal Product Code of the item."
              }
            ]
          },
          "billing_plan": {
            "$ref": "#/components/schemas/order_billing_plan"
          }
        }
      },
      "email_address": {
        "description": "The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>",
        "type": "string",
        "minLength": 3,
        "maxLength": 254,
        "pattern": "^(?:[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\\[(?:(?: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]?|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$"
      },
      "shipping_type": {
        "title": "shipping_type",
        "description": "A classification for the method of purchase fulfillment.",
        "type": "string",
        "enum": [
          "SHIPPING",
          "PICKUP",
          "PICKUP_IN_STORE",
          "PICKUP_FROM_PERSON"
        ],
        "default": "SHIPPING"
      },
      "date_time": {
        "description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>",
        "type": "string",
        "minLength": 20,
        "maxLength": 64,
        "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
      },
      "shipping_option": {
        "title": "shipping_option",
        "description": "The options that the payee or merchant offers to the payer to ship or pick up their items.",
        "type": "object",
        "required": [
          "id",
          "label",
          "selected"
        ],
        "properties": {
          "id": {
            "description": "A unique ID that identifies a payer-selected shipping option.",
            "type": "string",
            "minLength": 0,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "label": {
            "description": "A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale.",
            "type": "string",
            "minLength": 0,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipping_type"
              },
              {
                "description": "A classification for the method of purchase fulfillment."
              }
            ]
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The shipping cost for the selected option."
              }
            ]
          },
          "selected": {
            "description": "If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true`.",
            "type": "boolean"
          }
        }
      },
      "shipping_detail": {
        "title": "shipping_detail",
        "description": "The shipping details.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "description": "The name of the person to whom to ship the items. Supports only the `full_name` property.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "prefix"
                      ]
                    },
                    {
                      "required": [
                        "given_name"
                      ]
                    },
                    {
                      "required": [
                        "surname"
                      ]
                    },
                    {
                      "required": [
                        "middle_name"
                      ]
                    },
                    {
                      "required": [
                        "suffix"
                      ]
                    },
                    {
                      "required": [
                        "alternate_full_name"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the recipient of the shipped items, which may belong to either the payer, or an alternate contact, for delivery."
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone"
              },
              {
                "description": "The phone number of the recipient of the shipped items, which may belong to either the payer, or an alternate contact, for delivery. [Format - canonical international [E.164 numbering plan](https://www.itu.int/rec/T-REC-E.164/en)]",
                "not": {
                  "required": [
                    "extension_number"
                  ]
                }
              }
            ]
          },
          "type": {
            "title": "Fulfillment Type",
            "description": "A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.",
            "type": "string",
            "enum": [
              "SHIPPING",
              "PICKUP_IN_PERSON",
              "PICKUP_IN_STORE",
              "PICKUP_FROM_PERSON"
            ],
            "default": "SHIPPING"
          },
          "options": {
            "description": "An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.",
            "type": "array",
            "minItems": 0,
            "maxItems": 30,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/shipping_option"
                },
                {
                  "title": "shipping_option",
                  "description": "The option that the payee or merchant offers to the payer to ship or pick up their items."
                }
              ]
            }
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The address of the person to whom to ship the items. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties. `admin_area_1` is required for addresses located in Argentina, Brazil, China, Canada, India, Indonesia, Japan, Mexico, Thailand, and the United States.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "level_2_card_processing_data": {
        "title": "level_2",
        "description": "The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business.",
        "type": "object",
        "properties": {
          "invoice_id": {
            "description": "Use this field to pass a purchase identification value of up to 127 ASCII characters. The length of this field will be adjusted to meet network specifications (25chars for Visa and Mastercard, 17chars for Amex), and the original invoice ID will still be displayed in your existing reports.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\w‘\\-.,\":;\\!?]*$"
          },
          "tax_total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "Use this field to break down the amount of tax included in the total purchase amount. The value provided here will not add to the total purchase amount. The value can't be negative, and in most cases, it must be greater than zero in order to qualify for lower interchange rates. \n Value, by country, is:\n\n    UK. A county.\n    US. A state.\n    Canada. A province.\n    Japan. A prefecture.\n    Switzerland. A kanton.\n"
              }
            ]
          }
        }
      },
      "item_without_category_tax_or_amount": {
        "title": "item",
        "description": "The details for the items to be purchased.",
        "type": "object",
        "required": [
          "name",
          "quantity"
        ],
        "properties": {
          "name": {
            "description": "The item name or title.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "quantity": {
            "description": "The item quantity. Must be a whole number.",
            "type": "string",
            "minLength": 0,
            "maxLength": 10,
            "pattern": "^[1-9][0-9]{0,9}$"
          },
          "description": {
            "description": "The detailed item description.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2048,
            "pattern": "^[\\S\\s]*$"
          },
          "sku": {
            "description": "The stock keeping unit (SKU) for the item.",
            "type": "string",
            "minLength": 0,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "url": {
            "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "image_url": {
            "description": "The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "upc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/universal_product_code"
              },
              {
                "description": "The Universal Product Code of the item."
              }
            ]
          },
          "billing_plan": {
            "$ref": "#/components/schemas/order_billing_plan"
          }
        }
      },
      "line_item": {
        "title": "line_item",
        "description": "The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/item_without_category_tax_or_amount"
          },
          {
            "type": "object",
            "properties": {
              "unit_amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/money"
                  },
                  {
                    "description": "The item price or rate per unit. Must equal <code>unit_amount * quantity</code> for all items. <code>unit_amount.value</code> can not be a negative number."
                  }
                ]
              },
              "tax": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/money"
                  },
                  {
                    "description": "The item tax for each unit. Must equal <code>tax * quantity</code> for all items. <code>tax.value</code> can not be a negative number."
                  }
                ]
              },
              "commodity_code": {
                "description": "Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.",
                "type": "string",
                "minLength": 1,
                "maxLength": 12,
                "pattern": "^[a-zA-Z0-9_'.-]*$"
              },
              "discount_amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/money"
                  },
                  {
                    "description": "Use this field to break down the discount amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
                  }
                ]
              },
              "total_amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/money"
                  },
                  {
                    "description": "The subtotal for all items. Must equal the sum of (items[].unit_amount * items[].quantity) for all items. item_total.value can not be a negative number."
                  }
                ]
              },
              "unit_of_measure": {
                "description": "Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).",
                "type": "string",
                "minLength": 1,
                "maxLength": 12,
                "pattern": "^[a-zA-Z0-9_'.-]*$"
              }
            }
          }
        ]
      },
      "level_3_card_processing_data": {
        "title": "level_3",
        "description": "The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business.",
        "type": "object",
        "properties": {
          "shipping_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "Use this field to break down the shipping cost included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
              }
            ]
          },
          "duty_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "Use this field to break down the duty amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
              }
            ]
          },
          "discount_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "Use this field to break down the discount amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative."
              }
            ]
          },
          "shipping_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The address of the person to whom to ship the items. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "ships_from_postal_code": {
            "description": "Use this field to specify the postal code of the shipping location.",
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "pattern": "^[a-zA-Z0-9_'.-]*$"
          },
          "line_items": {
            "description": "A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.",
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/line_item"
                },
                {
                  "title": "line_item"
                }
              ]
            }
          }
        }
      },
      "card_supplementary_data": {
        "title": "card_supplementary_data",
        "description": "Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>.",
        "type": "object",
        "properties": {
          "level_2": {
            "$ref": "#/components/schemas/level_2_card_processing_data"
          },
          "level_3": {
            "$ref": "#/components/schemas/level_3_card_processing_data"
          }
        }
      },
      "ip_address": {
        "title": "IP Address",
        "description": "An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses.",
        "type": "string",
        "minLength": 7,
        "maxLength": 39,
        "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$|^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"
      },
      "participant_metadata": {
        "title": "participant_metadata",
        "description": "Profile information of the sender or receiver.",
        "type": "object",
        "properties": {
          "ip_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ip_address"
              },
              {
                "description": "The consumer's IP address, which can be represented in either IPv4 or IPv6 format."
              }
            ]
          }
        }
      },
      "risk_supplementary_data": {
        "title": "risk_supplementary_data",
        "description": "Additional information necessary to evaluate the risk profile of a transaction.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/participant_metadata"
          }
        }
      },
      "supplementary_data": {
        "title": "supplementary_data",
        "description": "Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data.",
        "type": "object",
        "properties": {
          "card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_supplementary_data"
              },
              {
                "description": "Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>."
              }
            ]
          },
          "risk": {
            "allOf": [
              {
                "$ref": "#/components/schemas/risk_supplementary_data"
              },
              {
                "description": "Merchants and partners can add additional customer parameters that can help with better fraud protection and reduced risk for unbranded card payments."
              }
            ]
          }
        }
      },
      "purchase_unit_request": {
        "title": "Purchase Unit Request",
        "description": "The purchase unit request. Includes required information for the payment contract.",
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "reference_id": {
            "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[\\S\\s]*$"
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/amount_with_breakdown"
              },
              {
                "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.<br/>The amount must be a positive number. The `amount.value` field supports up to 15 digits preceding the decimal. For a list of supported currencies, decimal precision, and maximum charge amount, see the PayPal REST APIs <a href=\"https://developer.paypal.com/api/rest/reference/currency-codes/\">Currency Codes</a>."
              }
            ]
          },
          "payee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payee"
              },
              {
                "description": "The merchant who receives payment for this transaction."
              }
            ]
          },
          "payment_instruction": {
            "$ref": "#/components/schemas/payment_instruction"
          },
          "description": {
            "description": "<blockquote>This field supports up to 3,000 characters, but <strong>any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response</strong> representation of this field.</blockquote>The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.",
            "type": "string",
            "minLength": 1,
            "maxLength": 3000,
            "pattern": "^[\\S\\s]*$"
          },
          "custom_id": {
            "description": "The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[\\S\\s]*$"
          },
          "invoice_id": {
            "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. invoice_id values are required to be unique within each merchant account by default. Although the uniqueness validation is configurable, disabling this behavior will remove the account's ability to use invoice_id in other APIs as an identifier. It is highly recommended to keep a unique invoice_id for each Order.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "soft_descriptor": {
            "description": "<blockquote>This field supports up to 127 characters, but <strong>any content beyond 22 characters (including spaces) will be truncated. The 22 character limit is reflected in the response</strong> representation of this field.</blockquote>The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.<br><br>If an Order is paid using the \"PayPal Wallet\", the statement descriptor will appear in following format on the payer's card statement: <code><var>PAYPAL_prefix</var>+(space)+<var>merchant_descriptor</var>+(space)+ <var>soft_descriptor</var></code><blockquote><strong>Note:</strong> The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit</blockquote>The <code>PAYPAL</code> prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. <br>For example, if:<ul><li>The PayPal prefix toggle is <code>PAYPAL *</code>.</li><li>The merchant descriptor in the profile is <code>Janes Gift</code>.</li><li>The soft descriptor is <code>800-123-1234</code>.</li></ul>Then, the statement descriptor on the card is <code>PAYPAL * Janes Gift 80</code>.",
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "pattern": "^[\\S\\s]*$"
          },
          "items": {
            "description": "An array of items that the customer purchases from the merchant.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/item_request"
                },
                {
                  "title": "item",
                  "description": "The item."
                }
              ]
            }
          },
          "shipping": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipping_detail"
              },
              {
                "description": "The name and address of the person to whom to ship the items."
              }
            ]
          },
          "supplementary_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/supplementary_data"
              },
              {
                "description": "Contains Supplementary Data."
              }
            ]
          }
        }
      },
      "language": {
        "description": "The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).",
        "type": "string",
        "minLength": 2,
        "maxLength": 10,
        "pattern": "^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$"
      },
      "url": {
        "description": "Describes the URL.",
        "type": "string",
        "minLength": 0,
        "maxLength": 2147483647,
        "format": "uri"
      },
      "experience_context_base": {
        "title": "experience_context_base",
        "description": "Customizes the payer experience during the approval process for the payment.",
        "type": "object",
        "properties": {
          "brand_name": {
            "description": "The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^.*$"
          },
          "locale": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              },
              {
                "description": "The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`."
              }
            ]
          },
          "shipping_preference": {
            "description": "The location from which the shipping address is derived.",
            "type": "string",
            "enum": [
              "GET_FROM_FILE",
              "NO_SHIPPING",
              "SET_PROVIDED_ADDRESS"
            ],
            "default": "GET_FROM_FILE"
          },
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer approves the payment.",
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer cancels the payment.",
                "format": "uri"
              }
            ]
          }
        }
      },
      "instrument_id": {
        "description": "The identifier of the instrument.",
        "type": "string",
        "minLength": 1,
        "maxLength": 256,
        "pattern": "^[A-Za-z0-9-_.+=]+$"
      },
      "date_year_month": {
        "description": "The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
        "type": "string",
        "minLength": 7,
        "maxLength": 7,
        "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
      },
      "card_brand": {
        "title": "card_brand",
        "description": "The card network or brand. Applies to credit, debit, gift, and payment cards.",
        "type": "string",
        "enum": [
          "VISA",
          "MASTERCARD",
          "DISCOVER",
          "AMEX",
          "SOLO",
          "JCB",
          "STAR",
          "DELTA",
          "SWITCH",
          "MAESTRO",
          "CB_NATIONALE",
          "CONFIGOGA",
          "CONFIDIS",
          "ELECTRON",
          "CETELEM",
          "CHINA_UNION_PAY",
          "DINERS",
          "ELO",
          "HIPER",
          "HIPERCARD",
          "RUPAY",
          "GE",
          "SYNCHRONY",
          "EFTPOS",
          "CARTE_BANCAIRE",
          "STAR_ACCESS",
          "PULSE",
          "NYCE",
          "ACCEL",
          "UNKNOWN"
        ]
      },
      "card_type": {
        "title": "card_type",
        "description": "Type of card. i.e Credit, Debit and so on.",
        "type": "string",
        "enum": [
          "CREDIT",
          "DEBIT",
          "PREPAID",
          "STORE",
          "UNKNOWN"
        ]
      },
      "eci_flag": {
        "description": "Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor.",
        "type": "string",
        "enum": [
          "MASTERCARD_NON_3D_SECURE_TRANSACTION",
          "MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION",
          "MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION",
          "FULLY_AUTHENTICATED_TRANSACTION",
          "ATTEMPTED_AUTHENTICATION_TRANSACTION",
          "NON_3D_SECURE_TRANSACTION"
        ]
      },
      "enrolled": {
        "description": "Status of Authentication eligibility.",
        "type": "string",
        "enum": [
          "Y",
          "N",
          "U",
          "B"
        ]
      },
      "pares_status": {
        "description": "Transactions status result identifier. The outcome of the issuer's authentication.",
        "type": "string",
        "enum": [
          "Y",
          "N",
          "U",
          "A",
          "C",
          "R",
          "D",
          "I"
        ]
      },
      "merchant_partner_customer_id": {
        "title": "merchant_partner_customer_id",
        "description": "The unique ID for a customer generated by PayPal.",
        "type": "string",
        "minLength": 1,
        "maxLength": 22,
        "pattern": "^[0-9a-zA-Z_-]+$"
      },
      "customer": {
        "title": "customer",
        "description": "This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer.",
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/merchant_partner_customer_id"
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "Email address of the customer as provided to the merchant or on file with the merchant. Email Address is required if you are processing the transaction using PayPal Guest Processing which is offered to select partners and merchants."
              }
            ]
          },
          "phone": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_with_type"
              },
              {
                "description": "The phone number of the customer as provided to the merchant or on file with the merchant. The `phone.phone_number` supports only `national_number`."
              }
            ]
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "description": "The full name of the customer as provided to the merchant or on file with the merchant.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "prefix"
                      ]
                    },
                    {
                      "required": [
                        "middle_name"
                      ]
                    },
                    {
                      "required": [
                        "suffix"
                      ]
                    },
                    {
                      "required": [
                        "alternate_full_name"
                      ]
                    },
                    {
                      "required": [
                        "full_name"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "card_customer": {
        "title": "card_customer",
        "description": "The details about a customer in PayPal's system of record.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/customer"
          },
          {
            "type": "object",
            "properties": {
              "merchant_customer_id": {
                "description": "Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.",
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[0-9a-zA-Z-_.^*$@#]+$"
              }
            }
          }
        ]
      },
      "store_in_vault_instruction": {
        "title": "store_in_vault_instruction",
        "description": "Defines how and when the payment source gets vaulted.",
        "type": "string",
        "enum": [
          "ON_SUCCESS"
        ]
      },
      "vault_instruction_base": {
        "title": "vault_instruction_base",
        "description": "Basic vault instruction specification that can be extended by specific payment sources that supports vaulting.",
        "type": "object",
        "properties": {
          "store_in_vault": {
            "$ref": "#/components/schemas/store_in_vault_instruction"
          }
        }
      },
      "card_verification": {
        "title": "Card Verification",
        "description": "The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS).",
        "type": "object",
        "properties": {
          "method": {
            "title": "card_verification",
            "description": "The method used for card verification.",
            "type": "string",
            "enum": [
              "SCA_ALWAYS",
              "SCA_WHEN_REQUIRED",
              "3D_SECURE",
              "AVS_CVV"
            ],
            "default": "SCA_WHEN_REQUIRED"
          }
        }
      },
      "card_attributes": {
        "title": "card_attributes",
        "description": "Additional attributes associated with the use of this card.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/card_customer"
          },
          "vault": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_instruction_base"
              },
              {
                "description": "Instruction to vault the card based on the specified strategy."
              }
            ]
          },
          "verification": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_verification"
              },
              {
                "description": "Instruction to optionally verify the card based on the specified strategy."
              }
            ]
          }
        }
      },
      "card": {
        "title": "card",
        "description": "The payment card to use to fund a payment. Can be a credit or debit card.",
        "type": "object",
        "properties": {
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/instrument_id"
              },
              {
                "description": "The PayPal-generated ID for the card.",
                "readOnly": true
              }
            ]
          },
          "name": {
            "description": "The card holder's name as it appears on the card.",
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "pattern": "^.{1,300}$"
          },
          "number": {
            "description": "The primary account number (PAN) for the payment card.",
            "type": "string",
            "minLength": 13,
            "maxLength": 19,
            "pattern": "^[0-9]{13,19}$"
          },
          "expiry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_year_month"
              },
              {
                "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6) For example: 2028-04"
              }
            ]
          },
          "security_code": {
            "description": "The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.",
            "type": "string",
            "minLength": 3,
            "maxLength": 4,
            "pattern": "^[0-9]{3,4}$"
          },
          "last_digits": {
            "description": "The last digits of the payment card.",
            "type": "string",
            "minLength": 2,
            "maxLength": 4,
            "pattern": "^[0-9]{2,4}$",
            "readOnly": true
          },
          "card_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "The card brand or network. Typically used in the response. <b>DEPRECATED</b><br><table><tr><th>See</th></tr><tr><td>type</td></tr></table>",
                "deprecated": true,
                "readOnly": true
              }
            ]
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_type"
              },
              {
                "description": "The payment card type."
              }
            ]
          },
          "brand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "The card brand or network. Typically used in the response."
              }
            ]
          },
          "billing_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_attributes"
              },
              {
                "title": "card_attributes",
                "description": "Additional attributes associated with the use of this card."
              }
            ]
          }
        }
      },
      "vault_id": {
        "title": "vault_id",
        "description": "The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.",
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "pattern": "^[0-9a-zA-Z_-]+$"
      },
      "single_use_token": {
        "title": "single_use_token",
        "description": "The PayPal-generated, short-lived, one-time-use token, used to communicate payment information to PayPal for transaction processing.",
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "pattern": "^[0-9a-zA-Z_-]+$"
      },
      "payment_initiator": {
        "title": "payment_initiator",
        "description": "The person or party who initiated or triggered the payment.",
        "type": "string",
        "enum": [
          "CUSTOMER",
          "MERCHANT"
        ]
      },
      "stored_payment_source_payment_type": {
        "title": "stored_payment_source_payment_type",
        "description": "Indicates the type of the stored payment_source payment.",
        "type": "string",
        "enum": [
          "ONE_TIME",
          "RECURRING",
          "UNSCHEDULED"
        ]
      },
      "stored_payment_source_usage_type": {
        "title": "stored_payment_source_usage_type",
        "description": "Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).",
        "type": "string",
        "enum": [
          "FIRST",
          "SUBSEQUENT",
          "DERIVED"
        ],
        "default": "DERIVED"
      },
      "network_transaction": {
        "title": "network_transaction",
        "description": "Reference values used by the card network to identify a transaction.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Transaction reference id returned by the scheme. For Visa and Amex, this is the \"Tran id\" field in response. For MasterCard, this is the \"BankNet reference id\" field in response. For Discover, this is the \"NRID\" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.",
            "type": "string",
            "minLength": 9,
            "maxLength": 36,
            "pattern": "^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$"
          },
          "date": {
            "description": "The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as \"BankNet reference date\". For some specific networks, such as MasterCard and Discover, this date field is mandatory when the `previous_network_transaction_reference_id` is passed.",
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^[0-9]+$"
          },
          "network": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "Name of the card network through which the transaction was routed."
              }
            ]
          },
          "acquirer_reference_number": {
            "description": "Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.",
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "pattern": "^[a-zA-Z0-9]+$"
          }
        }
      },
      "network_transaction_reference": {
        "title": "network_transaction_reference",
        "description": "Reference values used by the card network to identify a transaction.",
        "type": "object",
        "required": [
          "id"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/network_transaction"
          }
        ]
      },
      "card_stored_credential": {
        "title": "card_stored_credential",
        "description": "Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:<br/><ul><li>`payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.</li><li>Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.</li></ul>",
        "type": "object",
        "required": [
          "payment_initiator",
          "payment_type"
        ],
        "properties": {
          "payment_initiator": {
            "$ref": "#/components/schemas/payment_initiator"
          },
          "payment_type": {
            "$ref": "#/components/schemas/stored_payment_source_payment_type"
          },
          "usage": {
            "$ref": "#/components/schemas/stored_payment_source_usage_type"
          },
          "previous_network_transaction_reference": {
            "$ref": "#/components/schemas/network_transaction_reference"
          }
        }
      },
      "network_token_request": {
        "title": "network_token",
        "description": "The Third Party Network token used to fund a payment.",
        "type": "object",
        "required": [
          "expiry",
          "number"
        ],
        "properties": {
          "number": {
            "description": "Third party network token number.",
            "type": "string",
            "minLength": 13,
            "maxLength": 19,
            "pattern": "^[0-9]{13,19}$"
          },
          "expiry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_year_month"
              },
              {
                "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6)."
              }
            ]
          },
          "cryptogram": {
            "description": "An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions.",
            "type": "string",
            "minLength": 28,
            "maxLength": 32,
            "pattern": "^.*$"
          },
          "eci_flag": {
            "$ref": "#/components/schemas/eci_flag"
          },
          "token_requestor_id": {
            "description": "A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud.",
            "type": "string",
            "minLength": 1,
            "maxLength": 11,
            "pattern": "^[0-9A-Z_]+$"
          }
        }
      },
      "card_experience_context": {
        "title": "card_experience_context",
        "description": "Customizes the payer experience during the 3DS Approval for payment.",
        "type": "object",
        "properties": {
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer will be redirected upon successfully completing the 3DS challenge.",
                "type": "string",
                "minLength": 10,
                "maxLength": 4000,
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer will be redirected upon cancelling the 3DS challenge.",
                "type": "string",
                "minLength": 10,
                "maxLength": 4000,
                "format": "uri"
              }
            ]
          }
        }
      },
      "card_request": {
        "title": "card_request",
        "description": "The payment card to use to fund a payment. Can be a credit or debit card.<blockquote><strong>Note:</strong> Passing card number, cvv and expiry directly via the API requires <a href=\"https://www.pcisecuritystandards.org/pci_security/completing_self_assessment\"> PCI SAQ D compliance</a>. <br>*PayPal offers a mechanism by which you do not have to take on the <strong>PCI SAQ D</strong> burden by using hosted fields - refer to <a href=\"https://developer.paypal.com/docs/checkout/advanced/integrate/\">this Integration Guide</a>*.</blockquote>",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/card"
              },
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "required": [
                        "last_digits"
                      ]
                    },
                    {
                      "required": [
                        "card_type"
                      ]
                    },
                    {
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "required": [
                        "brand"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "vault_id": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/vault_id"
                  },
                  {
                    "description": "The PayPal-generated ID for the saved card payment source. Typically stored on the merchant's server."
                  }
                ]
              },
              "single_use_token": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/single_use_token"
                  },
                  {
                    "description": "The PayPal-generated, short-lived, one-time-use token, used to communicate payment information to PayPal for transaction processing."
                  }
                ]
              },
              "stored_credential": {
                "$ref": "#/components/schemas/card_stored_credential"
              },
              "network_token": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/network_token_request"
                  },
                  {
                    "description": "A 3rd party network token refers to a network token that the merchant provisions from and vaults with an external TSP (Token Service Provider) other than PayPal."
                  }
                ]
              },
              "experience_context": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/card_experience_context"
                  },
                  {}
                ]
              }
            }
          }
        ]
      },
      "token": {
        "title": "token",
        "description": "The tokenized payment source to fund a payment.",
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "description": "The PayPal-generated ID for the token.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[0-9a-zA-Z_-]+$"
          },
          "type": {
            "description": "The tokenization method that generated the ID.",
            "type": "string",
            "enum": [
              "BILLING_AGREEMENT"
            ]
          }
        }
      },
      "v3_vault_instruction_base": {
        "title": "v3_vault_instruction_base",
        "description": "Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting.",
        "type": "object",
        "required": [
          "store_in_vault"
        ],
        "properties": {
          "store_in_vault": {
            "$ref": "#/components/schemas/store_in_vault_instruction"
          }
        }
      },
      "payee_payment_method_preference": {
        "title": "payee_payment_method_preference",
        "description": "The merchant-preferred payment methods.",
        "type": "string",
        "enum": [
          "UNRESTRICTED",
          "IMMEDIATE_PAYMENT_REQUIRED"
        ],
        "default": "UNRESTRICTED"
      },
      "paypal_wallet_customer": {
        "title": "paypal_wallet_customer",
        "description": "The details about a customer in PayPal's system of record.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/customer"
          },
          {
            "type": "object",
            "properties": {
              "merchant_customer_id": {
                "description": "Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.",
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[0-9a-zA-Z-_.^*$@#]+$"
              }
            }
          }
        ]
      },
      "account_id-2": {
        "description": "The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.",
        "type": "string",
        "minLength": 13,
        "maxLength": 13,
        "pattern": "^[2-9A-HJ-NP-Z]{13}$"
      },
      "vault_paypal_wallet_base": {
        "title": "vault_paypal_wallet_base",
        "description": "Resource consolidating common request and response attributes for vaulting PayPal Wallet.",
        "type": "object",
        "required": [
          "usage_type"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/vault_instruction_base"
          },
          {
            "type": "object",
            "properties": {
              "description": {
                "description": "The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\S\\s]*$"
              },
              "usage_pattern": {
                "title": "PayPal Payment Token Usage Pattern",
                "description": "Expected business/pricing model for the billing agreement.",
                "type": "string",
                "enum": [
                  "IMMEDIATE",
                  "DEFERRED",
                  "RECURRING_PREPAID",
                  "RECURRING_POSTPAID",
                  "THRESHOLD_PREPAID",
                  "THRESHOLD_POSTPAID",
                  "SUBSCRIPTION_PREPAID",
                  "SUBSCRIPTION_POSTPAID",
                  "UNSCHEDULED_PREPAID",
                  "UNSCHEDULED_POSTPAID",
                  "INSTALLMENT_PREPAID",
                  "INSTALLMENT_POSTPAID"
                ]
              },
              "shipping": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/shipping_detail"
                  },
                  {
                    "description": "The shipping address for the Payer.",
                    "not": {
                      "required": [
                        "options"
                      ]
                    }
                  }
                ]
              },
              "usage_type": {
                "title": "PayPal Payment Token Usage Type",
                "description": "The usage type associated with the PayPal payment token.",
                "type": "string",
                "enum": [
                  "MERCHANT",
                  "PLATFORM"
                ]
              },
              "customer_type": {
                "title": "PayPal Payment Token Customer Type",
                "description": "The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.",
                "type": "string",
                "enum": [
                  "CONSUMER",
                  "BUSINESS"
                ],
                "default": "CONSUMER"
              },
              "permit_multiple_payment_tokens": {
                "description": "Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.",
                "type": "boolean",
                "default": false
              }
            }
          }
        ]
      },
      "charge_pattern": {
        "description": "Expected business/pricing model for the billing agreement.",
        "type": "string",
        "enum": [
          "IMMEDIATE",
          "DEFERRED",
          "RECURRING_PREPAID",
          "RECURRING_POSTPAID",
          "THRESHOLD_PREPAID",
          "THRESHOLD_POSTPAID",
          "SUBSCRIPTION_PREPAID",
          "SUBSCRIPTION_POSTPAID",
          "UNSCHEDULED_PREPAID",
          "UNSCHEDULED_POSTPAID",
          "INSTALLMENT_PREPAID",
          "INSTALLMENT_POSTPAID"
        ]
      },
      "paypal_wallet_attributes": {
        "title": "paypal_wallet_attributes",
        "description": "Additional attributes associated with the use of this PayPal Wallet.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/paypal_wallet_customer"
          },
          "vault": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_paypal_wallet_base"
              },
              {
                "description": "Attributes used to provide the instructions during vaulting of the PayPal Wallet.",
                "not": {
                  "required": [
                    "shipping"
                  ]
                }
              }
            ]
          }
        }
      },
      "native_app_context": {
        "title": "App Switch Preferences on Native App",
        "description": "Merchant provided, buyer's native app preferences to app switch to the PayPal consumer app.",
        "type": "object",
        "properties": {
          "os_type": {
            "description": "Operating System type of the device that the buyer is using.",
            "type": "string",
            "enum": [
              "ANDROID",
              "IOS",
              "OTHER"
            ],
            "readOnly": true
          },
          "os_version": {
            "description": "Operating System version of the device that the buyer is using.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^.*$",
            "readOnly": true
          }
        }
      },
      "mobile_web_context": {
        "title": "Mobile Web App Switch Context",
        "description": "Buyer's mobile web browser context to app switch to the PayPal consumer app.",
        "type": "object",
        "properties": {
          "return_flow": {
            "description": "Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the PayPal App.",
            "type": "string",
            "enum": [
              "AUTO",
              "MANUAL"
            ],
            "default": "AUTO",
            "readOnly": true
          },
          "buyer_user_agent": {
            "description": "User agent from the request originating from the buyer's device. This will be used to identify the buyer's operating system and browser versions. NOTE: Merchants must not alter or modify the buyer's device user agent.",
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "pattern": "^.*$"
          }
        }
      },
      "app_switch_context": {
        "title": "Merchant App Switch Details & Preferences",
        "description": "Merchant provided details of the native app or mobile web browser to facilitate buyer's app switch to the PayPal consumer app.",
        "type": "object",
        "properties": {
          "native_app": {
            "$ref": "#/components/schemas/native_app_context"
          },
          "mobile_web": {
            "$ref": "#/components/schemas/mobile_web_context"
          }
        }
      },
      "billing_agreement_id": {
        "title": "billing_agreement_id",
        "description": "The PayPal billing agreement ID. References an approved recurring payment for goods or services.",
        "type": "string",
        "minLength": 2,
        "maxLength": 128,
        "pattern": "^[a-zA-Z0-9-]+$"
      },
      "callback_configuration": {
        "title": "callback_configuration",
        "description": "CallBack Configuration that the merchant can provide to PayPal/Venmo.",
        "type": "object",
        "required": [
          "callback_events",
          "callback_url"
        ],
        "properties": {
          "callback_events": {
            "description": "An array of callback events merchant can subscribe to for the corresponding callback url.",
            "type": "array",
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true,
            "items": {
              "title": "callback events",
              "description": "CallBack event.",
              "type": "string",
              "enum": [
                "SHIPPING_ADDRESS",
                "SHIPPING_OPTIONS"
              ]
            }
          },
          "callback_url": {
            "description": "Merchant provided CallBack url.PayPal/Venmo will use this url to call the merchant back when the events occur .PayPal/Venmo expects a secured url usually in the https format.merchant can append the cart id or other params part of the url as query or path params.",
            "type": "string",
            "minLength": 10,
            "maxLength": 2040,
            "format": "uri"
          }
        }
      },
      "paypal_wallet_experience_context": {
        "title": "paypal_wallet_experience_context",
        "description": "Customizes the payer experience during the approval process for payment with PayPal.<blockquote><strong>Note:</strong> Partners and Marketplaces might configure <code>brand_name</code> and <code>shipping_preference</code> during partner account setup, which overrides the request values.</blockquote>",
        "type": "object",
        "properties": {
          "brand_name": {
            "description": "The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^.*$"
          },
          "locale": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              },
              {
                "description": "The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`."
              }
            ]
          },
          "shipping_preference": {
            "description": "The location from which the shipping address is derived.",
            "type": "string",
            "enum": [
              "GET_FROM_FILE",
              "NO_SHIPPING",
              "SET_PROVIDED_ADDRESS"
            ],
            "default": "GET_FROM_FILE"
          },
          "contact_preference": {
            "description": "The preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication.",
            "type": "string",
            "enum": [
              "NO_CONTACT_INFO",
              "UPDATE_CONTACT_INFO",
              "RETAIN_CONTACT_INFO"
            ],
            "default": "NO_CONTACT_INFO"
          },
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer will be redirected upon approving a payment.",
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer will be redirected upon cancelling the payment approval.",
                "format": "uri"
              }
            ]
          },
          "app_switch_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/app_switch_context"
              },
              {
                "description": "Merchants can use this to switch buyers from their website/application to the PayPal consumer app to review and approve the transaction."
              }
            ]
          },
          "landing_page": {
            "description": "The type of landing page to show on the PayPal site for customer checkout.",
            "type": "string",
            "enum": [
              "LOGIN",
              "GUEST_CHECKOUT",
              "NO_PREFERENCE",
              "BILLING"
            ],
            "default": "NO_PREFERENCE"
          },
          "user_action": {
            "description": "Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow.",
            "type": "string",
            "enum": [
              "CONTINUE",
              "PAY_NOW"
            ],
            "default": "CONTINUE"
          },
          "payment_method_preference": {
            "description": "The merchant-preferred payment methods.",
            "type": "string",
            "enum": [
              "UNRESTRICTED",
              "IMMEDIATE_PAYMENT_REQUIRED"
            ],
            "default": "UNRESTRICTED"
          },
          "order_update_callback_config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/callback_configuration"
              },
              {
                "description": "Merchant provided Order Update callback configuration for PayPal Wallet.PayPal will call back merchant when the specified event occurs.we recommend merchants to pass both the shipping_options and shipping_address callback events. Not supported when `shipping.type` is specified or when 'application_context.shipping_preference' is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'."
              }
            ]
          }
        }
      },
      "paypal_wallet_stored_credential": {
        "title": "paypal_wallet_stored_credential",
        "description": "Provides additional details to process a payment using the PayPal wallet billing agreement or a vaulted payment method that has been stored or is intended to be stored.",
        "type": "object",
        "required": [
          "payment_initiator"
        ],
        "properties": {
          "payment_initiator": {
            "$ref": "#/components/schemas/payment_initiator"
          },
          "charge_pattern": {
            "allOf": [
              {
                "$ref": "#/components/schemas/charge_pattern"
              },
              {
                "description": "DEPRECATED. Expected business/pricing model for the billing agreement, Please use usage_pattern instead. <b>DEPRECATED</b><br><table><tr><th>See</th></tr><tr><td>usage_pattern</td></tr></table>",
                "deprecated": true
              }
            ]
          },
          "usage_pattern": {
            "$ref": "#/components/schemas/charge_pattern"
          },
          "usage": {
            "$ref": "#/components/schemas/stored_payment_source_usage_type"
          }
        }
      },
      "paypal_wallet": {
        "title": "paypal_wallet",
        "description": "A resource that identifies a PayPal Wallet is used for payment.",
        "type": "object",
        "properties": {
          "vault_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_id"
              },
              {
                "description": "The PayPal-generated ID for the payment_source stored within the Vault."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of the PayPal account holder."
              }
            ]
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "description": "The name of the PayPal account holder. Supports only the `given_name` and `surname` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "prefix"
                      ]
                    },
                    {
                      "required": [
                        "middle_name"
                      ]
                    },
                    {
                      "required": [
                        "suffix"
                      ]
                    },
                    {
                      "required": [
                        "alternate_full_name"
                      ]
                    },
                    {
                      "required": [
                        "full_name"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "phone": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_with_type"
              },
              {
                "description": "The phone number of the customer. Available only when you enable the **Contact Telephone Number** option in the <a href=\"https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-website-payments\">**Profile & Settings**</a> for the merchant's PayPal account. The `phone.phone_number` supports only `national_number`."
              }
            ]
          },
          "birth_date": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_no_time"
              },
              {
                "description": "The birth date of the PayPal account holder in `YYYY-MM-DD` format."
              }
            ]
          },
          "tax_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/tax_info"
              },
              {
                "description": "The tax information of the PayPal account holder. Required only for Brazilian PayPal account holder's. Both `tax_id` and `tax_id_type` are required."
              }
            ]
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The address of the PayPal account holder. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties. Also referred to as the billing address of the customer.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/paypal_wallet_attributes"
              },
              {
                "title": "paypal_wallet_attributes",
                "description": "Additional attributes associated with the use of this wallet."
              }
            ]
          },
          "experience_context": {
            "$ref": "#/components/schemas/paypal_wallet_experience_context"
          },
          "billing_agreement_id": {
            "$ref": "#/components/schemas/billing_agreement_id"
          },
          "stored_credential": {
            "$ref": "#/components/schemas/paypal_wallet_stored_credential"
          }
        }
      },
      "full_name": {
        "title": "name",
        "description": "The full name representation like Mr J Smith.",
        "type": "string",
        "minLength": 3,
        "maxLength": 300,
        "pattern": "^[\\S\\s]*$"
      },
      "bancontact_request": {
        "title": "bancontact_request",
        "description": "Information needed to pay using Bancontact.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "blik_experience_context": {
        "title": "blik_experience_context",
        "description": "Customizes the payer experience during the approval process for the BLIK payment.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/experience_context_base"
          },
          {
            "type": "object",
            "properties": {
              "consumer_ip": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ip_address"
                  },
                  {
                    "description": "The IP address of the consumer. It could be either IPv4 or IPv6."
                  }
                ]
              },
              "consumer_user_agent": {
                "description": "The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).",
                "type": "string",
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^.*$"
              }
            }
          }
        ]
      },
      "blik_seamless": {
        "title": "blik_level_0",
        "description": "Information used to pay using BLIK level_0 flow.",
        "type": "object",
        "required": [
          "auth_code"
        ],
        "properties": {
          "auth_code": {
            "description": "The 6-digit code used to authenticate a consumer within BLIK.",
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]{6}$"
          }
        }
      },
      "blik_one_click": {
        "title": "blik_one_click",
        "description": "Information used to pay using BLIK one-click flow.",
        "type": "object",
        "required": [
          "consumer_reference"
        ],
        "properties": {
          "auth_code": {
            "description": "The 6-digit code used to authenticate a consumer within BLIK.",
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]{6}$"
          },
          "consumer_reference": {
            "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.",
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[ -~]{3,64}$"
          },
          "alias_label": {
            "description": "A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts.",
            "type": "string",
            "minLength": 8,
            "maxLength": 35,
            "pattern": "^[ -~]{8,35}$"
          },
          "alias_key": {
            "description": "A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference.",
            "type": "string",
            "minLength": 1,
            "maxLength": 19,
            "pattern": "^[0-9]+$"
          }
        }
      },
      "blik_request": {
        "title": "blik_request",
        "description": "Information needed to pay using BLIK.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/blik_experience_context"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          },
          "level_0": {
            "allOf": [
              {
                "$ref": "#/components/schemas/blik_seamless"
              },
              {
                "description": "The level_0 integration flow object."
              }
            ]
          },
          "one_click": {
            "allOf": [
              {
                "$ref": "#/components/schemas/blik_one_click"
              },
              {
                "description": "The one-click integration flow object."
              }
            ]
          }
        }
      },
      "eps_request": {
        "title": "eps_request",
        "description": "Information needed to pay using eps.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "giropay_request": {
        "title": "giropay_request",
        "description": "Information needed to pay using giropay.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "bic": {
        "title": "BIC",
        "description": "The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.",
        "type": "string",
        "minLength": 8,
        "maxLength": 11,
        "pattern": "^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$"
      },
      "ideal_request": {
        "title": "ideal_request",
        "description": "Information needed to pay using iDEAL.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "mybank_request": {
        "title": "mybank_request",
        "description": "Information needed to pay using MyBank.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "p24_request": {
        "title": "p24_request",
        "description": "Information needed to pay using P24 (Przelewy24).",
        "type": "object",
        "required": [
          "country_code",
          "email",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "sofort_request": {
        "title": "sofort_request",
        "description": "Information needed to pay using Sofort.",
        "type": "object",
        "required": [
          "country_code",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "trustly_request": {
        "title": "trustly_request",
        "description": "Information needed to pay using Trustly.",
        "type": "object",
        "required": [
          "country_code",
          "email",
          "name"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "apple_pay_payment_data": {
        "title": "apple_pay_payment_data",
        "description": "Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator.",
        "type": "object",
        "properties": {
          "cryptogram": {
            "description": "Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^.*$"
          },
          "eci_indicator": {
            "description": "ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^.*$"
          },
          "emv_data": {
            "description": "Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^.*$"
          },
          "pin": {
            "description": "Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^.*$"
          }
        }
      },
      "apple_pay_decrypted_token_data": {
        "title": "apple_pay_decrypted_token_data",
        "description": "Information about the Payment data obtained by decrypting Apple Pay token.",
        "type": "object",
        "required": [
          "tokenized_card"
        ],
        "properties": {
          "transaction_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The transaction amount for the payment that the payer has approved on apple platform."
              }
            ]
          },
          "tokenized_card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card"
              },
              {
                "description": "Apple Pay tokenized credit card used to pay.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "required": [
                        "security_code"
                      ]
                    },
                    {
                      "required": [
                        "last_digits"
                      ]
                    },
                    {
                      "required": [
                        "authentication_results"
                      ]
                    },
                    {
                      "required": [
                        "attributes"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "device_manufacturer_id": {
            "description": "Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^.*$"
          },
          "payment_data_type": {
            "description": "Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV.",
            "type": "string",
            "enum": [
              "3DSECURE",
              "EMV"
            ]
          },
          "payment_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/apple_pay_payment_data"
              },
              {
                "description": "Apple Pay payment data object which contains the cryptogram, eci_indicator and other data."
              }
            ]
          }
        }
      },
      "apple_pay_attributes": {
        "title": "apple_pay_attributes",
        "description": "Additional attributes associated with apple pay.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/customer"
          },
          "vault": {
            "$ref": "#/components/schemas/v3_vault_instruction_base"
          }
        }
      },
      "apple_pay_experience_context": {
        "title": "apple_pay_experience_context",
        "description": "Customizes the payer experience during the approval process for the payment.",
        "type": "object",
        "required": [
          "cancel_url",
          "return_url"
        ],
        "properties": {
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer approves the payment.",
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer cancels the payment.",
                "format": "uri"
              }
            ]
          }
        }
      },
      "apple_pay_request": {
        "title": "apple_pay_request",
        "description": "Information needed to pay using ApplePay.",
        "type": "object",
        "properties": {
          "id": {
            "description": "ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "pattern": "^.*$"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "description": "Name on the account holder associated with apple pay."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with apple pay."
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_number_without_country_code"
              },
              {
                "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property."
              }
            ]
          },
          "decrypted_token": {
            "allOf": [
              {
                "$ref": "#/components/schemas/apple_pay_decrypted_token_data"
              },
              {
                "description": "The decrypted payload details for the apple pay token."
              }
            ]
          },
          "stored_credential": {
            "$ref": "#/components/schemas/card_stored_credential"
          },
          "vault_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_id"
              },
              {
                "description": "The PayPal-generated ID for the saved apple pay payment_source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions."
              }
            ]
          },
          "attributes": {
            "$ref": "#/components/schemas/apple_pay_attributes"
          },
          "experience_context": {
            "$ref": "#/components/schemas/apple_pay_experience_context"
          }
        }
      },
      "phone_with_national_required_and_country_code": {
        "title": "Phone Number Schema with Required National Number and Optional Country Code",
        "description": "A structured representation of a phone number conforming to the international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en),requiring the national_number field and optionally supporting the country_code.",
        "type": "object",
        "required": [
          "national_number"
        ],
        "properties": {
          "country_code": {
            "title": "country_calling_code",
            "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 3,
            "pattern": "^[0-9]{1,3}?$"
          },
          "national_number": {
            "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 14,
            "pattern": "^[0-9]{1,14}?$"
          }
        }
      },
      "google_pay_card": {
        "title": "google_pay_card",
        "description": "The payment card used to fund a Google Pay payment. Can be a credit or debit card.",
        "type": "object",
        "properties": {
          "name": {
            "description": "The card holder's name as it appears on the card.",
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "pattern": "^.{1,300}$"
          },
          "number": {
            "description": "The primary account number (PAN) for the payment card.",
            "type": "string",
            "minLength": 13,
            "maxLength": 19,
            "pattern": "^[0-9]{13,19}$"
          },
          "expiry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_year_month"
              },
              {
                "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6)."
              }
            ]
          },
          "last_digits": {
            "description": "The last digits of the payment card.",
            "type": "string",
            "minLength": 2,
            "maxLength": 4,
            "pattern": "^[0-9]{2,4}$",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_type"
              },
              {
                "description": "The payment card type."
              }
            ]
          },
          "brand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "The card brand or network. Typically used in the response."
              }
            ]
          },
          "billing_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "google_pay_decrypted_token_data": {
        "title": "google_pay_decrypted_token_data",
        "description": "Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method.",
        "type": "object",
        "required": [
          "authentication_method",
          "card",
          "payment_method"
        ],
        "properties": {
          "message_id": {
            "description": "A unique ID that identifies the message in case it needs to be revoked or located at a later time.",
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "pattern": "^.*$"
          },
          "message_expiration": {
            "description": "Date and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that's expired.",
            "type": "string",
            "minLength": 13,
            "maxLength": 13,
            "pattern": "^\\d{13}$"
          },
          "payment_method": {
            "description": "The type of the payment credential. Currently, only CARD is supported.",
            "type": "string",
            "enum": [
              "CARD"
            ]
          },
          "card": {
            "description": "Google Pay tokenized credit card used to pay.",
            "allOf": [
              {
                "$ref": "#/components/schemas/google_pay_card"
              },
              {
                "required": [
                  "number",
                  "expiry"
                ]
              }
            ]
          },
          "authentication_method": {
            "description": "Authentication Method which is used for the card transaction.",
            "type": "string",
            "enum": [
              "PAN_ONLY",
              "CRYPTOGRAM_3DS"
            ]
          },
          "cryptogram": {
            "description": "Base-64 cryptographic identifier used by card schemes to validate the token verification result. This is a conditionally required field if authentication_method is CRYPTOGRAM_3DS.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^[\\S\\s]*$"
          },
          "eci_indicator": {
            "description": "Electronic Commerce Indicator may not always be present. It is only returned for tokens on the Visa card network. This value is passed through in the payment authorization request.",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^.*$"
          }
        }
      },
      "assurance_details": {
        "title": "assurance_details",
        "description": "Information about cardholder possession validation and cardholder identification and verifications (ID&V).",
        "type": "object",
        "properties": {
          "account_verified": {
            "description": "If true, indicates that Cardholder possession validation has been performed on returned payment credential.",
            "type": "boolean",
            "default": false
          },
          "card_holder_authenticated": {
            "description": "If true, indicates that identification and verifications (ID&V) was performed on the returned payment credential.If false, the same risk-based authentication can be performed as you would for card transactions. This risk-based authentication can include, but not limited to, step-up with 3D Secure protocol if applicable.",
            "type": "boolean",
            "default": false
          }
        }
      },
      "google_pay_experience_context": {
        "title": "google_pay_experience_context",
        "description": "Customizes the payer experience during the approval process for the payment.",
        "type": "object",
        "required": [
          "cancel_url",
          "return_url"
        ],
        "properties": {
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer approves the payment.",
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer cancels the payment.",
                "format": "uri"
              }
            ]
          }
        }
      },
      "google_pay_request": {
        "title": "google_pay_request",
        "description": "Information needed to pay using Google Pay.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "description": "Name on the account holder associated with Google Pay."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with Google Pay."
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_with_national_required_and_country_code"
              },
              {
                "description": "The phone number of account holder, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property."
              }
            ]
          },
          "card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/google_pay_card"
              },
              {
                "description": "The payment card information.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "number"
                      ]
                    },
                    {
                      "required": [
                        "expiry"
                      ]
                    },
                    {
                      "required": [
                        "last_digits"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "decrypted_token": {
            "allOf": [
              {
                "$ref": "#/components/schemas/google_pay_decrypted_token_data"
              },
              {
                "description": "The decrypted payload details for the Google Pay token."
              }
            ]
          },
          "assurance_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/assurance_details"
              },
              {
                "description": "Information about what validation has been performed on the returned payment credentials."
              }
            ]
          },
          "experience_context": {
            "$ref": "#/components/schemas/google_pay_experience_context"
          }
        }
      },
      "venmo_wallet_experience_context": {
        "title": "venmo_wallet_experience_context",
        "description": "Customizes the buyer experience during the approval process for payment with Venmo.<blockquote><strong>Note:</strong> Partners and Marketplaces might configure <code>shipping_preference</code> during partner account setup, which overrides the request values.</blockquote>",
        "type": "object",
        "properties": {
          "brand_name": {
            "description": "The business name of the merchant. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^.*$"
          },
          "shipping_preference": {
            "description": "The location from which the shipping address is derived.",
            "type": "string",
            "enum": [
              "GET_FROM_FILE",
              "NO_SHIPPING",
              "SET_PROVIDED_ADDRESS"
            ],
            "default": "GET_FROM_FILE"
          },
          "order_update_callback_config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/callback_configuration"
              },
              {
                "description": "Merchant provided Order Update callback configuration for Venmo Wallet.Venmo will call back merchant when the specified event occurs.we recommend merchants to pass both the shipping_options and shipping_address callback events. Not supported when `shipping.type` is specified or when 'application_context.shipping_preference' is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'."
              }
            ]
          },
          "user_action": {
            "description": "Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow.",
            "type": "string",
            "enum": [
              "CONTINUE",
              "PAY_NOW"
            ],
            "default": "CONTINUE"
          }
        }
      },
      "venmo_wallet_customer": {
        "title": "venmo_wallet_customer",
        "description": "This object represents a merchant’s customer, allowing them to store contact details, and track all payments associated with the same customer.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/customer"
          },
          {
            "type": "object"
          }
        ]
      },
      "vault_venmo_wallet_base": {
        "title": "vault_Venmo_wallet_base",
        "description": "Resource consolidating common request and response attirbutes for vaulting Venmo Wallet.",
        "type": "object",
        "required": [
          "usage_type"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/v3_vault_instruction_base"
          },
          {
            "type": "object",
            "properties": {
              "description": {
                "description": "The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[a-zA-Z0-9_'\\-., :;\\!?\"]*$"
              },
              "usage_pattern": {
                "title": "Venmo Payment Token Usage Pattern",
                "description": "Expected business/pricing model for the billing agreement.",
                "type": "string",
                "enum": [
                  "IMMEDIATE",
                  "DEFERRED",
                  "RECURRING_PREPAID",
                  "RECURRING_POSTPAID",
                  "THRESHOLD_PREPAID",
                  "THRESHOLD_POSTPAID"
                ]
              },
              "usage_type": {
                "title": "Venmo Payment Token Usage Type",
                "description": "The usage type associated with the Venmo payment token.",
                "type": "string",
                "enum": [
                  "MERCHANT",
                  "PLATFORM"
                ]
              },
              "customer_type": {
                "title": "Venmo Payment Token Customer Type",
                "description": "The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.",
                "type": "string",
                "enum": [
                  "CONSUMER",
                  "BUSINESS"
                ],
                "default": "CONSUMER"
              },
              "permit_multiple_payment_tokens": {
                "description": "Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account.",
                "type": "boolean",
                "default": false
              }
            }
          }
        ]
      },
      "venmo_wallet_attributes": {
        "title": "venmo_wallet_attributes",
        "description": "Additional attributes associated with the use of this Venmo Wallet.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/venmo_wallet_customer"
          },
          "vault": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_venmo_wallet_base"
              },
              {
                "description": "Attributes used to provide the instructions during vaulting of the Venmo Wallet."
              }
            ]
          }
        }
      },
      "venmo_wallet_request": {
        "title": "venmo_wallet_request",
        "description": "Information needed to pay using Venmo.",
        "type": "object",
        "properties": {
          "vault_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_id"
              },
              {
                "description": "The PayPal-generated ID for the saved Venmo wallet payment_source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of the payer."
              }
            ]
          },
          "experience_context": {
            "$ref": "#/components/schemas/venmo_wallet_experience_context"
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/venmo_wallet_attributes"
              },
              {
                "description": "Additional attributes associated with the use of this wallet."
              }
            ]
          }
        }
      },
      "crypto_account_holder_name": {
        "title": "crypto_account_holder_name",
        "description": "Crypto account holder name.",
        "type": "object",
        "required": [
          "given_name",
          "surname"
        ],
        "properties": {
          "prefix": {
            "description": "The prefix, or title, to the account holder's name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "given_name": {
            "description": "When the account holder is a person, the account holder's given, or first, name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "surname": {
            "description": "When the account holder is a person, the account holder's surname or family name. Also known as the last name. Required when the account holder is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.",
            "type": "string",
            "minLength": 1,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          },
          "middle_name": {
            "description": "When the account holder is a person, the account holder's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 140,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "experience_context_base_without_brand_shipping": {
        "title": "experience_context_base",
        "description": "Customizes the payer experience during the approval process for the payment.",
        "type": "object",
        "required": [
          "cancel_url",
          "return_url"
        ],
        "properties": {
          "locale": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              },
              {
                "description": "The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`."
              }
            ]
          },
          "return_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer approves the payment.",
                "format": "uri"
              }
            ]
          },
          "cancel_url": {
            "allOf": [
              {
                "$ref": "#/components/schemas/url"
              },
              {
                "description": "The URL where the customer is redirected after the customer cancels the payment.",
                "format": "uri"
              }
            ]
          }
        }
      },
      "crypto_request": {
        "title": "crypto_request",
        "description": "Crypto payment used to fund the transaction.",
        "type": "object",
        "required": [
          "country_code",
          "experience_context",
          "name"
        ],
        "properties": {
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code"
              },
              {
                "description": "The two-character ISO 3166-1 purchase country code."
              }
            ]
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/crypto_account_holder_name"
              },
              {
                "description": "The name of the account holder associated with Crypto wallet."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base_without_brand_shipping"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment."
              }
            ]
          }
        }
      },
      "payment_source": {
        "title": "payment_source",
        "description": "The payment source definition.",
        "type": "object",
        "properties": {
          "card": {
            "$ref": "#/components/schemas/card_request"
          },
          "token": {
            "$ref": "#/components/schemas/token"
          },
          "paypal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/paypal_wallet"
              },
              {
                "description": "Indicates that PayPal Wallet is the payment source. Main use of this selection is to provide additional instructions associated with this choice like vaulting."
              }
            ]
          },
          "bancontact": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bancontact_request"
              },
              {
                "title": "bancontact",
                "description": "Bancontact is the most popular online payment in Belgium. [More Details](https://www.bancontact.com/)."
              }
            ]
          },
          "blik": {
            "allOf": [
              {
                "$ref": "#/components/schemas/blik_request"
              },
              {
                "title": "blik",
                "description": "BLIK is a mobile payment system, created by Polish Payment Standard in order to allow millions of users to pay in shops, payout cash in ATMs and make online purchases and payments. [More Details](https://blikmobile.pl/)."
              }
            ]
          },
          "eps": {
            "allOf": [
              {
                "$ref": "#/components/schemas/eps_request"
              },
              {
                "title": "eps",
                "description": "The eps transfer is an online payment method developed by many Austrian banks. [More Details](https://www.eps-ueberweisung.at/)."
              }
            ]
          },
          "giropay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/giropay_request"
              },
              {
                "title": "giropay",
                "description": "Giropay is an Internet payment System in Germany, based on online banking. [More Details](https://giropay.de/)."
              }
            ]
          },
          "ideal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ideal_request"
              },
              {
                "title": "ideal",
                "description": "The Dutch payment method iDEAL is an online payment method that enables consumers to pay online through their own bank. [More Details](https://www.ideal.nl/)."
              }
            ]
          },
          "mybank": {
            "allOf": [
              {
                "$ref": "#/components/schemas/mybank_request"
              },
              {
                "title": "mybank",
                "description": "MyBank is an e-authorisation solution which enables safe digital payments and identity authentication through a consumer’s own online banking portal or mobile application. [More Details](https://www.mybank.eu/)."
              }
            ]
          },
          "p24": {
            "allOf": [
              {
                "$ref": "#/components/schemas/p24_request"
              },
              {
                "title": "p24",
                "description": "P24 (Przelewy24) is a secure and fast online bank transfer service linked to all the major banks in Poland. [More Details](https://www.przelewy24.pl/)."
              }
            ]
          },
          "sofort": {
            "allOf": [
              {
                "$ref": "#/components/schemas/sofort_request"
              },
              {
                "title": "sofort",
                "description": "SOFORT Banking is a real-time bank transfer payment method that buyers use to transfer funds directly to merchants from their bank accounts. [More Details](https://www.klarna.com/sofort/)."
              }
            ]
          },
          "trustly": {
            "allOf": [
              {
                "$ref": "#/components/schemas/trustly_request"
              },
              {
                "title": "trustly",
                "description": "Trustly is a payment method that allows customers to shop and pay from their bank account. [More Details](https://www.trustly.net/)."
              }
            ]
          },
          "apple_pay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/apple_pay_request"
              },
              {
                "title": "applepay",
                "description": "ApplePay payment source, allows buyer to pay using ApplePay, both on Web as well as on Native."
              }
            ]
          },
          "google_pay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/google_pay_request"
              },
              {
                "title": "googlepay",
                "description": "Google Pay payment source, allows buyer to pay using Google Pay."
              }
            ]
          },
          "venmo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/venmo_wallet_request"
              },
              {
                "title": "venmo",
                "description": "Information needed to indicate that Venmo is being used to fund the payment."
              }
            ]
          },
          "crypto": {
            "allOf": [
              {
                "$ref": "#/components/schemas/crypto_request"
              },
              {
                "title": "crypto",
                "description": "Indicates that Crypto Wallet is the payment source."
              }
            ]
          }
        }
      },
      "payment_method": {
        "title": "payment_method",
        "description": "The customer and merchant payment preferences.",
        "type": "object",
        "properties": {
          "payee_preferred": {
            "$ref": "#/components/schemas/payee_payment_method_preference"
          },
          "standard_entry_class_code": {
            "description": "NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes.",
            "type": "string",
            "enum": [
              "TEL",
              "WEB",
              "CCD",
              "PPD"
            ],
            "default": "WEB"
          }
        }
      },
      "stored_payment_source": {
        "title": "stored_payment_source",
        "description": "Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:<br/><ul><li>`payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.</li><li>Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.</li></ul>",
        "type": "object",
        "required": [
          "payment_initiator",
          "payment_type"
        ],
        "properties": {
          "payment_initiator": {
            "$ref": "#/components/schemas/payment_initiator"
          },
          "payment_type": {
            "$ref": "#/components/schemas/stored_payment_source_payment_type"
          },
          "usage": {
            "$ref": "#/components/schemas/stored_payment_source_usage_type"
          },
          "previous_network_transaction_reference": {
            "$ref": "#/components/schemas/network_transaction_reference"
          }
        }
      },
      "order_application_context": {
        "title": "application_context",
        "description": "Customizes the payer experience during the approval process for the payment with PayPal.<blockquote><strong>Note:</strong> Partners and Marketplaces might configure <code>brand_name</code> and <code>shipping_preference</code> during partner account setup, which overrides the request values.</blockquote>",
        "type": "object",
        "properties": {
          "brand_name": {
            "description": "DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "locale": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              },
              {
                "description": "DEPRECATED. The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`.  The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.locale`). Please specify this field in the `experience_context` object instead of the `application_context` object."
              }
            ]
          },
          "landing_page": {
            "title": "Order Application Context Landing Page",
            "description": "DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout.  The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object. <b>DEPRECATED</b><br><table><tr><th>See</th><th>Since Version</th></tr><tr><td>payment_source.paypal.experience_context.landing_page</td><td>2.9</td></tr></table>",
            "type": "string",
            "enum": [
              "LOGIN",
              "BILLING",
              "NO_PREFERENCE"
            ],
            "default": "NO_PREFERENCE",
            "deprecated": true
          },
          "shipping_preference": {
            "title": "Order Application Context Shipping Preference",
            "description": "DEPRECATED. DEPRECATED. The shipping preference:<ul><li>Displays the shipping address to the customer.</li><li>Enables the customer to choose an address on the PayPal site.</li><li>Restricts the customer from changing the address during the payment-approval process.</li></ul>.  The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object. <b>DEPRECATED</b><br><table><tr><th>See</th><th>Since Version</th></tr><tr><td>payment_source.paypal.experience_context.shipping_preference</td><td>2.9</td></tr></table>",
            "type": "string",
            "enum": [
              "GET_FROM_FILE",
              "NO_SHIPPING",
              "SET_PROVIDED_ADDRESS"
            ],
            "default": "GET_FROM_FILE",
            "deprecated": true
          },
          "user_action": {
            "description": "DEPRECATED. Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow.  The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object.",
            "type": "string",
            "enum": [
              "CONTINUE",
              "PAY_NOW"
            ],
            "default": "CONTINUE"
          },
          "payment_method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payment_method"
              },
              {
                "description": "DEPRECATED. The customer and merchant payment preferences. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.payment_method_selected`). Please specify this field in the `experience_context` object instead of the `application_context` object.."
              }
            ]
          },
          "return_url": {
            "description": "DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "format": "uri"
          },
          "cancel_url": {
            "description": "DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "format": "uri"
          },
          "stored_payment_source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/stored_payment_source"
              },
              {
                "description": "DEPRECATED. Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:<br/><ul><li>`payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.</li><li>Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.</li></ul>.  The fields in `stored_payment_source` are now available in the `stored_credential` object under the `payment_source` which supports them (eg. `payment_source.card.stored_credential.payment_initiator`). Please specify this field in the `payment_source` object instead of the `application_context` object. <b>DEPRECATED</b><br><table><tr><th>See</th><th>Since Version</th></tr><tr><td>payment_source.card.stored_credential</td><td>2.9</td></tr></table>",
                "deprecated": true
              }
            ]
          }
        }
      },
      "order_request": {
        "title": "Order Request",
        "description": "The order request details.",
        "type": "object",
        "required": [
          "intent",
          "purchase_units"
        ],
        "properties": {
          "intent": {
            "$ref": "#/components/schemas/checkout_payment_intent"
          },
          "payer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payer"
              },
              {
                "description": "DEPRECATED. The customer is also known as the payer. The Payer object was intended to only be used with the `payment_source.paypal` object. In order to make this design more clear, the details in the `payer` object are now available under `payment_source.paypal`. Please use `payment_source.paypal`. <b>DEPRECATED</b><br><table><tr><th>See</th><th>Since Version</th></tr><tr><td>payment_source.paypal</td><td>2.9</td></tr></table>",
                "deprecated": true
              }
            ]
          },
          "purchase_units": {
            "description": "An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.",
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/purchase_unit_request"
                },
                {
                  "title": "purchase_unit",
                  "description": "The purchase unit. Establishes a contract between a payer and the payee."
                }
              ]
            }
          },
          "payment_source": {
            "$ref": "#/components/schemas/payment_source"
          },
          "application_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/order_application_context"
              },
              {
                "title": "application_context",
                "description": "Customize the payer experience during the approval process for the payment with PayPal."
              }
            ]
          }
        }
      },
      "link_schema": {
        "title": "Link Schema",
        "description": "The request data or link target.",
        "type": "object",
        "properties": {
          "additionalItems": {
            "title": "additional_items",
            "description": "Any additional items.",
            "type": "object"
          },
          "dependencies": {
            "title": "Dependencies",
            "description": "The dependencies.",
            "type": "object"
          },
          "items": {
            "title": "Items",
            "description": "An item.",
            "type": "object"
          },
          "definitions": {
            "title": "Definitions",
            "description": "Definitions.",
            "type": "object"
          },
          "patternProperties": {
            "title": "pattern_properties",
            "description": "The pattern properties.",
            "type": "object"
          },
          "properties": {
            "title": "Properties",
            "description": "The properties.",
            "type": "object"
          },
          "allOf": {
            "title": "all_of",
            "description": "An array of sub-schemas. The data must validate against all sub-schemas.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "all_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "anyOf": {
            "title": "any_of",
            "description": "An array of sub-schemas. The data must validate against one or more sub-schemas.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "any_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "oneOf": {
            "title": "one_of",
            "description": "An array of sub-schemas. The data must validate against one sub-schema.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "one_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "not": {
            "title": "Not",
            "description": "Not.",
            "type": "object"
          },
          "links": {
            "description": "An array of links.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "readOnly": true,
            "items": {
              "title": "link",
              "description": "A link.",
              "type": "object",
              "readOnly": true
            }
          },
          "fragmentResolution": {
            "title": "fragment_resolution",
            "description": "The fragment resolution.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "media": {
            "title": "Media",
            "description": "The media type and context-encoding scheme.",
            "type": "object",
            "properties": {
              "type": {
                "description": "The media type. See [Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://tools.ietf.org/html/rfc2046).",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$"
              },
              "binaryEncoding": {
                "title": "binary_encoding",
                "description": "The content-encoding scheme. See [Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies](https://tools.ietf.org/html/rfc2045).",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$"
              }
            }
          },
          "pathStart": {
            "title": "path_start",
            "description": "To apply this schema to the instances' URIs, start the URIs with this value.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "format": "uri"
          }
        }
      },
      "link_description": {
        "title": "Link Description",
        "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.",
        "type": "object",
        "required": [
          "href",
          "rel"
        ],
        "properties": {
          "href": {
            "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "rel": {
            "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "method": {
            "description": "The HTTP method required to make the related call.",
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE",
              "HEAD",
              "CONNECT",
              "OPTIONS",
              "PATCH"
            ]
          },
          "title": {
            "description": "The link title.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "mediaType": {
            "title": "media_type",
            "description": "The media type, as defined by [RFC 2046](https://www.ietf.org/rfc/rfc2046.txt). Describes the link target.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "encType": {
            "title": "enc_type",
            "description": "The media type in which to submit the request data.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$",
            "default": "application/json"
          },
          "schema": {
            "allOf": [
              {
                "$ref": "#/components/schemas/link_schema"
              },
              {
                "description": "The schema that describes the request data."
              }
            ]
          },
          "targetSchema": {
            "allOf": [
              {
                "$ref": "#/components/schemas/link_schema"
              },
              {
                "title": "target_schema",
                "description": "The schema that describes the link target."
              }
            ]
          }
        }
      },
      "error_details": {
        "title": "Error Details",
        "description": "The error details. Required for client-side `4XX` errors.",
        "type": "object",
        "required": [
          "issue"
        ],
        "properties": {
          "field": {
            "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "value": {
            "description": "The value of the field that caused the error.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "location": {
            "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$",
            "default": "body"
          },
          "issue": {
            "description": "The unique, fine-grained application-level error code.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "links": {
            "description": "An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.",
            "type": "array",
            "minItems": 1,
            "maxItems": 4,
            "readOnly": true,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/link_description"
                },
                {
                  "title": "link_description",
                  "readOnly": true
                }
              ]
            }
          },
          "description": {
            "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "error": {
        "title": "Error",
        "description": "The error details.",
        "type": "object",
        "required": [
          "debug_id",
          "message",
          "name"
        ],
        "properties": {
          "name": {
            "description": "The human-readable, unique name of the error.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "message": {
            "description": "The message that describes the error.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "debug_id": {
            "description": "The PayPal internal ID. Used for correlation purposes.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "details": {
            "description": "An array of additional details about the error.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/error_details"
                },
                {
                  "title": "error_details"
                }
              ]
            }
          },
          "links": {
            "description": "An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links).",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "readOnly": true,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/link_description"
                },
                {
                  "title": "link_description",
                  "readOnly": true
                }
              ]
            }
          }
        }
      },
      "activity_timestamps": {
        "title": "activity_timestamps",
        "description": "The date and time stamps that are common to authorized payment, captured payment, and refund transactions.",
        "type": "object",
        "properties": {
          "create_time": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_time"
              },
              {
                "description": "The date and time when the transaction occurred, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
                "readOnly": true
              }
            ]
          },
          "update_time": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_time"
              },
              {
                "description": "The date and time when the transaction was last updated, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
                "readOnly": true
              }
            ]
          }
        }
      },
      "liability_shift": {
        "title": "liability_shift",
        "description": "Liability shift indicator. The outcome of the issuer's authentication.",
        "type": "string",
        "enum": [
          "NO",
          "POSSIBLE",
          "UNKNOWN"
        ]
      },
      "three_d_secure_authentication_response": {
        "title": "three_d_secure_authentication_response",
        "description": "Results of 3D Secure Authentication.",
        "type": "object",
        "properties": {
          "authentication_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pares_status"
              },
              {
                "description": "The outcome of the issuer's authentication."
              }
            ]
          },
          "enrollment_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/enrolled"
              },
              {
                "description": "Status of authentication eligibility."
              }
            ]
          }
        }
      },
      "authentication_response": {
        "title": "authentication_response",
        "description": "Results of Authentication such as 3D Secure.",
        "type": "object",
        "properties": {
          "liability_shift": {
            "$ref": "#/components/schemas/liability_shift"
          },
          "three_d_secure": {
            "$ref": "#/components/schemas/three_d_secure_authentication_response"
          }
        }
      },
      "vault_response": {
        "title": "vault_response",
        "description": "The details about a saved payment source.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The PayPal-generated ID for the saved payment source.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[\\S\\s]*$"
          },
          "status": {
            "title": "Vault Status",
            "description": "The vault status.",
            "type": "string",
            "enum": [
              "VAULTED",
              "CREATED",
              "APPROVED"
            ]
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/customer"
              },
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "email_address"
                      ]
                    },
                    {
                      "required": [
                        "phone"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "links": {
            "description": "An array of request-related HATEOAS links.",
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "readOnly": true,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/link_description"
                },
                {
                  "title": "link_description",
                  "description": "A request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links)."
                }
              ]
            }
          }
        }
      },
      "card_vault_response": {
        "title": "card_vault_response",
        "description": "The details about a saved Card payment source.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_response"
              },
              {
                "not": {
                  "required": [
                    "customer"
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/card_customer"
                  }
                ]
              }
            }
          }
        ]
      },
      "card_attributes_response": {
        "title": "card_attributes_response",
        "description": "Additional attributes associated with the use of this card.",
        "type": "object",
        "properties": {
          "vault": {
            "$ref": "#/components/schemas/card_vault_response"
          }
        }
      },
      "card_from_request": {
        "title": "card_from_request",
        "description": "Representation of card details as received in the request.",
        "type": "object",
        "properties": {
          "expiry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_year_month"
              },
              {
                "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6)."
              }
            ]
          },
          "last_digits": {
            "description": "The last digits of the payment card.",
            "type": "string",
            "minLength": 2,
            "maxLength": 4,
            "pattern": "^.*[0-9]{2,}.*$",
            "readOnly": true
          }
        }
      },
      "bin_details": {
        "title": "bin_details",
        "description": "Bank Identification Number (BIN) details used to fund a payment.",
        "type": "object",
        "properties": {
          "bin": {
            "description": "The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card.",
            "type": "string",
            "minLength": 1,
            "maxLength": 25,
            "pattern": "^[0-9]+$"
          },
          "issuing_bank": {
            "description": "The issuer of the card instrument.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[\\S\\s]*$"
          },
          "bin_country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The [two-character ISO-3166-1 country code](/docs/integration/direct/rest/country-codes/) of the bank."
              }
            ]
          },
          "products": {
            "description": "The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.",
            "type": "array",
            "minItems": 1,
            "maxItems": 256,
            "items": {
              "title": "products",
              "description": "This value provides the category of the BIN.",
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\S\\s]*$"
            }
          }
        }
      },
      "card_response": {
        "title": "card_response",
        "description": "The payment card to use to fund a payment. Card can be a credit or debit card.",
        "type": "object",
        "properties": {
          "name": {
            "description": "The card holder's name as it appears on the card.",
            "type": "string",
            "minLength": 2,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          },
          "last_digits": {
            "description": "The last digits of the payment card.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^.*[0-9]{2,}.*$",
            "readOnly": true
          },
          "brand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "The card brand or network. Typically used in the response.",
                "readOnly": true
              }
            ]
          },
          "available_networks": {
            "description": "Array of brands or networks associated with the card.",
            "type": "array",
            "minItems": 1,
            "maxItems": 256,
            "readOnly": true,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/card_brand"
                },
                {
                  "title": "card_brand"
                }
              ]
            }
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_type"
              },
              {
                "description": "The payment card type."
              }
            ]
          },
          "authentication_result": {
            "$ref": "#/components/schemas/authentication_response"
          },
          "attributes": {
            "$ref": "#/components/schemas/card_attributes_response"
          },
          "from_request": {
            "$ref": "#/components/schemas/card_from_request"
          },
          "expiry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_year_month"
              },
              {
                "description": "The card expiration year and month, in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6)."
              }
            ]
          },
          "bin_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bin_details"
              },
              {
                "description": "Bank Identification Number (BIN) details used to fund a payment."
              }
            ]
          },
          "stored_credential": {
            "$ref": "#/components/schemas/card_stored_credential"
          }
        }
      },
      "phone-3": {
        "title": "Phone Number",
        "description": "The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).",
        "type": "object",
        "required": [
          "national_number"
        ],
        "properties": {
          "national_number": {
            "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).",
            "type": "string",
            "minLength": 1,
            "maxLength": 14,
            "pattern": "^[0-9]{1,14}?$"
          }
        }
      },
      "paypal_wallet_vault_response": {
        "title": "paypal_wallet_vault_response",
        "description": "The details about a saved PayPal Wallet payment source.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_response"
              },
              {
                "not": {
                  "required": [
                    "customer"
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "customer": {
                "$ref": "#/components/schemas/paypal_wallet_customer"
              }
            }
          }
        ]
      },
      "cobranded_card": {
        "title": "cobranded_card",
        "description": "Details about the merchant cobranded card used for order purchase.",
        "type": "object",
        "properties": {
          "labels": {
            "description": "Array of labels for the cobranded card.",
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "title": "label",
              "description": "Label for the cobranded card.",
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "pattern": "^[\\S\\s]*$"
            }
          },
          "payee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payee_base"
              },
              {
                "title": "payee",
                "description": "Merchant associated with the purchase.",
                "not": {
                  "required": [
                    "client_id"
                  ]
                }
              }
            ]
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "Amount that was charged to the cobranded card."
              }
            ]
          }
        }
      },
      "paypal_wallet_attributes_response": {
        "title": "paypal_wallet_attributes_response",
        "description": "Additional attributes associated with the use of a PayPal Wallet.",
        "type": "object",
        "properties": {
          "vault": {
            "$ref": "#/components/schemas/paypal_wallet_vault_response"
          },
          "cobranded_cards": {
            "description": "An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).",
            "type": "array",
            "minItems": 0,
            "maxItems": 25,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/cobranded_card"
                },
                {
                  "title": "cobranded_card"
                }
              ]
            }
          }
        }
      },
      "paypal_wallet_response": {
        "title": "paypal_wallet_response",
        "description": "The PayPal Wallet response.",
        "type": "object",
        "properties": {
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of the PayPal account holder."
              }
            ]
          },
          "account_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account_id-2"
              },
              {
                "description": "The PayPal-assigned ID for the PayPal account holder.",
                "readOnly": true
              }
            ]
          },
          "account_status": {
            "description": "The account status indicates whether the buyer has verified the financial details associated with their PayPal account.",
            "type": "string",
            "enum": [
              "VERIFIED",
              "UNVERIFIED"
            ],
            "readOnly": true
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "description": "The name of the PayPal account holder. Supports only the `given_name` and `surname` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "prefix"
                      ]
                    },
                    {
                      "required": [
                        "middle_name"
                      ]
                    },
                    {
                      "required": [
                        "suffix"
                      ]
                    },
                    {
                      "required": [
                        "alternate_full_name"
                      ]
                    },
                    {
                      "required": [
                        "full_name"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "phone_type": {
            "$ref": "#/components/schemas/phone_type"
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone-3"
              },
              {
                "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Available only when you enable the **Contact Telephone Number** option in the <a href=\"https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-website-payments\">**Profile & Settings**</a> for the merchant's PayPal account. Supports only the `national_number` property."
              }
            ]
          },
          "birth_date": {
            "allOf": [
              {
                "$ref": "#/components/schemas/date_no_time"
              },
              {
                "description": "The birth date of the PayPal account holder in `YYYY-MM-DD` format."
              }
            ]
          },
          "business_name": {
            "description": "The business name of the PayPal account holder (populated for business accounts only)",
            "type": "string",
            "minLength": 0,
            "maxLength": 300,
            "pattern": "^.*$"
          },
          "tax_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/tax_info"
              },
              {
                "description": "The tax information of the PayPal account holder. Required only for Brazilian PayPal account holder's. Both `tax_id` and `tax_id_type` are required."
              }
            ]
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The address of the PayPal account holder. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties. Also referred to as the billing address of the customer.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "attributes": {
            "$ref": "#/components/schemas/paypal_wallet_attributes_response"
          },
          "stored_credential": {
            "$ref": "#/components/schemas/paypal_wallet_stored_credential"
          },
          "experience_status": {
            "description": "This field indicates the status of PayPal's Checkout experience throughout the order lifecycle. The values reflect the current stage of the checkout process.",
            "type": "string",
            "enum": [
              "NOT_STARTED",
              "IN_PROGRESS",
              "CANCELED",
              "APPROVED"
            ],
            "readOnly": true
          }
        }
      },
      "apple_pay_card_response": {
        "title": "apple_pay_card_response",
        "description": "The Card from Apple Pay Wallet used to fund the payment.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_response"
              },
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "required": [
                        "last_n_chars"
                      ]
                    },
                    {
                      "required": [
                        "issuer"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "description": "The card holder's name as it appears on the card.",
                "type": "string",
                "minLength": 0,
                "maxLength": 300,
                "pattern": "^[\\S\\s]*$"
              },
              "billing_address": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/address_portable"
                  },
                  {
                    "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.",
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "address_line_3"
                          ]
                        },
                        {
                          "required": [
                            "admin_area_3"
                          ]
                        },
                        {
                          "required": [
                            "admin_area_4"
                          ]
                        },
                        {
                          "required": [
                            "address_details"
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              "country_code": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/country_code-2"
                  },
                  {
                    "description": "The country where the card is issued."
                  }
                ]
              }
            }
          }
        ]
      },
      "iban_last_chars": {
        "title": "iban_last_chars",
        "description": "The last characters of the IBAN used to pay.",
        "type": "string",
        "minLength": 4,
        "maxLength": 34,
        "pattern": "^.*[a-zA-Z0-9]{4}.*$"
      },
      "bancontact": {
        "title": "bancontact",
        "description": "Information used to pay Bancontact.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "iban_last_chars": {
            "$ref": "#/components/schemas/iban_last_chars"
          },
          "card_last_digits": {
            "description": "The last digits of the card used to fund the Bancontact payment.",
            "type": "string",
            "minLength": 4,
            "maxLength": 4,
            "pattern": "^[0-9]{4}$"
          }
        }
      },
      "blik_one_click_response": {
        "title": "blik_one_click_response",
        "description": "Information used to pay using BLIK one-click flow.",
        "type": "object",
        "properties": {
          "consumer_reference": {
            "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.",
            "type": "string",
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[ -~]{3,64}$"
          }
        }
      },
      "blik": {
        "title": "blik",
        "description": "Information used to pay using BLIK.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "one_click": {
            "allOf": [
              {
                "$ref": "#/components/schemas/blik_one_click_response"
              },
              {
                "description": "The one-click integration flow object."
              }
            ]
          }
        }
      },
      "eps": {
        "title": "eps",
        "description": "Information used to pay using eps.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          }
        }
      },
      "giropay": {
        "title": "giropay",
        "description": "Information needed to pay using giropay.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          }
        }
      },
      "ideal": {
        "title": "ideal",
        "description": "Information used to pay using iDEAL.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "iban_last_chars": {
            "$ref": "#/components/schemas/iban_last_chars"
          }
        }
      },
      "mybank": {
        "title": "mybank",
        "description": "Information used to pay using MyBank.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "iban_last_chars": {
            "$ref": "#/components/schemas/iban_last_chars"
          }
        }
      },
      "p24": {
        "title": "p24",
        "description": "Information used to pay using P24(Przelewy24).",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "title": "name",
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "payment_descriptor": {
            "description": "P24 generated payment description.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^[\\S\\s]*$"
          },
          "method_id": {
            "description": "Numeric identifier of the payment scheme or bank used for the payment.",
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "pattern": "^[\\S\\s]*$"
          },
          "method_description": {
            "description": "Friendly name of the payment scheme or bank used for the payment.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "sofort": {
        "title": "sofort",
        "description": "Information used to pay using Sofort.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "iban_last_chars": {
            "$ref": "#/components/schemas/iban_last_chars"
          }
        }
      },
      "trustly": {
        "title": "trustly",
        "description": "Information needed to pay using Trustly.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "title": "name",
                "description": "The name of the account holder associated with this payment method."
              }
            ]
          },
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code-2"
              },
              {
                "description": "The two-character ISO 3166-1 country code."
              }
            ]
          },
          "email": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "bic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/bic"
              },
              {
                "description": "The bank identification code (BIC)."
              }
            ]
          },
          "iban_last_chars": {
            "$ref": "#/components/schemas/iban_last_chars"
          }
        }
      },
      "apple_pay_attributes_response": {
        "title": "apple_pay_attributes_response",
        "description": "Additional attributes associated with the use of Apple Pay.",
        "type": "object",
        "properties": {
          "vault": {
            "$ref": "#/components/schemas/vault_response"
          }
        }
      },
      "apple_pay": {
        "title": "apple_pay",
        "description": "Information needed to pay using ApplePay.",
        "type": "object",
        "properties": {
          "id": {
            "description": "ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "pattern": "^.*$"
          },
          "token": {
            "description": "Encrypted ApplePay token, containing card information. This token would be base64encoded. The pattern is defined by an external party and supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 10000,
            "pattern": "^.*$"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "description": "Name on the wallet."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with this payment method."
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone"
              },
              {
                "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "country_code"
                      ]
                    },
                    {
                      "required": [
                        "extension_number"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/apple_pay_card_response"
              },
              {
                "description": "The payment card information."
              }
            ]
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/apple_pay_attributes_response"
              },
              {
                "description": "Additional attributes associated with apple pay."
              }
            ]
          },
          "stored_credential": {
            "$ref": "#/components/schemas/card_stored_credential"
          }
        }
      },
      "google_pay_card_response": {
        "title": "google_pay_card_response",
        "description": "The payment card to use to fund a Google Pay payment response. Can be a credit or debit card.",
        "type": "object",
        "properties": {
          "name": {
            "description": "The card holder's name as it appears on the card.",
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "pattern": "^.{1,300}$"
          },
          "last_digits": {
            "description": "The last digits of the payment card.",
            "type": "string",
            "minLength": 2,
            "maxLength": 4,
            "pattern": "^[0-9]{2,4}$",
            "readOnly": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_type"
              },
              {
                "description": "The payment card type."
              }
            ]
          },
          "brand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/card_brand"
              },
              {
                "description": "The card brand or network. Typically used in the response."
              }
            ]
          },
          "billing_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The billing address for this card. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "authentication_result": {
            "$ref": "#/components/schemas/authentication_response"
          }
        }
      },
      "google_pay": {
        "title": "google_pay",
        "description": "Google Pay Wallet payment data.",
        "type": "object",
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/full_name"
              },
              {
                "description": "Name on the account holder associated with Google Pay."
              }
            ]
          },
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email_address"
              },
              {
                "description": "The email address of the account holder associated with Google Pay."
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone_with_national_required_and_country_code"
              },
              {
                "description": "The phone number of account holder, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property."
              }
            ]
          },
          "card": {
            "allOf": [
              {
                "$ref": "#/components/schemas/google_pay_card_response"
              },
              {
                "description": "The Card from Google Pay Wallet used to fund the payment."
              }
            ]
          }
        }
      },
      "venmo_vault_response": {
        "title": "venmo_vault_response",
        "description": "The details about a saved venmo payment source.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/vault_response"
              },
              {
                "not": {
                  "required": [
                    "customer"
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/venmo_wallet_customer"
                  }
                ]
              }
            }
          }
        ]
      },
      "venmo_wallet_attributes_response": {
        "title": "venmo_wallet_attributes_response",
        "description": "Additional attributes associated with the use of a Venmo Wallet.",
        "type": "object",
        "properties": {
          "vault": {
            "$ref": "#/components/schemas/venmo_vault_response"
          }
        }
      },
      "venmo_wallet_response": {
        "title": "venmo_wallet_response",
        "description": "Venmo wallet response.",
        "type": "object",
        "properties": {
          "email_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/email"
              },
              {
                "description": "The email address of the payer."
              }
            ]
          },
          "account_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account_id-2"
              },
              {
                "description": "This is an immutable system-generated id for a user's Venmo account.",
                "readOnly": true
              }
            ]
          },
          "user_name": {
            "description": "The Venmo user name chosen by the user, also know as a Venmo handle.",
            "type": "string",
            "minLength": 1,
            "maxLength": 50,
            "pattern": "^[-a-zA-Z0-9_]*$"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/name"
              },
              {
                "description": "The name associated with the Venmo account. Supports only the `given_name` and `surname` properties.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "prefix"
                      ]
                    },
                    {
                      "required": [
                        "middle_name"
                      ]
                    },
                    {
                      "required": [
                        "suffix"
                      ]
                    },
                    {
                      "required": [
                        "alternate_full_name"
                      ]
                    },
                    {
                      "required": [
                        "full_name"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/phone-3"
              },
              {
                "description": "The phone number associated with the Venmo account, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). Supports only the `national_number` property."
              }
            ]
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "The address of the payer. Supports only the `address_line_1`, `address_line_2`, `admin_area_1`, `admin_area_2`, `postal_code`, and `country_code` properties. Also referred to as the billing address of the customer.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "return_flow": {
            "description": "Merchant preference on how the buyer can navigate back to merchant website post approving the transaction on the Venmo App.",
            "type": "string",
            "enum": [
              "AUTO",
              "MANUAL"
            ],
            "default": "AUTO",
            "readOnly": true
          },
          "attributes": {
            "$ref": "#/components/schemas/venmo_wallet_attributes_response"
          }
        }
      },
      "crypto": {
        "title": "crypto",
        "description": "Pay With Crypto details response object.",
        "type": "object",
        "properties": {
          "country_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/country_code"
              },
              {
                "description": "The two-character ISO 3166-1 purchase country code."
              }
            ]
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/crypto_account_holder_name"
              },
              {
                "description": "The name of the account holder associated with Crypto wallet."
              }
            ]
          },
          "experience_context": {
            "allOf": [
              {
                "$ref": "#/components/schemas/experience_context_base"
              },
              {
                "description": "Customizes the payer experience during the approval process for the payment.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "brand_name"
                      ]
                    },
                    {
                      "required": [
                        "shipping_preference"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "payment_source_response": {
        "title": "payment_source_response",
        "description": "The payment source used to fund the payment.",
        "type": "object",
        "properties": {
          "card": {
            "$ref": "#/components/schemas/card_response"
          },
          "paypal": {
            "$ref": "#/components/schemas/paypal_wallet_response"
          },
          "bancontact": {
            "$ref": "#/components/schemas/bancontact"
          },
          "blik": {
            "$ref": "#/components/schemas/blik"
          },
          "eps": {
            "$ref": "#/components/schemas/eps"
          },
          "giropay": {
            "$ref": "#/components/schemas/giropay"
          },
          "ideal": {
            "$ref": "#/components/schemas/ideal"
          },
          "mybank": {
            "$ref": "#/components/schemas/mybank"
          },
          "p24": {
            "$ref": "#/components/schemas/p24"
          },
          "sofort": {
            "$ref": "#/components/schemas/sofort"
          },
          "trustly": {
            "$ref": "#/components/schemas/trustly"
          },
          "apple_pay": {
            "$ref": "#/components/schemas/apple_pay"
          },
          "google_pay": {
            "$ref": "#/components/schemas/google_pay"
          },
          "venmo": {
            "$ref": "#/components/schemas/venmo_wallet_response"
          },
          "crypto": {
            "$ref": "#/components/schemas/crypto"
          }
        }
      },
      "item": {
        "title": "item",
        "description": "The details for the items to be purchased.",
        "type": "object",
        "required": [
          "name",
          "quantity",
          "unit_amount"
        ],
        "properties": {
          "name": {
            "description": "The item name or title.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "unit_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The item price or rate per unit. If you specify <code>unit_amount</code>, <code>purchase_units[].amount.breakdown.item_total</code> is required. Must equal <code>unit_amount * quantity</code> for all items. <code>unit_amount.value</code> can not be a negative number."
              }
            ]
          },
          "tax": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The item tax for each unit. If <code>tax</code> is specified, <code>purchase_units[].amount.breakdown.tax_total</code> is required. Must equal <code>tax * quantity</code> for all items. <code>tax.value</code> can not be a negative number."
              }
            ]
          },
          "quantity": {
            "description": "The item quantity. Must be a whole number.",
            "type": "string",
            "minLength": 0,
            "maxLength": 10,
            "pattern": "^[1-9][0-9]{0,9}$"
          },
          "description": {
            "description": "The detailed item description.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2048,
            "pattern": "^[\\S\\s]*$"
          },
          "sku": {
            "description": "The stock keeping unit (SKU) for the item.",
            "type": "string",
            "minLength": 0,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "url": {
            "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "category": {
            "description": "The item category type.",
            "type": "string",
            "enum": [
              "DIGITAL_GOODS",
              "PHYSICAL_GOODS",
              "DONATION"
            ]
          },
          "image_url": {
            "description": "The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "upc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/universal_product_code"
              },
              {
                "description": "The Universal Product Code of the item."
              }
            ]
          },
          "billing_plan": {
            "$ref": "#/components/schemas/order_billing_plan"
          }
        }
      },
      "tracker_status": {
        "title": "Tracker Status",
        "description": "The status of the item shipment.",
        "type": "string",
        "enum": [
          "CANCELLED",
          "SHIPPED"
        ]
      },
      "tracker_item": {
        "title": "tracker_item",
        "description": "The details of the items in the shipment.",
        "type": "object",
        "properties": {
          "name": {
            "description": "The item name or title.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "quantity": {
            "description": "The item quantity. Must be a whole number.",
            "type": "string",
            "minLength": 1,
            "maxLength": 10,
            "pattern": "^[1-9][0-9]{0,9}$"
          },
          "sku": {
            "description": "The stock keeping unit (SKU) for the item. This can contain unicode characters.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "url": {
            "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "image_url": {
            "description": "The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri"
          },
          "upc": {
            "allOf": [
              {
                "$ref": "#/components/schemas/universal_product_code"
              },
              {
                "description": "The Universal Product Code of the item."
              }
            ]
          }
        }
      },
      "link_schema-2": {
        "title": "Link Schema",
        "description": "The request data or link target.",
        "type": "object",
        "properties": {
          "additionalItems": {
            "title": "additional_items",
            "description": "Any additional items.",
            "type": "object"
          },
          "dependencies": {
            "title": "Dependencies",
            "description": "Any Dependencies.",
            "type": "object"
          },
          "items": {
            "title": "Items",
            "description": "An item.",
            "type": "object"
          },
          "definitions": {
            "title": "Definitions",
            "description": "Definitions.",
            "type": "object"
          },
          "patternProperties": {
            "title": "pattern_properties",
            "description": "The pattern properties.",
            "type": "object"
          },
          "properties": {
            "title": "Properties",
            "description": "Properties.",
            "type": "object"
          },
          "allOf": {
            "title": "all_of",
            "description": "An array of sub-schemas. The data must validate against all sub-schemas.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "all_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "anyOf": {
            "title": "any_of",
            "description": "An array of sub-schemas. The data must validate against one or more sub-schemas.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "any_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "oneOf": {
            "title": "one_of",
            "description": "An array of sub-schemas. The data must validate against one sub-schema.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "title": "one_of_item",
              "description": "A sub-schema against which the data must validate.",
              "type": "object"
            }
          },
          "not": {
            "title": "Not",
            "description": "Not.",
            "type": "object"
          },
          "links": {
            "description": "An array of links.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "readOnly": true,
            "items": {
              "title": "link",
              "description": "A link.",
              "type": "object",
              "readOnly": true
            }
          },
          "fragmentResolution": {
            "title": "fragment_resolution",
            "description": "The fragment resolution.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "media": {
            "title": "Media",
            "description": "The media type and context-encoding scheme.",
            "type": "object",
            "properties": {
              "type": {
                "description": "The media type. See [Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://tools.ietf.org/html/rfc2046).",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$"
              },
              "binaryEncoding": {
                "title": "binary_encoding",
                "description": "The content-encoding scheme. See [Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies](https://tools.ietf.org/html/rfc2045).",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$"
              }
            }
          },
          "pathStart": {
            "title": "path_start",
            "description": "To apply this schema to the instances' URIs, start the URIs with this value.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "format": "uri"
          }
        }
      },
      "link_description-2": {
        "title": "Link Description",
        "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.",
        "type": "object",
        "required": [
          "href",
          "rel"
        ],
        "properties": {
          "href": {
            "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "rel": {
            "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "method": {
            "description": "The HTTP method required to make the related call.",
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE",
              "HEAD",
              "CONNECT",
              "OPTIONS",
              "PATCH"
            ]
          },
          "title": {
            "description": "The link title.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "mediaType": {
            "title": "media_type",
            "description": "The media type, as defined by [RFC 2046](https://www.ietf.org/rfc/rfc2046.txt). Describes the link target.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "encType": {
            "title": "enc_type",
            "description": "The media type in which to submit the request data.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$",
            "default": "application/json"
          },
          "schema": {
            "allOf": [
              {
                "$ref": "#/components/schemas/link_schema-2"
              },
              {
                "description": "The schema that describes the request data."
              }
            ]
          },
          "targetSchema": {
            "allOf": [
              {
                "$ref": "#/components/schemas/link_schema-2"
              },
              {
                "title": "target_schema",
                "description": "The schema that describes the link target."
              }
            ]
          }
        }
      },
      "tracker": {
        "title": "tracker",
        "description": "The tracking response on creation of tracker.",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The tracker id.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "status": {
                "$ref": "#/components/schemas/tracker_status"
              },
              "items": {
                "description": "An array of details of items in the shipment.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/tracker_item"
                    },
                    {
                      "title": "tracker_item",
                      "description": "Items in a shipment."
                    }
                  ]
                }
              },
              "links": {
                "description": "An array of request-related HATEOAS links.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description",
                      "description": "A request-related [HATEOAS link](/api/rest/responses/#hateoas-links)."
                    }
                  ]
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/activity_timestamps"
          }
        ]
      },
      "shipping_with_tracking_details": {
        "title": "shipping_with_tracking_details",
        "description": "The order shipping details.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/shipping_detail"
          },
          {
            "type": "object",
            "properties": {
              "phone_number": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/phone_with_national_required_and_country_code"
                  },
                  {
                    "description": "The phone number of the recipient of the shipped items, which may belong to either the payer, or an alternate contact, for delivery."
                  }
                ]
              },
              "trackers": {
                "description": "An array of trackers for a transaction.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "items": {
                  "$ref": "#/components/schemas/tracker"
                }
              }
            }
          }
        ]
      },
      "authorization_status_details": {
        "title": "authorization_status_details",
        "description": "The details of the authorized payment status.",
        "type": "object",
        "properties": {
          "reason": {
            "title": "Authorization Incomplete Reason",
            "description": "The reason why the authorized status is `PENDING`.",
            "type": "string",
            "enum": [
              "PENDING_REVIEW",
              "DECLINED_BY_RISK_FRAUD_FILTERS"
            ]
          }
        }
      },
      "authorization_status": {
        "title": "authorization_status",
        "description": "The status fields and status details for an authorized payment.",
        "type": "object",
        "properties": {
          "status": {
            "title": "Authorization Status",
            "description": "The status for the authorized payment.",
            "type": "string",
            "enum": [
              "CREATED",
              "CAPTURED",
              "DENIED",
              "PARTIALLY_CAPTURED",
              "VOIDED",
              "PENDING"
            ],
            "readOnly": true
          },
          "status_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/authorization_status_details"
              },
              {
                "description": "The details of the authorized order pending status.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "seller_protection": {
        "title": "seller_protection",
        "description": "The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection).",
        "type": "object",
        "properties": {
          "status": {
            "title": "Seller Protection Status",
            "description": "Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection).",
            "type": "string",
            "enum": [
              "ELIGIBLE",
              "PARTIALLY_ELIGIBLE",
              "NOT_ELIGIBLE"
            ],
            "readOnly": true
          },
          "dispute_categories": {
            "description": "An array of conditions that are covered for the transaction.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "readOnly": true,
            "items": {
              "title": "dispute_category",
              "description": "The condition that is covered for the transaction.",
              "type": "string",
              "enum": [
                "ITEM_NOT_RECEIVED",
                "UNAUTHORIZED_TRANSACTION"
              ]
            }
          }
        }
      },
      "authorization": {
        "title": "authorization",
        "description": "The authorized payment transaction.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/authorization_status"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The PayPal-generated ID for the authorized payment.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/amount_with_breakdown"
                  },
                  {
                    "description": "The amount for this authorized payment.",
                    "readOnly": true
                  }
                ]
              },
              "invoice_id": {
                "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "custom_id": {
                "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.",
                "type": "string",
                "minLength": 0,
                "maxLength": 255,
                "pattern": "^[\\S\\s]*$"
              },
              "network_transaction_reference": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/network_transaction"
                  }
                ]
              },
              "seller_protection": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/seller_protection"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "expiration_time": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/date_time"
                  },
                  {
                    "description": "The date and time when the authorized payment expires, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).",
                    "readOnly": true
                  }
                ]
              },
              "links": {
                "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description"
                    }
                  ]
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/activity_timestamps"
          }
        ]
      },
      "processor_response": {
        "title": "processor_response",
        "description": "The processor response information for payment requests, such as direct credit card transactions.",
        "type": "object",
        "properties": {
          "avs_code": {
            "description": "The address verification code for Visa, Discover, Mastercard, or American Express transactions.",
            "type": "string",
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "E",
              "F",
              "G",
              "I",
              "M",
              "N",
              "P",
              "R",
              "S",
              "U",
              "W",
              "X",
              "Y",
              "Z",
              "Null",
              "0",
              "1",
              "2",
              "3",
              "4"
            ],
            "readOnly": true
          },
          "cvv_code": {
            "description": "The card verification value code for for Visa, Discover, Mastercard, or American Express.",
            "type": "string",
            "enum": [
              "E",
              "I",
              "M",
              "N",
              "P",
              "S",
              "U",
              "X",
              "All others",
              "0",
              "1",
              "2",
              "3",
              "4"
            ],
            "readOnly": true
          },
          "response_code": {
            "description": "Processor response code for the non-PayPal payment processor errors.",
            "type": "string",
            "enum": [
              "0000",
              "00N7",
              "0100",
              "0390",
              "0500",
              "0580",
              "0800",
              "0880",
              "0890",
              "0960",
              "0R00",
              "1000",
              "10BR",
              "1300",
              "1310",
              "1312",
              "1317",
              "1320",
              "1330",
              "1335",
              "1340",
              "1350",
              "1352",
              "1360",
              "1370",
              "1380",
              "1382",
              "1384",
              "1390",
              "1393",
              "5100",
              "5110",
              "5120",
              "5130",
              "5135",
              "5140",
              "5150",
              "5160",
              "5170",
              "5180",
              "5190",
              "5200",
              "5210",
              "5400",
              "5500",
              "5650",
              "5700",
              "5710",
              "5800",
              "5900",
              "5910",
              "5920",
              "5930",
              "5950",
              "6300",
              "7600",
              "7700",
              "7710",
              "7800",
              "7900",
              "8000",
              "8010",
              "8020",
              "8030",
              "8100",
              "8110",
              "8220",
              "9100",
              "9500",
              "9510",
              "9520",
              "9530",
              "9540",
              "9600",
              "PCNR",
              "PCVV",
              "PP06",
              "PPRN",
              "PPAD",
              "PPAB",
              "PPAE",
              "PPAG",
              "PPAI",
              "PPAR",
              "PPAU",
              "PPAV",
              "PPAX",
              "PPBG",
              "PPC2",
              "PPCE",
              "PPCO",
              "PPCR",
              "PPCT",
              "PPCU",
              "PPD3",
              "PPDC",
              "PPDI",
              "PPDV",
              "PPDT",
              "PPEF",
              "PPEL",
              "PPER",
              "PPEX",
              "PPFE",
              "PPFI",
              "PPFR",
              "PPFV",
              "PPGR",
              "PPH1",
              "PPIF",
              "PPII",
              "PPIM",
              "PPIT",
              "PPLR",
              "PPLS",
              "PPMB",
              "PPMC",
              "PPMD",
              "PPNC",
              "PPNL",
              "PPNM",
              "PPNT",
              "PPPH",
              "PPPI",
              "PPPM",
              "PPQC",
              "PPRE",
              "PPRF",
              "PPRR",
              "PPS0",
              "PPS1",
              "PPS2",
              "PPS3",
              "PPS4",
              "PPS5",
              "PPS6",
              "PPSC",
              "PPSD",
              "PPSE",
              "PPTE",
              "PPTF",
              "PPTI",
              "PPTR",
              "PPTT",
              "PPTV",
              "PPUA",
              "PPUC",
              "PPUE",
              "PPUI",
              "PPUP",
              "PPUR",
              "PPVC",
              "PPVE",
              "PPVT"
            ],
            "readOnly": true
          },
          "payment_advice_code": {
            "description": "The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes.",
            "type": "string",
            "enum": [
              "01",
              "02",
              "03",
              "04",
              "21",
              "22",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "40",
              "43"
            ],
            "readOnly": true
          }
        }
      },
      "authorization_with_additional_data": {
        "title": "authorization_with_additional_data",
        "description": "The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/authorization"
          },
          {
            "type": "object",
            "properties": {
              "processor_response": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/processor_response"
                  },
                  {
                    "description": "The processor response for card transactions.",
                    "readOnly": true
                  }
                ]
              }
            }
          }
        ]
      },
      "capture_status_details": {
        "title": "capture_status_details",
        "description": "The details of the captured payment status.",
        "type": "object",
        "properties": {
          "reason": {
            "title": "Capture Incomplete Reason",
            "description": "The reason why the captured payment status is `PENDING` or `DENIED`.",
            "type": "string",
            "enum": [
              "BUYER_COMPLAINT",
              "CHARGEBACK",
              "ECHECK",
              "INTERNATIONAL_WITHDRAWAL",
              "OTHER",
              "PENDING_REVIEW",
              "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION",
              "REFUNDED",
              "TRANSACTION_APPROVED_AWAITING_FUNDING",
              "UNILATERAL",
              "VERIFICATION_REQUIRED",
              "DECLINED_BY_RISK_FRAUD_FILTERS"
            ]
          }
        }
      },
      "capture_status": {
        "title": "capture_status",
        "description": "The status and status details of a captured payment.",
        "type": "object",
        "properties": {
          "status": {
            "title": "Capture Status",
            "description": "The status of the captured payment.",
            "type": "string",
            "enum": [
              "COMPLETED",
              "DECLINED",
              "PARTIALLY_REFUNDED",
              "PENDING",
              "REFUNDED",
              "FAILED"
            ],
            "readOnly": true
          },
          "status_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/capture_status_details"
              },
              {
                "description": "The details of the captured payment status.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "exchange_rate": {
        "title": "exchange_rate",
        "description": "The exchange rate that determines the amount to convert from one currency to another currency.",
        "type": "object",
        "readOnly": true,
        "properties": {
          "source_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/currency_code"
              },
              {
                "description": "The source currency from which to convert an amount."
              }
            ]
          },
          "target_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/currency_code"
              },
              {
                "description": "The target currency to which to convert an amount."
              }
            ]
          },
          "value": {
            "description": "The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "seller_receivable_breakdown": {
        "title": "Seller Receivable Breakdown",
        "description": "The detailed breakdown of the capture activity. This is not available for transactions that are in pending state.",
        "type": "object",
        "required": [
          "gross_amount"
        ],
        "properties": {
          "gross_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The amount for this captured payment in the currency of the transaction."
              }
            ]
          },
          "paypal_fee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The applicable fee for this captured payment in the currency of the transaction."
              }
            ]
          },
          "paypal_fee_in_receivable_currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The applicable fee for this captured payment in the receivable currency. Returned only in cases the fee is charged in the receivable currency. Example 'CNY'."
              }
            ]
          },
          "net_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The net amount that the payee receives for this captured payment in their PayPal account. The net amount is computed as <code>gross_amount</code> minus the <code>paypal_fee</code> minus the <code>platform_fees</code>."
              }
            ]
          },
          "receivable_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The net amount that is credited to the payee's PayPal account. Returned only when the currency of the captured payment is different from the currency of the PayPal account where the payee wants to credit the funds. The amount is computed as <code>net_amount</code> times <code>exchange_rate</code>."
              }
            ]
          },
          "exchange_rate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/exchange_rate"
              },
              {
                "description": "The exchange rate that determines the amount that is credited to the payee's PayPal account. Returned when the currency of the captured payment is different from the currency of the PayPal account where the payee wants to credit the funds."
              }
            ]
          },
          "platform_fees": {
            "description": "An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.",
            "type": "array",
            "minItems": 0,
            "maxItems": 1,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/platform_fee"
                },
                {
                  "title": "platform_fee"
                }
              ]
            }
          }
        }
      },
      "capture": {
        "title": "capture",
        "description": "A captured payment.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/capture_status"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The PayPal-generated ID for the captured payment.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/amount_with_breakdown"
                  },
                  {
                    "description": "The amount for this captured payment.",
                    "readOnly": true
                  }
                ]
              },
              "invoice_id": {
                "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "custom_id": {
                "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.",
                "type": "string",
                "minLength": 0,
                "maxLength": 255,
                "pattern": "^[\\S\\s]*$"
              },
              "network_transaction_reference": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/network_transaction"
                  }
                ]
              },
              "seller_protection": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/seller_protection"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "final_capture": {
                "description": "Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.",
                "type": "boolean",
                "default": false,
                "readOnly": true
              },
              "seller_receivable_breakdown": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/seller_receivable_breakdown"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "disbursement_mode": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/disbursement_mode"
                  }
                ]
              },
              "links": {
                "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description"
                    }
                  ]
                }
              },
              "processor_response": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/processor_response"
                  },
                  {
                    "description": "An object that provides additional processor information for a direct credit card transaction."
                  }
                ]
              }
            }
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/activity_timestamps"
              }
            ]
          }
        ]
      },
      "refund_status_details": {
        "title": "refund_status_details",
        "description": "The details of the refund status.",
        "type": "object",
        "properties": {
          "reason": {
            "title": "Refund Incomplete Reason",
            "description": "The reason why the refund has the `PENDING` or `FAILED` status.",
            "type": "string",
            "enum": [
              "ECHECK"
            ]
          }
        }
      },
      "refund_status": {
        "title": "refund_status",
        "description": "The refund status with details.",
        "type": "object",
        "properties": {
          "status": {
            "title": "Refund Status With Details",
            "description": "The status of the refund.",
            "type": "string",
            "enum": [
              "CANCELLED",
              "FAILED",
              "PENDING",
              "COMPLETED"
            ],
            "readOnly": true
          },
          "status_details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/refund_status_details"
              },
              {
                "description": "The details of the refund status.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "net_amount_breakdown_item": {
        "title": "net_amount_breakdown",
        "description": "The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds.",
        "type": "object",
        "properties": {
          "payable_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The net amount debited from the merchant's PayPal account.",
                "readOnly": true
              }
            ]
          },
          "converted_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/money"
              },
              {
                "description": "The converted payable amount.",
                "readOnly": true
              }
            ]
          },
          "exchange_rate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/exchange_rate"
              },
              {
                "description": "The exchange rate that determines the amount that was debited from the merchant's PayPal account.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "refund": {
        "title": "refund",
        "description": "The refund information.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/refund_status"
              }
            ]
          },
          {
            "title": "Refund Properties",
            "description": "The detailed properties of the refund transaction, including identifiers, amounts, breakdowns, and associated metadata.",
            "type": "object",
            "properties": {
              "id": {
                "description": "The PayPal-generated ID for the refund.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/money"
                  },
                  {
                    "description": "The amount that the payee refunded to the payer.",
                    "readOnly": true
                  }
                ]
              },
              "invoice_id": {
                "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "custom_id": {
                "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.",
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "pattern": "^[A-Za-z0-9-_.,]*$"
              },
              "acquirer_reference_number": {
                "description": "Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.",
                "type": "string",
                "minLength": 1,
                "maxLength": 36,
                "pattern": "^[a-zA-Z0-9]+$"
              },
              "note_to_payer": {
                "description": "The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "seller_payable_breakdown": {
                "title": "Seller Payable Breakdown",
                "description": "The breakdown of the refund.",
                "type": "object",
                "readOnly": true,
                "properties": {
                  "gross_amount": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The amount that the payee refunded to the payer.",
                        "readOnly": true
                      }
                    ]
                  },
                  "paypal_fee": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The PayPal fee that was refunded to the payer in the currency of the transaction. This fee might not match the PayPal fee that the payee paid when the payment was captured.",
                        "readOnly": true
                      }
                    ]
                  },
                  "paypal_fee_in_receivable_currency": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The PayPal fee that was refunded to the payer in the receivable currency. Returned only in cases when the receivable currency is different from transaction currency. Example 'CNY'.",
                        "readOnly": true
                      }
                    ]
                  },
                  "net_amount": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The net amount that the payee's account is debited in the transaction currency. The net amount is calculated as <code>gross_amount</code> minus <code>paypal_fee</code> minus <code>platform_fees</code>.",
                        "readOnly": true
                      }
                    ]
                  },
                  "net_amount_in_receivable_currency": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The net amount that the payee's account is debited in the receivable currency. Returned only in cases when the receivable currency is different from transaction currency. Example 'CNY'.",
                        "readOnly": true
                      }
                    ]
                  },
                  "platform_fees": {
                    "description": "An array of platform or partner fees, commissions, or brokerage fees for the refund.",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 1,
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/platform_fee"
                        },
                        {
                          "title": "platform_fee"
                        }
                      ]
                    }
                  },
                  "net_amount_breakdown": {
                    "description": "An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds.",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 32767,
                    "readOnly": true,
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/net_amount_breakdown_item"
                        },
                        {
                          "title": "net_amount_breakdown_item"
                        }
                      ]
                    }
                  },
                  "total_refunded_amount": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/money"
                      },
                      {
                        "description": "The total amount refunded from the original capture to date. For example, if a payer makes a $100 purchase and was refunded $20 a week ago and was refunded $30 in this refund, the `gross_amount` is $30 for this refund and the `total_refunded_amount` is $50."
                      }
                    ]
                  }
                }
              },
              "payer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/payee_base"
                  },
                  {
                    "description": "The details associated with the merchant for this transaction.",
                    "readOnly": true
                  }
                ]
              },
              "links": {
                "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description"
                    }
                  ]
                }
              }
            }
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/activity_timestamps"
              }
            ]
          }
        ]
      },
      "payment_collection": {
        "title": "Payment Collection",
        "description": "The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds.",
        "type": "object",
        "properties": {
          "authorizations": {
            "description": "An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/authorization_with_additional_data"
                },
                {
                  "title": "authorizations",
                  "description": "The authorized payment for a purchase unit."
                }
              ]
            }
          },
          "captures": {
            "description": "An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/capture"
                },
                {
                  "title": "capture",
                  "description": "The captured payment for a purchase unit."
                }
              ]
            }
          },
          "refunds": {
            "description": "An array of refunds for a purchase unit. A purchase unit can have zero or more refunds.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/refund"
                },
                {
                  "title": "refund",
                  "description": "A refund for a purchase unit."
                }
              ]
            }
          }
        }
      },
      "purchase_unit": {
        "title": "Purchase Unit",
        "description": "The purchase unit details. Used to capture required information for the payment contract.",
        "type": "object",
        "properties": {
          "reference_id": {
            "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`. <blockquote><strong>Note:</strong> If there are multiple purchase units, <code>reference_id</code> is required for each purchase unit.</blockquote>",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[\\S\\s]*$"
          },
          "amount": {
            "$ref": "#/components/schemas/amount_with_breakdown"
          },
          "payee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payee"
              },
              {
                "description": "The merchant who receives payment for this transaction."
              }
            ]
          },
          "payment_instruction": {
            "$ref": "#/components/schemas/payment_instruction"
          },
          "description": {
            "description": "The purchase description.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "custom_id": {
            "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.",
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[\\S\\s]*$"
          },
          "invoice_id": {
            "description": "The API caller-provided external invoice ID for this order.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "id": {
            "description": "The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling <code>v2/checkout/orders/id/save</code>.",
            "type": "string",
            "minLength": 1,
            "maxLength": 19,
            "pattern": "^[\\S\\s]*$"
          },
          "soft_descriptor": {
            "description": "The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:<code>22 - len(PAYPAL * (8)) - len(<var>Descriptor in Payment Receiving Preferences of Merchant account</var> + 1)</code>The PAYPAL prefix uses 8 characters.<br/><br/>The soft descriptor supports the following ASCII characters:<ul><li>Alphanumeric characters</li><li>Dashes</li><li>Asterisks</li><li>Periods (.)</li><li>Spaces</li></ul>For Wallet payments marketplace integrations:<ul><li>The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.</li><li>You can't use the remaining space to show the customer service number.</li><li>The remaining spaces can be a combination of seller name and country.</li></ul><br/>For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number.",
            "type": "string",
            "minLength": 1,
            "maxLength": 22,
            "pattern": "^[\\S\\s]*$"
          },
          "items": {
            "description": "An array of items that the customer purchases from the merchant.",
            "type": "array",
            "minItems": 0,
            "maxItems": 32767,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/item"
                },
                {
                  "title": "item",
                  "description": "An item."
                }
              ]
            }
          },
          "shipping": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipping_with_tracking_details"
              },
              {
                "description": "The shipping address and method."
              }
            ]
          },
          "supplementary_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/supplementary_data"
              },
              {
                "description": "Supplementary data about this payment. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href=\"https://developer.paypal.com/docs/checkout/advanced/processing/\">checkout</a> or <a href=\"https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/\">multiparty checkout</a>."
              }
            ]
          },
          "payments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payment_collection"
              },
              {
                "description": "The comprehensive history of payments for the purchase unit.",
                "readOnly": true
              }
            ]
          }
        }
      },
      "order_status": {
        "title": "Order Status",
        "description": "The order status.",
        "type": "string",
        "enum": [
          "CREATED",
          "SAVED",
          "APPROVED",
          "VOIDED",
          "COMPLETED",
          "PAYER_ACTION_REQUIRED"
        ]
      },
      "order": {
        "title": "Order",
        "description": "The order details.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/activity_timestamps"
              },
              {
                "title": "activity_timestamps"
              }
            ]
          },
          {
            "type": "object",
            "title": "Order",
            "description": "The order details.",
            "properties": {
              "id": {
                "description": "The ID of the order.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "payment_source": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/payment_source_response"
                  }
                ]
              },
              "intent": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/checkout_payment_intent"
                  }
                ]
              },
              "payer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/payer"
                  },
                  {
                    "description": "DEPRECATED. The customer is also known as the payer. The Payer object was intended to only be used with the `payment_source.paypal` object. In order to make this design more clear, the details in the `payer` object are now available under `payment_source.paypal`. Please use `payment_source.paypal`. <b>DEPRECATED</b><br><table><tr><th>See</th><th>Since Version</th></tr><tr><td>payment_source.paypal</td><td>2.9</td></tr></table>",
                    "deprecated": true
                  }
                ]
              },
              "purchase_units": {
                "description": "An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.",
                "type": "array",
                "minItems": 1,
                "maxItems": 10,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/purchase_unit"
                    },
                    {
                      "title": "purchase_unit",
                      "description": "A purchase unit. Establishes a contract between a customer and merchant."
                    }
                  ]
                }
              },
              "status": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order_status"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "links": {
                "description": "An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get \"We're sorry, Things don't appear to be working at the moment\" after the payer approves the payment.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description",
                      "description": "A request-related [HATEOAS link](/api/rest/responses/#hateoas-links). To complete payer approval, use the `approve` link with the `GET` method."
                    }
                  ]
                }
              }
            }
          }
        ]
      },
      "patch": {
        "title": "Patch",
        "description": "The JSON patch object to apply partial updates to resources.",
        "type": "object",
        "required": [
          "op"
        ],
        "properties": {
          "op": {
            "description": "The operation.",
            "type": "string",
            "enum": [
              "add",
              "remove",
              "replace",
              "move",
              "copy",
              "test"
            ]
          },
          "path": {
            "description": "The <a href=\"https://tools.ietf.org/html/rfc6901\">JSON Pointer</a> to the target document location at which to complete the operation.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          },
          "value": {
            "title": "Patch Value",
            "description": "The value to apply. The <code>remove</code>, <code>copy</code>, and <code>move</code> operations do not require a value. Since <a href=\"https://www.rfc-editor.org/rfc/rfc6902\">JSON Patch</a> allows any type for <code>value</code>, the <code>type</code> property is not specified."
          },
          "from": {
            "description": "The <a href=\"https://tools.ietf.org/html/rfc6901\">JSON Pointer</a> to the target document location from which to move the value. Required for the <code>move</code> operation.",
            "type": "string",
            "minLength": 0,
            "maxLength": 2147483647,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "patch_request": {
        "title": "Patch Request",
        "description": "An array of JSON patch objects to apply partial updates to resources.",
        "type": "array",
        "minItems": 0,
        "maxItems": 32767,
        "items": {
          "allOf": [
            {
              "$ref": "#/components/schemas/patch"
            },
            {
              "title": "patch"
            }
          ]
        }
      },
      "order_confirm_application_context": {
        "title": "Order Confirm Application Context",
        "description": "Customizes the payer confirmation experience.",
        "type": "object",
        "properties": {
          "brand_name": {
            "description": "Label to present to your payer as part of the PayPal hosted web experience.",
            "type": "string",
            "minLength": 1,
            "maxLength": 127,
            "pattern": "^[\\S\\s]*$"
          },
          "locale": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              },
              {
                "description": "The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, `da-DK`, `he-IL`, `id-ID`, `ja-JP`, `no-NO`, `pt-BR`, `ru-RU`, `sv-SE`, `th-TH`, `zh-CN`, `zh-HK`, or `zh-TW`."
              }
            ]
          },
          "return_url": {
            "description": "The URL where the customer is redirected after the customer approves the payment.",
            "type": "string",
            "minLength": 10,
            "maxLength": 4000,
            "format": "uri"
          },
          "cancel_url": {
            "description": "The URL where the customer is redirected after the customer cancels the payment.",
            "type": "string",
            "minLength": 10,
            "maxLength": 4000,
            "format": "uri"
          },
          "stored_payment_source": {
            "$ref": "#/components/schemas/stored_payment_source"
          }
        }
      },
      "confirm_order_request": {
        "title": "confirm_order_request",
        "description": "Payer confirms the intent to pay for the Order using the provided payment source.",
        "type": "object",
        "required": [
          "payment_source"
        ],
        "properties": {
          "payment_source": {
            "$ref": "#/components/schemas/payment_source"
          },
          "application_context": {
            "$ref": "#/components/schemas/order_confirm_application_context"
          }
        }
      },
      "order_authorize_request": {
        "title": "Order Authorize Request",
        "description": "The authorization of an order request.",
        "type": "object",
        "properties": {
          "payment_source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payment_source"
              },
              {
                "description": "The source of payment for the order, which can be a token or a card. Use this object only if you have not redirected the user after order creation to approve the payment. In such cases, the user-selected payment method in the PayPal flow is implicitly used."
              }
            ]
          }
        }
      },
      "order_authorize_response": {
        "title": "Order Authorize Response",
        "description": "The order authorize response.",
        "type": "object",
        "allOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/activity_timestamps"
              },
              {
                "title": "activity_timestamps"
              }
            ]
          },
          {
            "type": "object",
            "title": "Order Authorize Response",
            "description": "The order authorize response.",
            "properties": {
              "id": {
                "description": "The ID of the order.",
                "type": "string",
                "minLength": 0,
                "maxLength": 2147483647,
                "pattern": "^[\\S\\s]*$",
                "readOnly": true
              },
              "payment_source": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/payment_source_response"
                  },
                  {
                    "not": {
                      "anyOf": [
                        {
                          "required": [
                            "alipay"
                          ]
                        },
                        {
                          "required": [
                            "bancomatpay"
                          ]
                        },
                        {
                          "required": [
                            "bancontact"
                          ]
                        },
                        {
                          "required": [
                            "blik"
                          ]
                        },
                        {
                          "required": [
                            "boletobancario"
                          ]
                        },
                        {
                          "required": [
                            "eps"
                          ]
                        },
                        {
                          "required": [
                            "giropay"
                          ]
                        },
                        {
                          "required": [
                            "grabpay"
                          ]
                        },
                        {
                          "required": [
                            "ideal"
                          ]
                        },
                        {
                          "required": [
                            "mbway"
                          ]
                        },
                        {
                          "required": [
                            "multibanco"
                          ]
                        },
                        {
                          "required": [
                            "mybank"
                          ]
                        },
                        {
                          "required": [
                            "oxxo"
                          ]
                        },
                        {
                          "required": [
                            "payu"
                          ]
                        },
                        {
                          "required": [
                            "pay_upon_invoice"
                          ]
                        },
                        {
                          "required": [
                            "p24"
                          ]
                        },
                        {
                          "required": [
                            "safetypay"
                          ]
                        },
                        {
                          "required": [
                            "satispay"
                          ]
                        },
                        {
                          "required": [
                            "swish"
                          ]
                        },
                        {
                          "required": [
                            "sofort"
                          ]
                        },
                        {
                          "required": [
                            "trustly"
                          ]
                        },
                        {
                          "required": [
                            "verkkopankki"
                          ]
                        },
                        {
                          "required": [
                            "wechatpay"
                          ]
                        }
                      ]
                    }
                  }
                ]
              },
              "intent": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/checkout_payment_intent"
                  }
                ]
              },
              "payer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/payer"
                  }
                ]
              },
              "purchase_units": {
                "description": "An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.",
                "type": "array",
                "minItems": 1,
                "maxItems": 10,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/purchase_unit"
                    },
                    {
                      "title": "purchase_unit",
                      "description": "A purchase unit. Establishes a contract between a customer and merchant."
                    }
                  ]
                }
              },
              "status": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order_status"
                  },
                  {
                    "readOnly": true
                  }
                ]
              },
              "links": {
                "description": "An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get \"We're sorry, Things don't appear to be working at the moment\" after the payer approves the payment.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "readOnly": true,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/link_description-2"
                    },
                    {
                      "title": "link_description",
                      "description": "A request-related [HATEOAS link](/api/rest/responses/#hateoas-links). To complete payer approval, use the `approve` link with the `GET` method."
                    }
                  ]
                }
              }
            }
          }
        ]
      },
      "order_capture_request": {
        "title": "Order Capture Request",
        "description": "Completes an capture payment for an order.",
        "type": "object",
        "properties": {
          "payment_source": {
            "allOf": [
              {
                "$ref": "#/components/schemas/payment_source"
              },
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "afterpay"
                      ]
                    },
                    {
                      "required": [
                        "bancontact"
                      ]
                    },
                    {
                      "required": [
                        "blik"
                      ]
                    },
                    {
                      "required": [
                        "bizum"
                      ]
                    },
                    {
                      "required": [
                        "blik_pay_later"
                      ]
                    },
                    {
                      "required": [
                        "crypto"
                      ]
                    },
                    {
                      "required": [
                        "dragonpay"
                      ]
                    },
                    {
                      "required": [
                        "eps"
                      ]
                    },
                    {
                      "required": [
                        "estonia_banks"
                      ]
                    },
                    {
                      "required": [
                        "fiuu_cash"
                      ]
                    },
                    {
                      "required": [
                        "floa_pay"
                      ]
                    },
                    {
                      "required": [
                        "fpx"
                      ]
                    },
                    {
                      "required": [
                        "giropay"
                      ]
                    },
                    {
                      "required": [
                        "gopay"
                      ]
                    },
                    {
                      "required": [
                        "ideal"
                      ]
                    },
                    {
                      "required": [
                        "klarna"
                      ]
                    },
                    {
                      "required": [
                        "latvia_banks"
                      ]
                    },
                    {
                      "required": [
                        "lithuania_banks"
                      ]
                    },
                    {
                      "required": [
                        "mybank"
                      ]
                    },
                    {
                      "required": [
                        "paysafecard"
                      ]
                    },
                    {
                      "required": [
                        "pix_international"
                      ]
                    },
                    {
                      "required": [
                        "p24"
                      ]
                    },
                    {
                      "required": [
                        "skrill"
                      ]
                    },
                    {
                      "required": [
                        "paysera"
                      ]
                    },
                    {
                      "required": [
                        "scalapay"
                      ]
                    },
                    {
                      "required": [
                        "sofort"
                      ]
                    },
                    {
                      "required": [
                        "swish"
                      ]
                    },
                    {
                      "required": [
                        "thailand_banks"
                      ]
                    },
                    {
                      "required": [
                        "trustly"
                      ]
                    },
                    {
                      "required": [
                        "wero"
                      ]
                    },
                    {
                      "required": [
                        "zip"
                      ]
                    },
                    {
                      "required": [
                        "doku"
                      ]
                    },
                    {
                      "required": [
                        "alfamart"
                      ]
                    },
                    {
                      "required": [
                        "indomaret"
                      ]
                    },
                    {
                      "required": [
                        "indonesia_banks"
                      ]
                    },
                    {
                      "required": [
                        "jenius_pay"
                      ]
                    },
                    {
                      "required": [
                        "kredivo"
                      ]
                    },
                    {
                      "required": [
                        "linkaja"
                      ]
                    },
                    {
                      "required": [
                        "ovo"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "shipment_carrier": {
        "title": "carrier",
        "description": "The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see <a href=\"/docs/tracking/reference/carriers/\">Carriers</a>.",
        "type": "string",
        "enum": [
          "DPD_RU",
          "BG_BULGARIAN_POST",
          "KR_KOREA_POST",
          "ZA_COURIERIT",
          "FR_EXAPAQ",
          "ARE_EMIRATES_POST",
          "GAC",
          "GEIS",
          "SF_EX",
          "PAGO",
          "MYHERMES",
          "DIAMOND_EUROGISTICS",
          "CORPORATECOURIERS_WEBHOOK",
          "BOND",
          "OMNIPARCEL",
          "SK_POSTA",
          "PUROLATOR",
          "FETCHR_WEBHOOK",
          "THEDELIVERYGROUP",
          "CELLO_SQUARE",
          "TARRIVE",
          "COLLIVERY",
          "MAINFREIGHT",
          "IND_FIRSTFLIGHT",
          "ACSWORLDWIDE",
          "AMSTAN",
          "OKAYPARCEL",
          "ENVIALIA_REFERENCE",
          "SEUR_ES",
          "CONTINENTAL",
          "FDSEXPRESS",
          "AMAZON_FBA_SWISHIP",
          "WYNGS",
          "DHL_ACTIVE_TRACING",
          "ZYLLEM",
          "RUSTON",
          "XPOST",
          "CORREOS_ES",
          "DHL_FR",
          "PAN_ASIA",
          "BRT_IT",
          "SRE_KOREA",
          "SPEEDEE",
          "TNT_UK",
          "VENIPAK",
          "SHREENANDANCOURIER",
          "CROSHOT",
          "NIPOST_NG",
          "EPST_GLBL",
          "NEWGISTICS",
          "POST_SLOVENIA",
          "JERSEY_POST",
          "BOMBINOEXP",
          "WMG",
          "XQ_EXPRESS",
          "FURDECO",
          "LHT_EXPRESS",
          "SOUTH_AFRICAN_POST_OFFICE",
          "SPOTON",
          "DIMERCO",
          "CYPRUS_POST_CYP",
          "ABCUSTOM",
          "IND_DELIVREE",
          "CN_BESTEXPRESS",
          "DX_SFTP",
          "PICKUPP_MYS",
          "FMX",
          "HELLMANN",
          "SHIP_IT_ASIA",
          "KERRY_ECOMMERCE",
          "FRETERAPIDO",
          "PITNEY_BOWES",
          "XPRESSEN_DK",
          "SEUR_SP_API",
          "DELIVERYONTIME",
          "JINSUNG",
          "TRANS_KARGO",
          "SWISHIP_DE",
          "IVOY_WEBHOOK",
          "AIRMEE_WEBHOOK",
          "DHL_BENELUX",
          "FIRSTMILE",
          "FASTWAY_IR",
          "HH_EXP",
          "MYS_MYPOST_ONLINE",
          "TNT_NL",
          "TIPSA",
          "TAQBIN_MY",
          "KGMHUB",
          "INTEXPRESS",
          "OVERSE_EXP",
          "ONECLICK",
          "ROADRUNNER_FREIGHT",
          "GLS_CROTIA",
          "MRW_FTP",
          "BLUEX",
          "DYLT",
          "DPD_IR",
          "SIN_GLBL",
          "TUFFNELLS_REFERENCE",
          "CJPACKET",
          "MILKMAN",
          "ASIGNA",
          "ONEWORLDEXPRESS",
          "ROYAL_MAIL",
          "VIA_EXPRESS",
          "TIGFREIGHT",
          "ZTO_EXPRESS",
          "TWO_GO",
          "IML",
          "INTEL_VALLEY",
          "EFS",
          "UK_UK_MAIL",
          "RAM",
          "ALLIEDEXPRESS",
          "APC_OVERNIGHT",
          "SHIPPIT",
          "TFM",
          "M_XPRESS",
          "HDB_BOX",
          "CLEVY_LINKS",
          "IBEONE",
          "FIEGE_NL",
          "KWE_GLOBAL",
          "CTC_EXPRESS",
          "AMAZON",
          "MORE_LINK",
          "JX",
          "EASY_MAIL",
          "ADUIEPYLE",
          "GB_PANTHER",
          "EXPRESSSALE",
          "SG_DETRACK",
          "TRUNKRS_WEBHOOK",
          "MATDESPATCH",
          "DICOM",
          "MBW",
          "KHM_CAMBODIA_POST",
          "SINOTRANS",
          "BRT_IT_PARCELID",
          "DHL_SUPPLY_CHAIN",
          "DHL_PL",
          "TOPYOU",
          "PALEXPRESS",
          "DHL_SG",
          "CN_WEDO",
          "FULFILLME",
          "DPD_DELISTRACK",
          "UPS_REFERENCE",
          "CARIBOU",
          "LOCUS_WEBHOOK",
          "DSV",
          "P2P_TRC",
          "DIRECTPARCELS",
          "NOVA_POSHTA_INT",
          "FEDEX_POLAND",
          "CN_JCEX",
          "FAR_INTERNATIONAL",
          "IDEXPRESS",
          "GANGBAO",
          "NEWAY",
          "POSTNL_INT_3_S",
          "RPX_ID",
          "DESIGNERTRANSPORT_WEBHOOK",
          "GLS_SLOVEN",
          "PARCELLED_IN",
          "GSI_EXPRESS",
          "CON_WAY",
          "BROUWER_TRANSPORT",
          "CPEX",
          "ISRAEL_POST",
          "DTDC_IN",
          "PTT_POST",
          "XDE_WEBHOOK",
          "TOLOS",
          "GIAO_HANG",
          "GEODIS_ESPACE",
          "MAGYAR_HU",
          "DOORDASH_WEBHOOK",
          "TIKI_ID",
          "CJ_HK_INTERNATIONAL",
          "STAR_TRACK_EXPRESS",
          "HELTHJEM",
          "SFB2C",
          "FREIGHTQUOTE",
          "LANDMARK_GLOBAL_REFERENCE",
          "PARCEL2GO",
          "DELNEXT",
          "RCL",
          "CGS_EXPRESS",
          "HK_POST",
          "SAP_EXPRESS",
          "PARCELPOST_SG",
          "HERMES",
          "IND_SAFEEXPRESS",
          "TOPHATTEREXPRESS",
          "MGLOBAL",
          "AVERITT",
          "LEADER",
          "_2EBOX",
          "SG_SPEEDPOST",
          "DBSCHENKER_SE",
          "ISR_POST_DOMESTIC",
          "BESTWAYPARCEL",
          "ASENDIA_DE",
          "NIGHTLINE_UK",
          "TAQBIN_SG",
          "TCK_EXPRESS",
          "ENDEAVOUR_DELIVERY",
          "NANJINGWOYUAN",
          "HEPPNER_FR",
          "EMPS_CN",
          "FONSEN",
          "PICKRR",
          "APC_OVERNIGHT_CONNUM",
          "STAR_TRACK_NEXT_FLIGHT",
          "DAJIN",
          "UPS_FREIGHT",
          "POSTA_PLUS",
          "CEVA",
          "ANSERX",
          "JS_EXPRESS",
          "PADTF",
          "UPS_MAIL_INNOVATIONS",
          "SYPOST",
          "AMAZON_SHIP_MCF",
          "YUSEN",
          "BRING",
          "SDA_IT",
          "GBA",
          "NEWEGGEXPRESS",
          "SPEEDCOURIERS_GR",
          "FORRUN",
          "PICKUP",
          "ECMS",
          "INTELIPOST",
          "FLASHEXPRESS",
          "CN_STO",
          "SEKO_SFTP",
          "HOME_DELIVERY_SOLUTIONS",
          "DPD_HGRY",
          "KERRYTTC_VN",
          "JOYING_BOX",
          "TOTAL_EXPRESS",
          "ZJS_EXPRESS",
          "STARKEN",
          "DEMANDSHIP",
          "CN_DPEX",
          "AUPOST_CN",
          "LOGISTERS",
          "GOGLOBALPOST",
          "GLS_CZ",
          "PAACK_WEBHOOK",
          "GRAB_WEBHOOK",
          "PARCELPOINT",
          "ICUMULUS",
          "DAIGLOBALTRACK",
          "GLOBAL_IPARCEL",
          "YURTICI_KARGO",
          "CN_PAYPAL_PACKAGE",
          "PARCEL_2_POST",
          "GLS_IT",
          "PIL_LOGISTICS",
          "HEPPNER",
          "GENERAL_OVERNIGHT",
          "HAPPY2POINT",
          "CHITCHATS",
          "SMOOTH",
          "CLE_LOGISTICS",
          "FIEGE",
          "MX_CARGO",
          "ZIINGFINALMILE",
          "DAYTON_FREIGHT",
          "TCS",
          "AEX",
          "HERMES_DE",
          "ROUTIFIC_WEBHOOK",
          "GLOBAVEND",
          "CJ_LOGISTICS",
          "PALLET_NETWORK",
          "RAF_PH",
          "UK_XDP",
          "PAPER_EXPRESS",
          "LA_POSTE_SUIVI",
          "PAQUETEXPRESS",
          "LIEFERY",
          "STRECK_TRANSPORT",
          "PONY_EXPRESS",
          "ALWAYS_EXPRESS",
          "GBS_BROKER",
          "CITYLINK_MY",
          "ALLJOY",
          "YODEL",
          "YODEL_DIR",
          "STONE3PL",
          "PARCELPAL_WEBHOOK",
          "DHL_ECOMERCE_ASA",
          "SIMPLYPOST",
          "KY_EXPRESS",
          "SHENZHEN",
          "US_LASERSHIP",
          "UC_EXPRE",
          "DIDADI",
          "CJ_KR",
          "DBSCHENKER_B2B",
          "MXE",
          "CAE_DELIVERS",
          "PFCEXPRESS",
          "WHISTL",
          "WEPOST",
          "DHL_PARCEL_ES",
          "DDEXPRESS",
          "ARAMEX_AU",
          "BNEED",
          "HK_TGX",
          "LATVIJAS_PASTS",
          "VIAEUROPE",
          "CORREO_UY",
          "CHRONOPOST_FR",
          "J_NET",
          "_6LS",
          "BLR_BELPOST",
          "BIRDSYSTEM",
          "DOBROPOST",
          "WAHANA_ID",
          "WEASHIP",
          "SONICTL",
          "KWT",
          "AFLLOG_FTP",
          "SKYNET_WORLDWIDE",
          "NOVA_POSHTA",
          "SEINO",
          "SZENDEX",
          "BPOST_INT",
          "DBSCHENKER_SV",
          "AO_DEUTSCHLAND",
          "EU_FLEET_SOLUTIONS",
          "PCFCORP",
          "LINKBRIDGE",
          "PRIMAMULTICIPTA",
          "COUREX",
          "ZAJIL_EXPRESS",
          "COLLECTCO",
          "JTEXPRESS",
          "FEDEX_UK",
          "USHIP",
          "PIXSELL",
          "SHIPTOR",
          "CDEK",
          "VNM_VIETTELPOST",
          "CJ_CENTURY",
          "GSO",
          "VIWO",
          "SKYBOX",
          "KERRYTJ",
          "NTLOGISTICS_VN",
          "SDH_SCM",
          "ZINC",
          "DPE_SOUTH_AFRC",
          "CESKA_CZ",
          "ACS_GR",
          "DEALERSEND",
          "JOCOM",
          "CSE",
          "TFORCE_FINALMILE",
          "SHIP_GATE",
          "SHIPTER",
          "NATIONAL_SAMEDAY",
          "YUNEXPRESS",
          "CAINIAO",
          "DMS_MATRIX",
          "DIRECTLOG",
          "ASENDIA_US",
          "_3JMSLOGISTICS",
          "LICCARDI_EXPRESS",
          "SKY_POSTAL",
          "CNWANGTONG",
          "POSTNORD_LOGISTICS_DK",
          "LOGISTIKA",
          "CELERITAS",
          "PRESSIODE",
          "SHREE_MARUTI",
          "LOGISTICSWORLDWIDE_HK",
          "EFEX",
          "LOTTE",
          "LONESTAR",
          "APRISAEXPRESS",
          "BEL_RS",
          "OSM_WORLDWIDE",
          "WESTGATE_GL",
          "FASTRACK",
          "DTD_EXPR",
          "ALFATREX",
          "PROMEDDELIVERY",
          "THABIT_LOGISTICS",
          "HCT_LOGISTICS",
          "CARRY_FLAP",
          "US_OLD_DOMINION",
          "ANICAM_BOX",
          "WANBEXPRESS",
          "AN_POST",
          "DPD_LOCAL",
          "STALLIONEXPRESS",
          "RAIDEREX",
          "SHOPFANS",
          "KYUNGDONG_PARCEL",
          "CHAMPION_LOGISTICS",
          "PICKUPP_SGP",
          "MORNING_EXPRESS",
          "NACEX",
          "THENILE_WEBHOOK",
          "HOLISOL",
          "LBCEXPRESS_FTP",
          "KURASI",
          "USF_REDDAWAY",
          "APG",
          "CN_BOXC",
          "ECOSCOOTING",
          "MAINWAY",
          "PAPERFLY",
          "HOUNDEXPRESS",
          "BOX_BERRY",
          "EP_BOX",
          "PLUS_LOG_UK",
          "FULFILLA",
          "ASE",
          "MAIL_PLUS",
          "XPO_LOGISTICS",
          "WNDIRECT",
          "CLOUDWISH_ASIA",
          "ZELERIS",
          "GIO_EXPRESS",
          "OCS_WORLDWIDE",
          "ARK_LOGISTICS",
          "AQUILINE",
          "PILOT_FREIGHT",
          "QWINTRY",
          "DANSKE_FRAGT",
          "CARRIERS",
          "AIR_CANADA_GLOBAL",
          "PRESIDENT_TRANS",
          "STEPFORWARDFS",
          "SKYNET_UK",
          "PITTOHIO",
          "CORREOS_EXPRESS",
          "RL_US",
          "DESTINY",
          "UK_YODEL",
          "COMET_TECH",
          "DHL_PARCEL_RU",
          "TNT_REFR",
          "SHREE_ANJANI_COURIER",
          "MIKROPAKKET_BE",
          "ETS_EXPRESS",
          "COLIS_PRIVE",
          "CN_YUNDA",
          "AAA_COOPER",
          "ROCKET_PARCEL",
          "_360LION",
          "PANDU",
          "PROFESSIONAL_COURIERS",
          "FLYTEXPRESS",
          "LOGISTICSWORLDWIDE_MY",
          "CORREOS_DE_ESPANA",
          "IMX",
          "FOUR_PX_EXPRESS",
          "XPRESSBEES",
          "PICKUPP_VNM",
          "STARTRACK_EXPRESS",
          "FR_COLISSIMO",
          "NACEX_SPAIN_REFERENCE",
          "DHL_SUPPLY_CHAIN_AU",
          "ESHIPPING",
          "SHREETIRUPATI",
          "HX_EXPRESS",
          "INDOPAKET",
          "CN_17POST",
          "K1_EXPRESS",
          "CJ_GLS",
          "MYS_GDEX",
          "NATIONEX",
          "ANJUN",
          "FARGOOD",
          "SMG_EXPRESS",
          "RZYEXPRESS",
          "SEFL",
          "TNT_CLICK_IT",
          "HDB",
          "HIPSHIPPER",
          "RPXLOGISTICS",
          "KUEHNE",
          "IT_NEXIVE",
          "PTS",
          "SWISS_POST_FTP",
          "FASTRK_SERV",
          "_4_72",
          "US_YRC",
          "POSTNL_INTL_3S",
          "ELIAN_POST",
          "CUBYN",
          "SAU_SAUDI_POST",
          "ABXEXPRESS_MY",
          "HUAHAN_EXPRESS",
          "ZES_EXPRESS",
          "ZEPTO_EXPRESS",
          "SKYNET_ZA",
          "ZEEK_2_DOOR",
          "BLINKLASTMILE",
          "POSTA_UKR",
          "CHROBINSON",
          "CN_POST56",
          "COURANT_PLUS",
          "SCUDEX_EXPRESS",
          "SHIPENTEGRA",
          "B_TWO_C_EUROPE",
          "COPE",
          "IND_GATI",
          "CN_WISHPOST",
          "NACEX_ES",
          "TAQBIN_HK",
          "GLOBALTRANZ",
          "HKD",
          "BJSHOMEDELIVERY",
          "OMNIVA",
          "SUTTON",
          "PANTHER_REFERENCE",
          "SFCSERVICE",
          "LTL",
          "PARKNPARCEL",
          "SPRING_GDS",
          "ECEXPRESS",
          "INTERPARCEL_AU",
          "AGILITY",
          "XL_EXPRESS",
          "ADERONLINE",
          "DIRECTCOURIERS",
          "PLANZER",
          "SENDING",
          "NINJAVAN_WB",
          "NATIONWIDE_MY",
          "SENDIT",
          "GB_ARROW",
          "IND_GOJAVAS",
          "KPOST",
          "DHL_FREIGHT",
          "BLUECARE",
          "JINDOUYUN",
          "TRACKON",
          "GB_TUFFNELLS",
          "TRUMPCARD",
          "ETOTAL",
          "SFPLUS_WEBHOOK",
          "SEKOLOGISTICS",
          "HERMES_2MANN_HANDLING",
          "DPD_LOCAL_REF",
          "UDS",
          "ZA_SPECIALISED_FREIGHT",
          "THA_KERRY",
          "PRT_INT_SEUR",
          "BRA_CORREIOS",
          "NZ_NZ_POST",
          "CN_EQUICK",
          "MYS_EMS",
          "GB_NORSK",
          "ESP_MRW",
          "ESP_PACKLINK",
          "KANGAROO_MY",
          "RPX",
          "XDP_UK_REFERENCE",
          "NINJAVAN_MY",
          "ADICIONAL",
          "ROADBULL",
          "YAKIT",
          "MAILAMERICAS",
          "MIKROPAKKET",
          "DYNALOGIC",
          "DHL_ES",
          "DHL_PARCEL_NL",
          "DHL_GLOBAL_MAIL_ASIA",
          "DAWN_WING",
          "GENIKI_GR",
          "HERMESWORLD_UK",
          "ALPHAFAST",
          "BUYLOGIC",
          "EKART",
          "MEX_SENDA",
          "SFC_LOGISTICS",
          "POST_SERBIA",
          "IND_DELHIVERY",
          "DE_DPD_DELISTRACK",
          "RPD2MAN",
          "CN_SF_EXPRESS",
          "YANWEN",
          "MYS_SKYNET",
          "CORREOS_DE_MEXICO",
          "CBL_LOGISTICA",
          "MEX_ESTAFETA",
          "AU_AUSTRIAN_POST",
          "RINCOS",
          "NLD_DHL",
          "RUSSIAN_POST",
          "COURIERS_PLEASE",
          "POSTNORD_LOGISTICS",
          "FEDEX",
          "DPE_EXPRESS",
          "DPD",
          "ADSONE",
          "IDN_JNE",
          "THECOURIERGUY",
          "CNEXPS",
          "PRT_CHRONOPOST",
          "LANDMARK_GLOBAL",
          "IT_DHL_ECOMMERCE",
          "ESP_NACEX",
          "PRT_CTT",
          "BE_KIALA",
          "ASENDIA_UK",
          "GLOBAL_TNT",
          "POSTUR_IS",
          "EPARCEL_KR",
          "INPOST_PACZKOMATY",
          "IT_POSTE_ITALIA",
          "BE_BPOST",
          "PL_POCZTA_POLSKA",
          "MYS_MYS_POST",
          "SG_SG_POST",
          "THA_THAILAND_POST",
          "LEXSHIP",
          "FASTWAY_NZ",
          "DHL_AU",
          "COSTMETICSNOW",
          "PFLOGISTICS",
          "LOOMIS_EXPRESS",
          "GLS_ITALY",
          "LINE",
          "GEL_EXPRESS",
          "HUODULL",
          "NINJAVAN_SG",
          "JANIO",
          "AO_COURIER",
          "BRT_IT_SENDER_REF",
          "SAILPOST",
          "LALAMOVE",
          "NEWZEALAND_COURIERS",
          "ETOMARS",
          "VIRTRANSPORT",
          "WIZMO",
          "PALLETWAYS",
          "I_DIKA",
          "CFL_LOGISTICS",
          "GEMWORLDWIDE",
          "GLOBAL_EXPRESS",
          "LOGISTYX_TRANSGROUP",
          "WESTBANK_COURIER",
          "ARCO_SPEDIZIONI",
          "YDH_EXPRESS",
          "PARCELINKLOGISTICS",
          "CNDEXPRESS",
          "NOX_NIGHT_TIME_EXPRESS",
          "AERONET",
          "LTIANEXP",
          "INTEGRA2_FTP",
          "PARCELONE",
          "NOX_NACHTEXPRESS",
          "CN_CHINA_POST_EMS",
          "CHUKOU1",
          "GLS_SLOV",
          "ORANGE_DS",
          "JOOM_LOGIS",
          "AUS_STARTRACK",
          "DHL",
          "GB_APC",
          "BONDSCOURIERS",
          "JPN_JAPAN_POST",
          "USPS",
          "WINIT",
          "ARG_OCA",
          "TW_TAIWAN_POST",
          "DMM_NETWORK",
          "TNT",
          "BH_POSTA",
          "SWE_POSTNORD",
          "CA_CANADA_POST",
          "WISELOADS",
          "ASENDIA_HK",
          "NLD_GLS",
          "MEX_REDPACK",
          "JET_SHIP",
          "DE_DHL_EXPRESS",
          "NINJAVAN_THAI",
          "RABEN_GROUP",
          "ESP_ASM",
          "HRV_HRVATSKA",
          "GLOBAL_ESTES",
          "LTU_LIETUVOS",
          "BEL_DHL",
          "AU_AU_POST",
          "SPEEDEXCOURIER",
          "FR_COLIS",
          "ARAMEX",
          "DPEX",
          "MYS_AIRPAK",
          "CUCKOOEXPRESS",
          "DPD_POLAND",
          "NLD_POSTNL",
          "NIM_EXPRESS",
          "QUANTIUM",
          "SENDLE",
          "ESP_REDUR",
          "MATKAHUOLTO",
          "CPACKET",
          "POSTI",
          "HUNTER_EXPRESS",
          "CHOIR_EXP",
          "LEGION_EXPRESS",
          "AUSTRIAN_POST_EXPRESS",
          "GRUPO",
          "POSTA_RO",
          "INTERPARCEL_UK",
          "GLOBAL_ABF",
          "POSTEN_NORGE",
          "XPERT_DELIVERY",
          "DHL_REFR",
          "DHL_HK",
          "SKYNET_UAE",
          "GOJEK",
          "YODEL_INTNL",
          "JANCO",
          "YTO",
          "WISE_EXPRESS",
          "JTEXPRESS_VN",
          "FEDEX_INTL_MLSERV",
          "VAMOX",
          "AMS_GRP",
          "DHL_JP",
          "HRPARCEL",
          "GESWL",
          "BLUESTAR",
          "CDEK_TR",
          "DESCARTES",
          "DELTEC_UK",
          "DTDC_EXPRESS",
          "TOURLINE",
          "BH_WORLDWIDE",
          "OCS",
          "YINGNUO_LOGISTICS",
          "UPS",
          "TOLL",
          "PRT_SEUR",
          "DTDC_AU",
          "THA_DYNAMIC_LOGISTICS",
          "UBI_LOGISTICS",
          "FEDEX_CROSSBORDER",
          "A1POST",
          "TAZMANIAN_FREIGHT",
          "CJ_INT_MY",
          "SAIA_FREIGHT",
          "SG_QXPRESS",
          "NHANS_SOLUTIONS",
          "DPD_FR",
          "COORDINADORA",
          "ANDREANI",
          "DOORA",
          "INTERPARCEL_NZ",
          "PHL_JAMEXPRESS",
          "BEL_BELGIUM_POST",
          "US_APC",
          "IDN_POS",
          "FR_MONDIAL",
          "DE_DHL",
          "HK_RPX",
          "DHL_PIECEID",
          "VNPOST_EMS",
          "RRDONNELLEY",
          "DPD_DE",
          "DELCART_IN",
          "IMEXGLOBALSOLUTIONS",
          "ACOMMERCE",
          "EURODIS",
          "CANPAR",
          "GLS",
          "IND_ECOM",
          "ESP_ENVIALIA",
          "DHL_UK",
          "SMSA_EXPRESS",
          "TNT_FR",
          "DEX_I",
          "BUDBEE_WEBHOOK",
          "COPA_COURIER",
          "VNM_VIETNAM_POST",
          "DPD_HK",
          "TOLL_NZ",
          "ECHO",
          "FEDEX_FR",
          "BORDEREXPRESS",
          "MAILPLUS_JPN",
          "TNT_UK_REFR",
          "KEC",
          "DPD_RO",
          "TNT_JP",
          "TH_CJ",
          "EC_CN",
          "FASTWAY_UK",
          "FASTWAY_US",
          "GLS_DE",
          "GLS_ES",
          "GLS_FR",
          "MONDIAL_BE",
          "SGT_IT",
          "TNT_CN",
          "TNT_DE",
          "TNT_ES",
          "TNT_PL",
          "PARCELFORCE",
          "SWISS_POST",
          "TOLL_IPEC",
          "AIR_21",
          "AIRSPEED",
          "BERT",
          "BLUEDART",
          "COLLECTPLUS",
          "COURIERPLUS",
          "COURIER_POST",
          "DHL_GLOBAL_MAIL",
          "DPD_UK",
          "DELTEC_DE",
          "DEUTSCHE_DE",
          "DOTZOT",
          "ELTA_GR",
          "EMS_CN",
          "ECARGO",
          "ENSENDA",
          "FERCAM_IT",
          "FASTWAY_ZA",
          "FASTWAY_AU",
          "FIRST_LOGISITCS",
          "GEODIS",
          "GLOBEGISTICS",
          "GREYHOUND",
          "JETSHIP_MY",
          "LION_PARCEL",
          "AEROFLASH",
          "ONTRAC",
          "SAGAWA",
          "SIODEMKA",
          "STARTRACK",
          "TNT_AU",
          "TNT_IT",
          "TRANSMISSION",
          "YAMATO",
          "DHL_IT",
          "DHL_AT",
          "LOGISTICSWORLDWIDE_KR",
          "GLS_SPAIN",
          "AMAZON_UK_API",
          "DPD_FR_REFERENCE",
          "DHLPARCEL_UK",
          "MEGASAVE",
          "QUALITYPOST",
          "IDS_LOGISTICS",
          "JOYINGBOX",
          "PANTHER_ORDER_NUMBER",
          "WATKINS_SHEPARD",
          "FASTTRACK",
          "UP_EXPRESS",
          "ELOGISTICA",
          "ECOURIER",
          "CJ_PHILIPPINES",
          "SPEEDEX",
          "ORANGECONNEX",
          "TECOR",
          "SAEE",
          "GLS_ITALY_FTP",
          "DELIVERE",
          "YYCOM",
          "ADICIONAL_PT",
          "DKSH",
          "NIPPON_EXPRESS_FTP",
          "GOLS",
          "FUJEXP",
          "QTRACK",
          "OMLOGISTICS_API",
          "GDPHARM",
          "MISUMI_CN",
          "AIR_CANADA",
          "CITY56_WEBHOOK",
          "SAGAWA_API",
          "KEDAEX",
          "PGEON_API",
          "WEWORLDEXPRESS",
          "JT_LOGISTICS",
          "TRUSK",
          "VIAXPRESS",
          "DHL_SUPPLYCHAIN_ID",
          "ZUELLIGPHARMA_SFTP",
          "MEEST",
          "TOLL_PRIORITY",
          "MOTHERSHIP_API",
          "CAPITAL",
          "EUROPAKET_API",
          "HFD",
          "TOURLINE_REFERENCE",
          "GIO_ECOURIER",
          "CN_LOGISTICS",
          "PANDION",
          "BPOST_API",
          "PASSPORTSHIPPING",
          "PAKAJO",
          "DACHSER",
          "YUSEN_SFTP",
          "SHYPLITE",
          "XYY",
          "MWD",
          "FAXECARGO",
          "MAZET",
          "FIRST_LOGISTICS_API",
          "SPRINT_PACK",
          "HERMES_DE_FTP",
          "CONCISE",
          "KERRY_EXPRESS_TW_API",
          "EWE",
          "FASTDESPATCH",
          "ABCUSTOM_SFTP",
          "CHAZKI",
          "SHIPPIE",
          "GEODIS_API",
          "NAQEL_EXPRESS",
          "PAPA_WEBHOOK",
          "FORWARDAIR",
          "DIALOGO_LOGISTICA_API",
          "LALAMOVE_API",
          "TOMYDOOR",
          "KRONOS_WEBHOOK",
          "JTCARGO",
          "T_CAT",
          "CONCISE_WEBHOOK",
          "TELEPORT_WEBHOOK",
          "CUSTOMCO_API",
          "SPX_TH",
          "BOLLORE_LOGISTICS",
          "CLICKLINK_SFTP",
          "M3LOGISTICS",
          "VNPOST_API",
          "AXLEHIRE_FTP",
          "SHADOWFAX",
          "MYHERMES_UK_API",
          "DAIICHI",
          "MENSAJEROSURBANOS_API",
          "POLARSPEED",
          "IDEXPRESS_ID",
          "PAYO",
          "WHISTL_SFTP",
          "INTEX_DE",
          "TRANS2U",
          "PRODUCTCAREGROUP_SFTP",
          "BIGSMART",
          "EXPEDITORS_API_REF",
          "AITWORLDWIDE_API",
          "WORLDCOURIER",
          "QUIQUP",
          "AGEDISS_SFTP",
          "ANDREANI_API",
          "CRLEXPRESS",
          "SMARTCAT",
          "CROSSFLIGHT",
          "PROCARRIER",
          "DHL_REFERENCE_API",
          "SEINO_API",
          "WSPEXPRESS",
          "KRONOS",
          "TOTAL_EXPRESS_API",
          "PARCLL",
          "XPEDIGO",
          "STAR_TRACK_WEBHOOK",
          "GPOST",
          "UCS",
          "DMFGROUP",
          "COORDINADORA_API",
          "MARKEN",
          "NTL",
          "REDJEPAKKETJE",
          "ALLIED_EXPRESS_FTP",
          "MONDIALRELAY_ES",
          "NAEKO_FTP",
          "MHI",
          "SHIPPIFY",
          "MALCA_AMIT_API",
          "JTEXPRESS_SG_API",
          "DACHSER_WEB",
          "FLIGHTLG",
          "CAGO",
          "COM1EXPRESS",
          "TONAMI_FTP",
          "PACKFLEET",
          "PUROLATOR_INTERNATIONAL",
          "WINESHIPPING_WEBHOOK",
          "DHL_ES_SFTP",
          "PCHOME_API",
          "CESKAPOSTA_API",
          "GORUSH",
          "HOMERUNNER",
          "AMAZON_ORDER",
          "EFWNOW_API",
          "CBL_LOGISTICA_API",
          "NIMBUSPOST",
          "LOGWIN_LOGISTICS",
          "NOWLOG_API",
          "DPD_NL",
          "GODEPENDABLE",
          "ESDEX",
          "LOGISYSTEMS_SFTP",
          "EXPEDITORS",
          "SNTGLOBAL_API",
          "SHIPX",
          "QINTL_API",
          "PACKS",
          "POSTNL_INTERNATIONAL",
          "AMAZON_EMAIL_PUSH",
          "DHL_API",
          "SPX",
          "AXLEHIRE",
          "ICSCOURIER",
          "DIALOGO_LOGISTICA",
          "SHUNBANG_EXPRESS",
          "TCS_API",
          "SF_EXPRESS_CN",
          "PACKETA",
          "SIC_TELIWAY",
          "MONDIALRELAY_FR",
          "INTIME_FTP",
          "JD_EXPRESS",
          "FASTBOX",
          "PATHEON",
          "INDIA_POST",
          "TIPSA_REF",
          "ECOFREIGHT",
          "VOX",
          "DIRECTFREIGHT_AU_REF",
          "BESTTRANSPORT_SFTP",
          "AUSTRALIA_POST_API",
          "FRAGILEPAK_SFTP",
          "FLIPXP",
          "VALUE_WEBHOOK",
          "DAESHIN",
          "SHERPA",
          "MWD_API",
          "SMARTKARGO",
          "DNJ_EXPRESS",
          "GOPEOPLE",
          "MYSENDLE_API",
          "ARAMEX_API",
          "PIDGE",
          "THAIPARCELS",
          "PANTHER_REFERENCE_API",
          "POSTAPLUS",
          "BUFFALO",
          "U_ENVIOS",
          "ELITE_CO",
          "ROCHE_INTERNAL_SFTP",
          "DBSCHENKER_ICELAND",
          "TNT_FR_REFERENCE",
          "NEWGISTICSAPI",
          "GLOVO",
          "GWLOGIS_API",
          "SPREETAIL_API",
          "MOOVA",
          "PLYCONGROUP",
          "USPS_WEBHOOK",
          "REIMAGINEDELIVERY",
          "EDF_FTP",
          "DAO365",
          "BIOCAIR_FTP",
          "RANSA_WEBHOOK",
          "SHIPXPRES",
          "COURANT_PLUS_API",
          "SHIPA",
          "HOMELOGISTICS",
          "DX",
          "POSTE_ITALIANE_PACCOCELERE",
          "TOLL_WEBHOOK",
          "LCTBR_API",
          "DX_FREIGHT",
          "DHL_SFTP",
          "SHIPROCKET",
          "UBER_WEBHOOK",
          "STATOVERNIGHT",
          "BURD",
          "FASTSHIP",
          "IBVENTURE_WEBHOOK",
          "GATI_KWE_API",
          "CRYOPDP_FTP",
          "HUBBED",
          "TIPSA_API",
          "ARASKARGO",
          "THIJS_NL",
          "ATSHEALTHCARE_REFERENCE",
          "99MINUTOS",
          "HELLENIC_POST",
          "HSM_GLOBAL",
          "MNX",
          "NMTRANSFER",
          "LOGYSTO",
          "INDIA_POST_INT",
          "AMAZON_FBA_SWISHIP_IN",
          "SRT_TRANSPORT",
          "BOMI",
          "DELIVERR_SFTP",
          "HSDEXPRESS",
          "SIMPLETIRE_WEBHOOK",
          "HUNTER_EXPRESS_SFTP",
          "UPS_API",
          "WOOYOUNG_LOGISTICS_SFTP",
          "PHSE_API",
          "WISH_EMAIL_PUSH",
          "NORTHLINE",
          "MEDAFRICA",
          "DPD_AT_SFTP",
          "ANTERAJA",
          "DHL_GLOBAL_FORWARDING_API",
          "LBCEXPRESS_API",
          "SIMSGLOBAL",
          "CDLDELIVERS",
          "TYP",
          "TESTING_COURIER_WEBHOOK",
          "PANDAGO_API",
          "ROYAL_MAIL_FTP",
          "THUNDEREXPRESS",
          "SECRETLAB_WEBHOOK",
          "SETEL",
          "JD_WORLDWIDE",
          "DPD_RU_API",
          "ARGENTS_WEBHOOK",
          "POSTONE",
          "TUSKLOGISTICS",
          "RHENUS_UK_API",
          "TAQBIN_SG_API",
          "INNTRALOG_SFTP",
          "DAYROSS",
          "CORREOSEXPRESS_API",
          "INTERNATIONAL_SEUR_API",
          "YODEL_API",
          "HEROEXPRESS",
          "DHL_SUPPLYCHAIN_IN",
          "URGENT_CARGUS",
          "FRONTDOORCORP",
          "JTEXPRESS_PH",
          "PARCELSTARS_WEBHOOK",
          "DPD_SK_SFTP",
          "MOVIANTO",
          "OZEPARTS_SHIPPING",
          "KARGOMKOLAY",
          "TRUNKRS",
          "OMNIRPS_WEBHOOK",
          "CHILEXPRESS",
          "TESTING_COURIER",
          "JNE_API",
          "BJSHOMEDELIVERY_FTP",
          "DEXPRESS_WEBHOOK",
          "USPS_API",
          "TRANSVIRTUAL",
          "SOLISTICA_API",
          "CHIENVENTURE_WEBHOOK",
          "DPD_UK_SFTP",
          "INPOST_UK",
          "JAVIT",
          "ZTO_DOMESTIC",
          "DHL_GT_API",
          "CEVA_TRACKING",
          "KOMON_EXPRESS",
          "EASTWESTCOURIER_FTP",
          "DANNIAO",
          "SPECTRAN",
          "DELIVER_IT",
          "RELAISCOLIS",
          "GLS_SPAIN_API",
          "POSTPLUS",
          "AIRTERRA",
          "GIO_ECOURIER_API",
          "DPD_CH_SFTP",
          "FEDEX_API",
          "INTERSMARTTRANS",
          "HERMES_UK_SFTP",
          "EXELOT_FTP",
          "DHL_PA_API",
          "VIRTRANSPORT_SFTP",
          "WORLDNET",
          "INSTABOX_WEBHOOK",
          "KNG",
          "FLASHEXPRESS_WEBHOOK",
          "MAGYAR_POSTA_API",
          "WESHIP_API",
          "OHI_WEBHOOK",
          "MUDITA",
          "BLUEDART_API",
          "T_CAT_API",
          "ADS",
          "HERMES_IT",
          "FITZMARK_API",
          "POSTI_API",
          "SMSA_EXPRESS_WEBHOOK",
          "TAMERGROUP_WEBHOOK",
          "LIVRAPIDE",
          "NIPPON_EXPRESS",
          "BETTERTRUCKS",
          "FAN",
          "PB_USPSFLATS_FTP",
          "PARCELRIGHT",
          "ITHINKLOGISTICS",
          "KERRY_EXPRESS_TH_WEBHOOK",
          "ECOUTIER",
          "SHOWL",
          "BRT_IT_API",
          "RIXONHK_API",
          "DBSCHENKER_API",
          "ILYANGLOGIS",
          "MAIL_BOX_ETC",
          "WESHIP",
          "DHL_GLOBAL_MAIL_API",
          "ACTIVOS24_API",
          "ATSHEALTHCARE",
          "LUWJISTIK",
          "GW_WORLD",
          "FAIRSENDEN_API",
          "SERVIP_WEBHOOK",
          "SWISHIP",
          "TANET",
          "HOTSIN_CARGO",
          "DIREX",
          "HUANTONG",
          "IMILE_API",
          "AUEXPRESS",
          "NYTLOGISTICS",
          "DSV_REFERENCE",
          "NOVOFARMA_WEBHOOK",
          "AITWORLDWIDE_SFTP",
          "SHOPOLIVE",
          "FNF_ZA",
          "DHL_ECOMMERCE_GC",
          "FETCHR",
          "STARLINKS_API",
          "YYEXPRESS",
          "SERVIENTREGA",
          "HANJIN",
          "SPANISH_SEUR_FTP",
          "DX_B2B_CONNUM",
          "HELTHJEM_API",
          "INEXPOST",
          "A2B_BA",
          "RHENUS_GROUP",
          "SBERLOGISTICS_RU",
          "MALCA_AMIT",
          "PPL",
          "OSM_WORLDWIDE_SFTP",
          "ACILOGISTIX",
          "OPTIMACOURIER",
          "NOVA_POSHTA_API",
          "LOGGI",
          "YIFAN",
          "MYDYNALOGIC",
          "MORNINGLOBAL",
          "CONCISE_API",
          "FXTRAN",
          "DELIVERYOURPARCEL_ZA",
          "UPARCEL",
          "MOBI_BR",
          "LOGINEXT_WEBHOOK",
          "EMS",
          "SPEEDY",
          "ZOOM_RED",
          "NAVLUNGO",
          "CASTLEPARCELS",
          "WEEE",
          "PACKALY",
          "YUNHUIPOST",
          "YOUPARCEL",
          "LEMAN",
          "MOOVIN",
          "URB_IT",
          "MULTIENTREGAPANAMA",
          "JUSDASR",
          "DISCOUNTPOST",
          "RHENUS_UK",
          "SWISHIP_JP",
          "GLS_US",
          "SMTL",
          "EMEGA",
          "EXPRESSONE_SV",
          "HEPSIJET",
          "WELIVERY",
          "BRINGER",
          "EASYROUTES",
          "MRW",
          "RPM",
          "DPD_PRT",
          "GLS_ROMANIA",
          "LMPARCEL",
          "GTAGSM",
          "DOMINO",
          "ESHIPPER",
          "TRANSPAK",
          "XINDUS",
          "AOYUE",
          "EASYPARCEL",
          "EXPRESSONE",
          "SENDEO_KARGO",
          "SPEEDAF",
          "ETOWER",
          "GCX",
          "NINJAVAN_VN",
          "ALLEGRO",
          "JUMPPOINT",
          "SHIPGLOBAL_US",
          "KINISI",
          "OAKH",
          "AWEST",
          "BARSAN",
          "ENERGOLOGISTIC",
          "MADROOEX",
          "GOBOLT",
          "SWISS_UNIVERSAL_EXPRESS",
          "IORDIRECT",
          "XMSZM",
          "GLS_HUN",
          "SENDY",
          "BRAUNSEXPRESS",
          "GRANDSLAMEXPRESS",
          "XGS",
          "OTSCHILE",
          "PACK_UP",
          "PARCELSTARS",
          "TEAMEXPRESSLLC",
          "ASYADEXPRESS",
          "TDN",
          "EARLYBIRD",
          "CACESA",
          "PARCELJET",
          "MNG_KARGO",
          "SUPERPACKLINE",
          "SPEEDX",
          "VESYL",
          "SKYKING",
          "DIRMENSAJERIA",
          "NETLOGIXGROUP",
          "ZYOU",
          "JAWAR",
          "AGSYSTEMS",
          "GPS",
          "PTT_KARGO",
          "MAERGO",
          "ARIHANTCOURIER",
          "VTFE",
          "YUNANT",
          "URBIFY",
          "PACK_MAN",
          "LIEFERGRUN",
          "OBIBOX",
          "PAIKEDA",
          "SCOTTY",
          "INTELCOM_CA",
          "SWE",
          "ASENDIA",
          "DPD_AT",
          "RELAY",
          "ATA",
          "SKYEXPRESS_INTERNATIONAL",
          "SURAT_KARGO",
          "SGLINK",
          "FLEETOPTICSINC",
          "SHOPLINE",
          "PIGGYSHIP",
          "LOGOIX",
          "KOLAY_GELSIN",
          "ASSOCIATED_COURIERS",
          "UPS_CHECKER",
          "WINESHIPPING",
          "SPEDISCI",
          "FOURKITES",
          "ETONAS",
          "FINMILE",
          "UNIUNI",
          "RODONAVES",
          "INPOST_IT",
          "TFORCE_FREIGHT",
          "RICHMOM",
          "FRANCO",
          "ECPARCEL",
          "FEDEX_CHINA",
          "GOFO_EXPRESS",
          "SHIPBOB",
          "JERSEYPOST_ATLAS",
          "CORETRAILS",
          "RHENUS_ITALY",
          "JADLOG",
          "JITSU",
          "YANWEN_EXPRESS",
          "DASHLINK",
          "SEINO_SUPER_EXPRESS",
          "FLOSHIP",
          "METROSCG",
          "SENDPARCEL",
          "P2P",
          "CN_EXPRESS",
          "CIRROTRACK",
          "LAND_LOGISTICS",
          "VEHO",
          "MEDLINE",
          "VDTRACK",
          "SINO_SCM",
          "3PE_EXPRESS",
          "SWIFTX",
          "SFYDEXPRESS",
          "TOPTRANS",
          "OTHER"
        ]
      },
      "shipment_tracker": {
        "title": "tracker",
        "description": "The tracking information for a shipment.",
        "type": "object",
        "required": [
          "tracking_number",
          "carrier"
        ],
        "properties": {
          "tracking_number": {
            "description": "The tracking number for the shipment. This property supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[\\S\\s]*$"
          },
          "carrier": {
            "$ref": "#/components/schemas/shipment_carrier"
          },
          "carrier_name_other": {
            "description": "The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[\\S\\s]*$"
          }
        }
      },
      "order_tracker_request": {
        "title": "tracker_request",
        "description": "The tracking details of an order.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/shipment_tracker"
          },
          {
            "type": "object",
            "title": "tracker_request",
            "description": "The tracking details of an order.",
            "required": [
              "capture_id"
            ],
            "properties": {
              "capture_id": {
                "description": "The PayPal capture ID.",
                "type": "string",
                "minLength": 1,
                "maxLength": 50,
                "pattern": "^[a-zA-Z0-9]*$"
              },
              "notify_payer": {
                "description": "If true, PayPal will send an email notification to the payer of the PayPal transaction. The email contains the tracking details provided through the Orders tracking API request. Independent of any value passed for `notify_payer`, the payer may receive tracking notifications within the PayPal app, based on the user's notification preferences.",
                "type": "boolean",
                "default": false
              },
              "items": {
                "description": "An array of details of items in the shipment.",
                "type": "array",
                "minItems": 0,
                "maxItems": 32767,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/tracker_item"
                    },
                    {
                      "title": "tracker_item",
                      "description": "Items in a shipment."
                    }
                  ]
                }
              }
            }
          }
        ]
      },
      "order_update_callback_request": {
        "title": "OrderUpdateCallbackRequest",
        "description": "Shipping Options Callback request. This will be implemented by the merchants.",
        "type": "object",
        "required": [
          "purchase_units"
        ],
        "properties": {
          "id": {
            "description": "The ID of the order.",
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "pattern": "^[A-Z0-9-]+$",
            "readOnly": true
          },
          "shipping_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/address_portable"
              },
              {
                "description": "Redacted shipping address to be used for shipping options and tax calculations.",
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "address_line_1"
                      ]
                    },
                    {
                      "required": [
                        "address_line_2"
                      ]
                    },
                    {
                      "required": [
                        "address_line_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_3"
                      ]
                    },
                    {
                      "required": [
                        "admin_area_4"
                      ]
                    },
                    {
                      "required": [
                        "address_details"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          "shipping_option": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipping_option"
              },
              {
                "description": "Buyer selected shipping option.",
                "not": {
                  "required": [
                    "selected"
                  ]
                }
              }
            ]
          },
          "purchase_units": {
            "description": "An array of purchase units. At present only 1 purchase_unit is supported. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.",
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/purchase_unit_request"
                },
                {
                  "title": "purchase_unit"
                }
              ]
            }
          }
        }
      },
      "order_update_callback_response": {
        "title": "OrderUpdateCallbackResponse",
        "description": "Returns the updated shipping options for an order.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID of the order.",
            "type": "string",
            "minLength": 1,
            "maxLength": 36,
            "pattern": "^[A-Z0-9-]+$",
            "readOnly": true
          }
        }
      },
      "order_update_callback_error_response_details": {
        "title": "OrderUpdateCallbackErrorResponseDetails",
        "description": "The error details. Required for client-side `4XX` errors.",
        "type": "object",
        "required": [
          "issue"
        ],
        "properties": {
          "field": {
            "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors.",
            "type": "string",
            "minLength": 0,
            "maxLength": 256,
            "pattern": "^.*$"
          },
          "value": {
            "description": "The value of the field that caused the error.",
            "type": "string",
            "minLength": 0,
            "maxLength": 1024,
            "pattern": "^.*$"
          },
          "issue": {
            "description": "The unique, fine-grained application-level error code.",
            "type": "string",
            "minLength": 0,
            "maxLength": 256,
            "pattern": "^.*$"
          }
        }
      },
      "order_update_callback_error_response": {
        "title": "OrderUpdateCallbackErrorResponse",
        "description": "The error details.",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "The human-readable, unique name of the error.",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^.*$"
          },
          "message": {
            "description": "The message that describes the error.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "pattern": "^.*$"
          },
          "details": {
            "description": "An array of additional details about the error.",
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/order_update_callback_error_response_details"
            }
          }
        }
      }
    },
    "responses": {
      "default_response": {
        "description": "Default response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "generic": {
                "summary": "Default response.",
                "description": "Example catch all response, should not be encountered in practice.",
                "value": {
                  "name": "INTERNAL_SERVER_ERROR",
                  "debug_id": "b1d1f06c7246c",
                  "message": "An internal server error has occurred."
                }
              }
            }
          }
        }
      },
      "401_error_response": {
        "description": "Unauthorized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "generic": {
                "summary": "Generic 'Unauthorized' error.",
                "description": "Example response for unauthorized request.",
                "value": {
                  "name": "AUTHENTICATION_FAILURE",
                  "debug_id": "b1d1f06c7246c",
                  "message": "Authentication failed due to missing Authorization header, or invalid authentication credentials."
                }
              }
            }
          }
        }
      },
      "403_error_response": {
        "description": "Forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "generic": {
                "summary": "Generic 'Forbidden' error.",
                "description": "Example response for a forbidden request.",
                "value": {
                  "name": "NOT_AUTHORIZED",
                  "debug_id": "b1d1f06c7246c",
                  "message": "Authorization failed due to insufficient permissions."
                }
              }
            }
          }
        }
      },
      "500_error_response": {
        "description": "Internal Server Error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "generic": {
                "summary": "Generic internal server error.",
                "description": "Example response for a request that fails for reasons internal to the server.",
                "value": {
                  "name": "INTERNAL_SERVER_ERROR",
                  "debug_id": "b1d1f06c7246c",
                  "message": "An internal server error has occurred."
                }
              }
            }
          }
        }
      },
      "404_error_response": {
        "description": "Not Found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "generic": {
                "summary": "Generic 'Not Found' error.",
                "description": "Example response for a request to a resource that does not exist.",
                "value": {
                  "name": "RESOURCE_NOT_FOUND",
                  "debug_id": "b1d1f06c7246c",
                  "message": "The specified resource does not exist."
                }
              }
            }
          }
        }
      },
      "204_response": {
        "description": "No Content."
      }
    }
  }
}