API Reference (1.0)
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.
Download OpenAPI description
Overview
Languages
Servers
v1
https://api.zrupay.com/v1/
- v1
https://api.zrupay.com/v1/plan/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.zrupay.com/v1/plan/ \
-H 'Authorization: YOUR_API_KEY_HERE'
Response
application/json
{ "count": 0, "items_per_page": 0, "next": "string", "previous": "string", "results": [ { … } ] }
Bodyapplication/json
Unidad de tiempo de la duración (opciones: D - Día, M - Mes, Y - Año)
Enum"D""M""Y"
- v1
https://api.zrupay.com/v1/plan/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.zrupay.com/v1/plan/ \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "NAME",
"price": 20,
"duration": 2,
"unit": "M",
"plan_id": "MERCHANT_PLAN_ID",
"description": "DESCRIPTION",
"total_payments": 2,
"extra": {
"MERCHANT_KEY": "MERCHANT_VALUE"
}
}'
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_unit": "string", "plan_id": "string", "name": "string", "price": 0.1, "description": "string", "duration": 0, "unit": "D", "recurring": true }
- v1
https://api.zrupay.com/v1/plan/{plan-id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.zrupay.com/v1/plan/{plan-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE'
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_unit": "string", "plan_id": "string", "name": "string", "price": 0.1, "description": "string", "duration": 0, "unit": "D", "recurring": true }
- v1
https://api.zrupay.com/v1/plan/{plan-id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://api.zrupay.com/v1/plan/{plan-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"price": 150
}'
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "display_unit": "string", "plan_id": "string", "name": "string", "price": 0.1, "description": "string", "duration": 0, "unit": "D", "recurring": true }
- v1
https://api.zrupay.com/v1/plan/{plan-id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.zrupay.com/v1/plan/{plan-id}/' \
-H 'Authorization: YOUR_API_KEY_HERE'