# Token request Request to create token Endpoint: POST /token Version: 1.2 Security: X-Api-Key ## Request fields (application/json): - `payment_method` (string, required) Enum: "CARD" - `merchant_payment_id` (string) Optional field, might be used as a reference from the merchant side - `merchant_customer_id` (string, required) - `email` (string, required) - `language` (string, required) - `country_code` (string, required) Country Code (ISO 3166-2) - `success_url` (string, required) - `failure_url` (string, required) - `prefilled_card_holder` (string) Card holder name to show on payment form ## Response 200 fields (application/json): - `type` (string, required) Enum: "PAYMENT" - `data` (object, required) - `data.payment_id` (string, required) - `data.payment_type` (string, required) Enum: "TOKEN" - `data.payment_method` (string, required) Enum: "CARD" - `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.language` (string) - `data.country_code` (string, required) Country Code (ISO 3166-2) - `data.success_url` (string, required) - `data.failure_url` (string, required) - `data.prefilled_card_holder` (string) Card holder name to show on payment form - `data.shop_name` (string) Shop name - `data.shop_url` (string) Shop URL with protocol HTTP or HTTPS - `data.session` (object, required) - `data.session.expires_at` (string, required) UTC date time format - `data.session.redirect_url` (string, required) ## 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)