El API de ZRU utiliza métodos HTTP y una estructura RESTful de endpoint.
- La autenticación del API se realiza vía Header Authorization.
- Todas las peticiones se deben realizar en formato JSON, y las respuestas del API son en dicho formato.
El API de ZRU utiliza métodos HTTP y una estructura RESTful de endpoint.
curl -i -X GET \
https://api.zrupay.com/v1/sale/ \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "count": 0, "items_per_page": 0, "next": "string", "previous": "string", "results": [ { … } ] }
curl -i -X GET \
'https://api.zrupay.com/v1/sale/{sale-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482", "amount": 0.1, "amount_capture": 0.1, "hold": true, "partial_hold": true, "hold_amount": 0.1, "refund": true, "partial_refund": true, "refund_amount": 0.1, "payment_masked": "string", "created_date": "2019-08-24", "source": [ { … } ], "destination": [ { … } ] }
curl -i -X POST \
'https://api.zrupay.com/v1/sale/{sale-id}/capture/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'
{ "success": true, "response": "string" }
curl -i -X POST \
'https://api.zrupay.com/v1/sale/{sale-id}/refund/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'
{ "success": true, "response": "string" }
curl -i -X POST \
'https://api.zrupay.com/v1/sale/{sale-id}/void/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'
{ "success": true, "response": "string" }