curl --location --request POST 'https://api.malga.io/v1/charges/<CHARGE_ID>/void' \
--header 'X-Client-Id: <YOUR_CLIENT_ID>' \
--header 'X-Api-Key: <YOUR_SECRET_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 100,
"delayToCompose": 100
}'
< HTTP/2 201
{
"id": "4cbF2516-b8c0-4222-a28d-2c7e22a9ebe1",
"clientId": "11111111-36dc-4654-9dba-e7167d0e5e2d",
"merchantId": "7cCf07e8-9798-4bf6-a97e-7f0e0822c176",
"description": null,
"orderId": "8222",
"createdAt": "2022-09-30T21:33:42.955Z",
"amount": 100,
"originalAmount": 100,
"currency": "BRL",
"statementDescriptor": null,
"status": "refund_pending",
"paymentMethod": {
"paymentType": "picpay"
"qrCodeData": "00020101021226860014COM.PICPAY.P2B0164https://app.picpay.com/checkout/NjY4YmZhNjA5OTdhNTU2YTNmMGRmZTIy5204000053039865802BR5906PICPAY6009SAO PAULO62280524668bfa60997a556a3f0dfe2280580020COM.PICPAY.ECOMMERCE0107nc=true0219checkout=stepbystep6304B9EE",
"qrCodeImageUrl": "https://...."
"expiresIn": 1722971550
},
"paymentSource": {
"sourceType": "customer",
"customerId": "ae1b1f52-ee01-4014-9eb6-e529dd6d3f5f"
},
"transactionRequests": [
{
"id": "1c57caad-136d-4bc4-a265-c72d408d5ef7",
"createdAt": "2022-09-30T21:33:42.969Z",
"updatedAt": "2022-09-30T21:33:44.105Z",
"idempotencyKey": "84d0ed42-0239-4618-b3b9-e31114bba17b",
"providerId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"providerType": "PICPAY",
"transactionId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"amount": 100,
"authorizationCode": null,
"authorizationNsu": null,
"requestStatus": "processing",
"requestType": "void",
"responseTs": "1123ms"
},
{
"id": "1c57caad-136d-4bc4-a265-c72d408d5ef7",
"createdAt": "2022-09-30T21:33:42.969Z",
"updatedAt": "2022-09-30T21:33:44.105Z",
"idempotencyKey": "84d0ed42-0239-4618-b3b9-e31114bba17b",
"providerId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"providerType": "PICPAY",
"transactionId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"amount": 100,
"authorizationCode": null,
"authorizationNsu": null,
"requestStatus": "success",
"requestType": "authorization",
"responseTs": null
},
{
"id": "1c57caad-136d-4bc4-a265-c72d408d5ef7",
"createdAt": "2022-09-30T21:33:42.969Z",
"updatedAt": "2022-09-30T21:33:44.105Z",
"idempotencyKey": "84d0ed42-0239-4618-b3b9-e31114bba17b",
"providerId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"providerType": "PICPAY",
"transactionId": "72cecc64-2079-4128-8cb0-c5a4ed8fa995",
"amount": 100,
"authorizationCode": null,
"authorizationNsu": null,
"requestStatus": "success",
"requestType": "pending",
"responseTs": "1084ms"
}
]
}