curl --location --request POST 'https://api.malga.io/v1/charges' \
--header 'X-Client-Id: <YOUR_CLIENT_ID>' \
--header 'X-Api-Key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "d749c775-5c61-448e-9ed4-36b67d085301",
"amount": 100,
"currency": "BRL",
"orderId": "98848683521",
"paymentMethod": {
"paymentType": "drip",
"maxInstallments": 12,
"totalInstallments": 6,
"firstInstallmentsDate": "2023-08-01",
"items": [
{
"id": "123",
"quantity": 1,
"title": "item title",
"unitPrice": 100
}
],
"browser": {
"ipAddress": "127.0.0.1",
"browserFingerprint": "074c1ee676ed4998ab66491013c565e2"
},
"successRedirectUrl": "http://your-service.com/success",
"cancelRedirectUrl": "http://your-service.com/cancel"
},
"paymentSource": {
"sourceType": "customer",
"customer": {
"name": "Nome do Comprador",
"phoneNumber": "xx999999999",
"email": "email@docomprador.com",
"document": {
"number": "11111111111",
"type": "cpf"
},
"address": {
"street": "Rua do Comprador",
"streetNumber": "1",
"zipCode": "00000-140",
"country": "BR",
"state": "RJ",
"district": "Bairro",
"city": "Cidade",
"complement": "complemento"
}
}
}
}'
< HTTP/2 201
{
"id": "c1248092-1769-4b93-9b1d-fabcec356c6c",
"clientId": "<YOUR_CLIENT_ID>",
"merchantId": "d749c775-5c61-448e-9ed4-36b67d085301",
"description": null,
"orderId": "98848683521",
"createdAt": "2023-07-18T23:03:53.035Z",
"amount": 100,
"originalAmount": 100,
"currency": "BRL",
"statementDescriptor": null,
"capture": false,
"isDispute": false,
"status": "pending",
"paymentMethod": {
"paymentType": "drip",
"paymentUrl": "https://sandbox-portal.dripapp.com.br/checkouts/0f6aa94e-8593-4662-bddd-7bfce2d4c935",
"items": [
{
"id": "123",
"quantity": 1,
"title": "item title",
"unitPrice": 100
}
],
"browser": {
"ipAddress": "127.0.0.1",
"browserFingerprint": "074c1ee676ed4998ab66491013c565e2"
},
"successRedirectUrl": "http://your-service.com/success",
"cancelRedirectUrl": "http://your-service.com/cancel"
},
"paymentSource": {
"sourceType": "customer",
"customerId": "4362a975-9cc7-418f-918b-8ee9585f604e"
},
"transactionRequests": [
{
"id": "449043d9-dc7c-4456-bf58-d8d9a53f15bf",
"createdAt": "2023-07-18T23:03:53.048Z",
"updatedAt": "2023-07-18T23:03:55.501Z",
"idempotencyKey": "9baef27a-9897-4541-9d84-d61b65ffe6fe",
"providerId": "769bce00-678e-4d64-9617-9ce82f4dfcbf",
"providerType": "DRIP",
"transactionId": "9baef27a-9897-4541-9d84-d61b65ffe6fe",
"amount": 100,
"authorizationCode": "f03a3928-460e-42b3-8ece-76cdfdcb5924",
"authorizationNsu": null,
"requestStatus": "success",
"requestType": "pending",
"responseTs": "2436ms",
"drip": {
"paymentUrl": "https://sandbox-portal.dripapp.com.br/checkouts/0f6aa94e-8593-4662-bddd-7bfce2d4c935",
"items": [
{
"id": "123",
"quantity": 1,
"title": "item title",
"unitPrice": 100
}
],
"browser": {
"ipAddress": "127.0.0.1",
"browserFingerprint": "074c1ee676ed4998ab66491013c565e2"
},
"successRedirectUrl": "http://your-service.com/success",
"cancelRedirectUrl": "http://your-service.com/cancel"
}
}
]
}