How to use the API to create a charge with Woovi Parcelado?
In order to use this functionality, it is necessary to have the Woovi Installment functionality. Request access via chat through the platform link.
To create a Pix charge with Woovi Parcelado, you use the endpoint /api/v1/charge of the API.
You can access here documentation for that endpoint.
The mandatory fields to create a Pix charge with Woovi Parcelado are the following:
value: The value in cents of the Pix charge to be created.correlationID: A unique identifier for the Pix charge. CorrelationIDtype: The type of charge must be PIX_CREDITcustomer: It is mandatory that a customer be passed with: name, cpf/cnpj, email, telephone and full address
Example
The body of your request will look like this example:
{
"correlationID": "63c533c0-3bb2-4847-a568-e2270e99aad8",
"value": 1500,
"comment": "Woovi Parcelado",
"type": "PIX_CREDIT",
"customer": {
"name": "Dan",
"taxID": "12345678900",
"phone": "+5519912345678",
"email": "[email protected]",
"address": {
"zipcode": "13142514",
"street": "Woovi Street",
"number": "2019",
"neighborhood": "Home",
"city": "Sao Paulo",
"state": "SP",
"complement": "Brooklyn"
}
}
}
After making the request, if everything went well, the status code of the request will be 2xx and in the body of the response, in addition to the normal charge fields created, with status ACTIVE_WAITING_PAYMENT_METHOD.
Rendering the charge
For the flow to work completely after creating the charge with Woovi Parcelado, it must be rendered using the same payment link or our Plugin Js.
Rendering Billing - Payment Link
Rendering your Woovi Parcelado charge with the payment link is the simplest way to complete the flow. Just take the paymentLinkUrl field and open it in a new browser tab.