Charge a transaction using a saved token
Charge a transaction using a saved token
- application/json
Request Body
- recurring_init_trans_id uuid required
Transaction ID of the primary transaction in the Payment Platform
- recurring_token string required
Recurring token
- 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
Responses
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
- Success
- Rejected
Schema
- status string
Possible values: [
settled
,pending
,declined
]Payment status
- payment_id uuid
Transaction ID (public)
- reason string
Decline reason translation for unsuccessful payment. It displays only if the transaction is unsuccessful
- date ISO 8601
Transaction date
- schedule_id uuid
Schedule ID for recurring payments
order object
{
"status": "settled",
"payment_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"reason": "The operation was rejected. Please contact the site support",
"date": "2020-08-05",
"schedule_id": "57fddecf-17b9-4d38-9320-a670f0c29ec0",
"order": {
"number": "string",
"amount": 22,
"currency": "string",
"description": "gift"
}
}
Recurring (settled)
{
"status": "settled",
"payment_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"date": "2020-08-05 07:41:10",
"order": {
"number": "order-1234",
"amount": "1.00",
"currency": "SAR",
"description": "gift"
}
}
Recurring (declined)
{
"status": "declined",
"reason": "declined by processing",
"payment_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"date": "2020-08-05 07:41:10",
"order": {
"number": "order-1234",
"amount": "1.00",
"currency": "SAR",
"description": "gift"
}
}
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/payment/reсurring
Request
Request
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'
curl -L -X POST 'https://checkout.dineropay.com/api/v1/payment/reсurring' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"order": {
"number": "order-1234",
"amount": "1.00",
"description": "gift"
},
"recurring_init_trans_id": "dc66cdd8-d702-11ea-9a2f-0242c0a87002",
"recurring_token": "9a2f-0242c0a87002",
"hash": "{{session_hash}}"
}'