# Recurring transaction Endpoint: POST /recurring 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_method` (string, required) - `merchant_payment_id` (string) Optional field, might be used as a reference from the merchant side - `merchant_customer_id` (string, required) - `email` (string, required) - `amount` (string, required) can't be zero for SALE | MIT_SALE - `language` (string) required only for SALE | AUTHORIZE | RECURRING - `country_code` (string, required) Country Code (ISO 3166-2) - `currency_code` (string, required) Currency code (ISO 4217) - `forced_3d` (boolean) If needs to initiate 3d secure from merchant side. - `success_url` (string) required only for SALE | AUTHORIZE | RECURRING - `failure_url` (string) required only for SALE | AUTHORIZE | RECURRING - `shop_name` (string) Shop name - `shop_url` (string) Shop URL with protocol HTTP or HTTPS - `products` (array, required) Expected at least 1 product - `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. ## Response 200 fields (application/json): - `type` (string, required) Enum: "PAYMENT" - `data` (object, required) - `data.payment_id` (string, required) - `data.initial_subscription_id` (string) - `data.payment_type` (string, required) Enum: "SALE", "AUTHORIZE", "MIT_SALE", "MIT_AUTHORIZE", "RECURRING" - `data.payment_method` (string, required) - `data.created_at` (string, required) UTC date time format Example: "2020-20-20T20:00:00.633Z" - `data.merchant_id` (string, required) - `data.merchant_payment_id` (string) - `data.merchant_customer_id` (string, required) - `data.email` (string, required) - `data.amount` (string, required) - `data.language` (string) - `data.country_code` (string, required) Country Code (ISO 3166-2) - `data.currency_code` (string, required) Currency code (ISO 4217) - `data.base_amount` (string) - `data.base_currency_code` (string) Currency code (ISO 4217) - `data.transaction_amount` (string) - `data.transaction_currency_code` (string) Currency code (ISO 4217) - `data.transaction_fee_amount` (string) - `data.transaction_fee_currency_code` (string) Currency code (ISO 4217) - `data.transaction_tax_amount` (string) - `data.transaction_tax_currency_code` (string) Currency code (ISO 4217) - `data.transaction_tax_percentage` (string) - `data.transaction_tax_type` (string) Enum: "INCLUDED", "ON_TOP" - `data.transaction_tax_label` (string) Enum: "TAX", "VAT", "GST", "SALES_TAX" - `data.forced_3d` (boolean) If needs to initiate 3d secure from merchant side - `data.success_url` (string) required only for SALE | AUTHORIZE | RECURRING - `data.failure_url` (string) required only for SALE | AUTHORIZE | RECURRING - `data.payment_token_id` (string) Token from original payment. Used for MIT_SALE | MIT_AUTHORIZE - `data.shop_name` (string) Shop name - `data.shop_url` (string) Shop URL with protocol HTTP or HTTPS - `data.session` (object) - `data.session.expires_at` (string, required) UTC date time format - `data.session.redirect_url` (string, required) - `data.products` (array, required) Expected at least 1 product ## 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)