Authentication request to create a payment session
Authentication request to create a payment session
- application/json
Request Body required
- merchant_key uuid required
Key for Merchant identification
- operation string required
Possible values: [
purchase
]Defines a payment transaction
- methods string[]
An array of payment methods. Limits the available methods on the Checkout page (the list of the possible values in the Payment methods section). In the case of parameter absence, the pre-routing rules are applied. If pre-routing rules are not configured, all available payment methods are displayed
- sucess_url url required
Possible values:
<= 1024 characters
URL to redirect the Customer in case of the successful payment
- cancel_url url
URL to return Customer in case of a payment cancellation (“Close” button on the Checkout page)
- url_target string
Name of, or keyword for a browsing context where Customer should be returned according to HTML specification
- req_token boolean
Special attribute pointing for further tokenization If the
card_token
is specified,req_token
will be ignored - card_token string[]
Credit card token value
- recurring_init boolean
Initialization of the transaction with possible following recurring
- schedule_id uuid
Schedule ID for recurring payments it s available when
recurring_init = true
- hash string required
Special signature to validate your request to Payment Platform Addition in Signature section Must be SHA1 of MD5 encoded string
order object
Information about an order
number string requiredOrder ID
amount float requiredPossible values:
<= 255 characters
Pay attention that amount will be exponent so if you pass
1 it will be 1.00
currency ISO 4217 requiredPossible values:
<= 3 characters
Currency code in the ISO 4217 standard (e.g. 'SAR').
description string requiredProduct name
customer object
Customer's information. Send an object if a payment method needs
name Latin basic [a-z A-Z]Customer's name Condition: If the parameter is NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs) - the "Cardholder" field
email emailPossible values:
<= 254 characters
Customer's email address Condition: If the parameter is NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs) - the "E-mail" field
billing_address object
Billing address information Condition: If the object or some object's parameters are NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs)
country ISO 3166-1 alpha-2Possible values:
<= 2 characters
Country code in the ISO 3166-1 alpha-2 format (e.g. 'SA')
state ISO 3166-1 alpha-2Billing state address
address stringPossible values:
>= 2
and<= 32
Billing address
city stringPossible values:
>= 2
and<= 32
Billing city
house_number stringPossible values:
>= 1
and<= 9
house number
zip stringPossible values:
>= 2
and<= 10
Billing zip code
phone phonePossible values:
<= 32 characters
Phone number in the
<country_code> <number>
format
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
Schema
- redirect_url string
{
"redirect_url": "string"
}
Invalid data submitted or request processing error
- application/json
- Schema
- Example (from schema)
Schema
- error_code integer
- error_message string
what cause the error
errors object[]
error_code integererror_message stringwhat cause the error
{
"error_code": 0,
"error_message": "string",
"errors": {
"error_code": 0,
"error_message": "Request data is invalid",
"errors": [
{
"error_code": 100000,
"error_message": "operation: The value you selected is not a valid choice."
},
{
"error_code": 100000,
"error_message": "order.amount: This value should be greater than 0."
},
{
"error_code": 100000,
"error_message": "cancel_url: This value is not a valid URL."
},
{
"error_code": 100000,
"error_message": "hash: Hash is not valid."
}
]
}
}