In this section, we provide essential tools for merchants to make charge requests via API and manage scheduled charges for their subscriptions. By interacting with this interface, you can customize the processing date and specify the details of the charges to be executed.

<aside> ⚠️ Important Note

Keep in mind that the input date for the charge must be scheduled at least 1 to 7 natural days in advance of the execution date, where the scheduled date should be a business day.

Example: If we want to schedule a charge for March 15th, we should enter the charge between the dates of March 8th - 14th.

</aside>

GET


You must make a request to the following endpoint:

{API_PLATFORM_URL}/v1/direct-debit/generate/charges

Headers


In the Header, it is necessary to declare the information obtained during the Login process.

{
    "Authorization": "eyJraWQiOiJNc2ZqVEZYSDdPV1d1emp3U3daaGlaZWZyNW9rVlVPeWpocVwvMzNNU2J6az0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjOGJiZDRhMi0xYjgwLTRmOWYtOWM2My1h..."
}

Body


Within the body section of the response, you will find detailed information about the domiciliation operation. The interface provides essential data, such as the processing date and the scheduled charges.

Below is a structured example:

Body interface:
{
    "process_date": string, // --> format 2024-03-07 
    "scheduled_charges": array[] [
        {
            "subscriptionId": strint,
            "amount": number
        }
    ]
}

Example: 
{
    "process_date": "2024-03-05", // --> If the date does not have this format, it will result in an error.
    "scheduled_charges": [
        {
            "subscriptionId": "lAWLK1YN9W[...]fyg5mr90FbW5akUnv",
            "amount": "2.87" //---> Error due to data type "string" typo
        },
        {
            "subscriptionId": "", //---> Error due to lack of information
            "amount": 5
        },
        {
            "subscriptionId": "0mFeVDxXY[...]1ahEWuwDgg0X4x3JZHTiFg2XwE" // ---> Error due to lack of information
        },
        {
            "subscriptionId": "btYfKQD[...]fYsED4eytqcUSyw9GinWTQP1z",
            "amount": 1.20
        },
        {
            "subscriptionId": "7LI5pDfB0X[...]NvFNrpZIoojU6TZ3WW8NuLf", 
            "amount": 5
        },
        {
            "subscriptionId": "7LI5pDfB0X[...]NvFNrpZIoojU6TZ3WW8NuLf", // ---> Error due to repeated value
            "amount": 5
        },
    ]
}

This format provides you with a clear view of the processing date and the details of the scheduled charges, allowing you to easily understand the results of the domiciliation operation.