# Sale request This endpoint allows the creation of a single, one-time payment. Upon successful completion, the system will return a payment token in the callback response. This token can later be used to initiate subsequent Merchant-Initiated Transactions (MIT) or Customer-Initiated Transactions (CIT) associated with the original payment. Endpoint: POST /checkout Version: 1.2 Security: X-Api-Key ## Header parameters: - `X-Idempotency-Key` (string) The system supports the query deduplication mechanism. Any system-wide merchant's request after the first one with the same X-Idempotency-Key will return an error. For example, if you have retrying mechanism for payouts and you want to avoid double sending, you can put header with value payout_{your_payout_id} ## Request fields (application/json): - `payment_data` (any, required) - `customer` (object, required) - `customer.merchant_customer_id` (string, required) - `customer.email` (string) - `customer.language` (string) - `customer.country_code` (string) Country Code (ISO 3166-2) - `callback` (object, required) Specifies the URLs to which the customer will be redirected after completing a payment transaction. The success_url is used for redirection upon successful payment, and the failure_url is used in case of payment failure. - `callback.success_url` (string, required) - `callback.failure_url` (string, required) - `products` (array, required) - `products.merchant_product_id` (string) - `products.type` (string, required) Enum: "SALE" - `products.price` (number, required) - `products.name` (string, required) - `products.description` (string) - `additional_info` (object) - `additional_info.payment_token_id` (string) - `additional_info.crypto_network` (string) - `additional_info.crypto_address` (string) - `additional_info.crypto_withdrawal_address` (string) - `additional_info.customer_full_name` (string) - `additional_info.phone` (string) - `payment_form_override` (object) [Customizing Payment Form Appearance.](/openapi/override-theme/customizing-payment-form-appearance) All these parameters will override existing configuration in Upgate back office if any - `payment_form_override.color` (string) [Override the color](/openapi/override-theme/customizing-payment-form-appearance) for the payment form. - `payment_form_override.theme_type` (string) [Override the theme](/openapi/override-theme/themes) for the payment form. Enum: "LIGHT", "DARK", "BROWSER" - `payment_form_override.theme_variables` (object) [Override CSS variables](/openapi/override-theme/variables) for the payment form. - `payment_form_override.theme_rules` (object) [Override CSS rules](/openapi/override-theme/rules) for the payment form. - `tax_override` (object) All these parameters will override existing Tax Rules configuration in Upgate back office - `tax_override.percentage` (string) Override Tax percentage - `tax_override.type` (string) Override Tax type Enum: "INCLUDED", "ON_TOP" - `tax_override.label` (string) Override Tax label Enum: "TAX", "VAT", "GST", "SALES_TAX" ## Response 200 fields (application/json): - `id` (string, required) - `created_at` (string, required) - `merchant_id` (string, required) - `session` (object, required) - `session.created_at` (string, required) UTC date time format - `session.expires_at` (string, required) UTC date time format - `session.redirect_url` (string, required) - `payment_data` (any, required) - `customer` (object, required) - `customer.merchant_customer_id` (string, required) - `customer.email` (string) - `customer.language` (string) - `customer.country_code` (string) Country Code (ISO 3166-2) - `callback` (object, required) Specifies the URLs to which the customer will be redirected after completing a payment transaction. The success_url is used for redirection upon successful payment, and the failure_url is used in case of payment failure. - `callback.success_url` (string, required) - `callback.failure_url` (string, required) - `products` (array, required) - `products.merchant_product_id` (string) - `products.type` (string, required) Enum: "SALE" - `products.price` (number, required) - `products.name` (string, required) - `products.description` (string) - `additional_info` (object) - `additional_info.payment_token_id` (string) - `additional_info.crypto_network` (string) - `additional_info.crypto_address` (string) - `additional_info.crypto_withdrawal_address` (string) - `additional_info.customer_full_name` (string) - `additional_info.phone` (string) - `payment_form_override` (object) [Customizing Payment Form Appearance.](/openapi/override-theme/customizing-payment-form-appearance) All these parameters will override existing configuration in Upgate back office if any - `payment_form_override.color` (string) [Override the color](/openapi/override-theme/customizing-payment-form-appearance) for the payment form. - `payment_form_override.theme_type` (string) [Override the theme](/openapi/override-theme/themes) for the payment form. Enum: "LIGHT", "DARK", "BROWSER" - `payment_form_override.theme_variables` (object) [Override CSS variables](/openapi/override-theme/variables) for the payment form. - `payment_form_override.theme_rules` (object) [Override CSS rules](/openapi/override-theme/rules) for the payment form. - `tax_override` (object) All these parameters will override existing Tax Rules configuration in Upgate back office - `tax_override.percentage` (string) Override Tax percentage - `tax_override.type` (string) Override Tax type Enum: "INCLUDED", "ON_TOP" - `tax_override.label` (string) Override Tax label Enum: "TAX", "VAT", "GST", "SALES_TAX" ## Response 400 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required) ## Response 401 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required) ## Response 429 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required) ## Response 500 fields (application/json): - `errors` (array) - `errors.error_code` (string, required) Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND" - `errors.error_message` (string, required)