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
customer object
billing_address object
- 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": 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."
}
]
}
}
POST /api/v1/session/
Request
Request
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'
curl -L -X POST 'https://checkout.dineropay.com/v1/session/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": " xxxxx-xxxxx-xxxxx",
"operation": "purchase",
"methods": [
"[stcpay ,visa]"
],
"sucess_url": "string",
"cancel_url": "string",
"url_target": "string",
"req_token": true,
"card_token": "[f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97]",
"recurring_init": true,
"schedule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hash": "string",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
},
"customer": {
"name": "string",
"email": "user@example.com"
},
"billing_address": {
"country": "SA",
"state": "string",
"address": "string",
"city": "string",
"house_number": "string",
"zip": "string",
"phone": "+966 xxxxxxxxx"
}
}'