Charge requests via API are made through HTTP request type POST and the body of the request must be in JSON format. To make use of the API the merchant must have its merchant_code and merchant_api_token.
{
"contract_date": "DD-MM-AAAA",
"charges": [
{
"id": "{{RUT without dots or dashes}}",
"merchant_order_id": "{merchantOrderID}",
"amount": "{{amount (integer) }}",
"description": "{{description of maximum 30 characters}}"
},
...
]
}
{
"msg": "Success processing charges",
"valid": {{number of valid charges processed}},
"invalid": {{number of invalid charges rejected}},
"duplicates": {{number of duplicate charges rejected}},
"rejected": [ //detail of rejected charges
{
"id": "{{User RUT}}",
"amount": "{{amount}}",
"merchant_order_id": "{{merchant order id}}",
"desc": "{{description}}",
"code": "{{refusal code}}"
}
],
"error": null
}
Date of contract date | Process call before: |
---|---|
Monday | Thursday 12:50 |
Tuesday | Friday 12:50 |
Wednesday | Monday 12:50 |
Thursday | Tuesday 12:50 |
Friday | Wednesday 12:50 |
Saturday | Thursday 12:50 |
Sunday | Thursday 12:50 |
URL: {{API_URL}}/dd/charges/read/api.