Ao criar uma transação, você pode passar uma URL para receber eventos em seu servidor quando uma transação for atualizada, através do campo postbackUrl. O formato do payload que você receberá nessa URL segue o formato abaixo:
Transação
{
"id": 686401,
"type": "transaction",
"objectId": "282",
"url": "https://test.com",
"data": {
"id": 282,
"amount": 10000,
"refundedAmount": 0,
"companyId": 2,
"installments": 12,
"paymentMethod": "credit_card",
"status": "paid",
"postbackUrl": null,
"metadata": null,
"traceable": false,
"secureId": "a4594817-be48-4a23-81aa-4bb01f95fe78",
"secureUrl": "https://link.compra.com.br/pagar/a4594817-be48-4a23-81aa-4bb01f95fe78",
"createdAt": "2022-07-18T09:54:22.000Z",
"updatedAt": "2022-07-18T09:54:22.000Z",
"paidAt": "2022-07-18T09:54:22.000Z",
"ip": null,
"externalRef": null,
"customer": {
"id": 1,
"externalRef": null,
"name": "Gabryel",
"email": "[email protected]",
"phone": "11999999999",
"birthdate": null,
"createdAt": "2022-05-26T19:17:48.000Z",
"document": {
"number": "12345678910",
"type": "cpf"
},
"address": {
"street": "Rua República Argentina",
"streetNumber": "4214",
"complement": null,
"zipCode": "11065030",
"neighborhood": "Pompéia",
"city": "Santos",
"state": "SP",
"country": "BR"
}
},
"card": {
"id": 147,
"brand": "visa",
"holderName": "GABRYEL FERREIRA",
"lastDigits": "1111",
"expirationMonth": 3,
"expirationYear": 2028,
"reusable": true,
"createdAt": "2022-07-17T18:08:11.000Z"
},
"boleto": null,
"pix": null,
"shipping": null,
"refusedReason": null,
"items": [
{
"externalRef": null,
"title": "b456",
"unitPrice": 100,
"quantity": 1,
"tangible": false
}
],
"splits": [
{
"recipientId": 1,
"amount": 10000,
"netAmount": 9400
}
],
"refunds": [],
"delivery": null,
"fee": {
"fixedAmount": 200,
"spreadPercentage": 4,
"estimatedFee": 600,
"netAmount": 9400
}
}
}
Checkout
{
"id": 686401,
"type": "checkout",
"objectId": "3",
"url": "https://test.com",
"data": {
"id": 3,
"companyId": 2,
"description": null,
"amount": 1000,
"secureId": "019c2702-6fbe-4199-b21c-c9342888d6ec",
"secureUrl": "https://link.compra.com.br/checkout/019c2702-6fbe-4199-b21c-c9342888d6ec",
"postbackUrl": "https://test.com",
"createdAt": "2022-08-02T18:04:04.000Z",
"settings": {
"defaultPaymentMethod": "credit_card",
"requestAddress": false,
"requestPhone": true,
"requestDocument": true,
"traceable": false,
"card": {
"enabled": true,
"freeInstallments": 1,
"maxInstallments": 12
},
"boleto": {
"enabled": false,
"expiresInDays": 2
},
"pix": {
"enabled": true,
"expiresInDays": 2
}
},
"items": [
{
"externalRef": null,
"title": "Hamburgão",
"unitPrice": 3000,
"quantity": 1,
"tangible": true
}
],
"splits": [],
"transaction": {
"id": 282,
"amount": 10000,
"refundedAmount": 0,
"companyId": 2,
"installments": 12,
"paymentMethod": "credit_card",
"status": "paid",
"postbackUrl": null,
"metadata": null,
"traceable": false,
"secureId": "a4594817-be48-4a23-81aa-4bb01f95fe78",
"secureUrl": "https://link.compra.com.br/pagar/a4594817-be48-4a23-81aa-4bb01f95fe78",
"createdAt": "2022-07-18T09:54:22.000Z",
"updatedAt": "2022-07-18T09:54:22.000Z",
"paidAt": "2022-07-18T09:54:22.000Z",
"ip": null,
"externalRef": null,
"customer": {
"id": 1,
"externalRef": null,
"name": "Gabryel",
"email": "[email protected]",
"phone": "11999999999",
"birthdate": null,
"createdAt": "2022-05-26T19:17:48.000Z",
"document": {
"number": "12345678910",
"type": "cpf"
},
"address": {
"street": "Rua República Argentina",
"streetNumber": "4214",
"complement": null,
"zipCode": "11065030",
"neighborhood": "Pompéia",
"city": "Santos",
"state": "SP",
"country": "BR"
}
},
"card": {
"id": 147,
"brand": "visa",
"holderName": "GABRYEL FERREIRA",
"lastDigits": "1111",
"expirationMonth": 3,
"expirationYear": 2028,
"reusable": true,
"createdAt": "2022-07-17T18:08:11.000Z"
},
"boleto": null,
"pix": null,
"shipping": null,
"refusedReason": null,
"items": [
{
"externalRef": null,
"title": "b456",
"unitPrice": 100,
"quantity": 1,
"tangible": false
}
],
"splits": [
{
"recipientId": 1,
"amount": 10000,
"netAmount": 9400
}
],
"refunds": [],
"delivery": null,
"fee": {
"fixedAmount": 200,
"spreadPercentage": 4,
"estimatedFee": 600,
"netAmount": 9400
}
}
}
}
Transferência
{
"id": 388,
"type": "transfer",
"objectId": "237",
"url": "https://test.com",
"data": {
"id": 237,
"amount": 500,
"status": "bank_processing",
"pixKey": "12345678900",
"fee": 0,
"bankAccount": null,
"metadata": null,
"createdAt": "2022-10-18T16:43:42.000Z",
"updatedAt": "2022-10-18T16:43:44.000Z",
"failReason": null,
"receiptUrl": null,
"description": "Transferência Teste",
"externalRef": null,
"postbackUrl": "https://test.com",
"processedAt": "2022-10-18T16:43:44.000Z",
"recipientId": 1,
"pixEnd2EndId": "E277287121G6I8886MF02JNCUGGLELRP",
"transferredAt": null
}
}