Purchase Created V2
Webhook event sent when a purchase is created, including operation details, payment values, payment dates, purchase items, and related HATEOAS links.
When a purchase is created, we send this event with information about who performed the operation, the amounts to be paid, and the payment dates.
You can use _links to navigate to the resources related to this event.
Path: /purchase
Webhook payload object
| Key | Type | Description |
|---|---|---|
purchaseId | string | Purchase identifier. |
auctionId | string | Auction identifier. |
bidId | string | Bid identifier. |
status | string | Purchase status. Possible values are: WAITING_CUSTODY - Waiting for custody |
averageTax | number | Tax assigned to the purchase. |
averageTenor | integer | Advance term in days. |
paymentDate | long | Purchase payment date. |
grossPaymentValue | number | Gross purchase amount. |
netPaymentValue | number | Net purchase amount. |
buyerName | string | funder's company name or full name. |
buyerGovernmentId | string | funder's CNPJ or CPF. |
sellerName | string | Seller's company name or full name. |
sellerPersonType | string | Seller entity type. Possible values are: LEGAL_PERSON - Legal entityNATURAL_PERSON - Individual |
sellerGovernmentId | string | Seller's CNPJ or CPF. |
sellerAddress | string | Seller address. |
sellerAddressNumber | string | Seller address number. |
sellerAddressComplement | string | Seller address complement. |
sellerNeighborhood | string | Seller neighborhood. |
sellerCity | string | Seller city. |
sellerState | string | Seller state. |
sellerCountry | string | Seller country. |
sellerZipCode | string | Seller ZIP code. |
sellerBank | string | Seller bank code. |
sellerAgency | string | Seller bank branch code, without the digit. |
sellerAgencyDigit | string | Seller branch digit. |
sellerAccount | string | Seller checking account, without the digit. |
sellerAccountDigit | string | Seller checking account digit. |
createdAt | long | Resource creation date. |
items | array | Array containing the items in this purchase. |
items[][uuid] | string | Receivable identifier on the platform. |
items[][externalId] | string | External receivable identifier. (Up to 255 characters) |
items[][invoiceDate] | long | Receivable date. |
items[][invoiceNumber] | string | Receivable number. (Up to 255 characters) |
items[][invoiceKey] | string | Electronic receivable key. (Up to 255 characters) |
items[][installment] | integer | Installment related to the receivable. Used only when the receivable is paid in installments. When it is paid in full, the default value is 1. |
items[][totalInstallment] | integer | Total installments related to the receivable. Used only when the receivable is paid in installments. When it is paid in full, the default value is 1. |
items[][grossPaymentValue] | number | Receivable amount. |
items[][paymentDate] | long | Receivable due date. |
items[][effectivePaymentDate] | long | Receivable due date. |
items[][tax] | number | Tax assigned to the purchase item. |
items[][netPaymentValue] | number | Amount assigned to the seller. |
items[][sponsorGovernmentId] | string | Client's CNPJ or CPF. |
items[][sponsorName] | string | Client's company name or full name. |
items[][sponsorPersonType] | string | Client entity type. Possible values are: LEGAL_PERSON - Legal entityNATURAL_PERSON - Individual |
items[][sponsorAddress] | string | Client address. |
items[][sponsorAddressNumber] | string | Client address number. |
items[][sponsorAddressComplement] | string | Client address complement. |
items[][sponsorNeighborhood] | string | Client neighborhood. |
items[][sponsorCity] | string | Client city. |
items[][sponsorState] | string | Client state. |
items[][sponsorCountry] | string | Client country. |
items[][sponsorZipCode] | string | Client ZIP code. |
items[][sponsorBank] | string | Client bank code. |
items[][sponsorAgency] | string | Client bank branch code, without the digit. |
items[][sponsorAccount] | string | Client checking account, without the digit. |
items[][sponsorAccountDigit] | string | Client checking account digit. |
_links | object | Resources available through HATEOAS. To learn more, click here. Available resources are: purchase - List this purchase.purchase-response - Confirm purchase. |
Webhook payload example
{
"purchaseId" : "f7Hrm6k7RR",
"auctionId" : "f7Hrm6k7Rl",
"bidId" : "6620a220-b400-4222-bb94-afbc029956be",
"status" : "WAITING_CUSTODY",
"averageTax" : 1.3345,
"averageTenor" : 169,
"paymentDate" : 1649041200000,
"grossPaymentValue" : 50891.25,
"netPaymentValue" : 22451.45,
"buyerName" : "BUYER SALES FINANCE",
"buyerGovernmentId" : "62144175000120",
"sellerName" : "SALES SALES FINANCE",
"sellerPersonType" : "LEGAL_PERSON",
"sellerGovernmentId" : "57648355000109",
"sellerAddress" : "RUA SELLER",
"sellerAddressNumber" : "404",
"sellerAddressComplement": "Seller",
"sellerNeighborhood" : "Moema",
"sellerCity" : "SÃO PAULO",
"sellerState" : "SP",
"sellerCountry" : "Brasil",
"sellerZipCode" : "13801510",
"sellerBank" : "001",
"sellerAgency" : "2323",
"sellerAgencyDigit" : "0",
"sellerAccount" : "11100",
"sellerAccountDigit" : "1",
"createdAt" : 1649424623283,
"items" : [
{
"uuid" : "7qohB0H6m1",
"externalId" : "CX4119",
"invoiceDate" : 1593054000000,
"invoiceNumber" : "1287572-32",
"invoiceKey" : "XV4119",
"installment" : 1,
"totalInstallment" : 1,
"grossPaymentValue" : 11897.25,
"paymentDate" : 1665975600000,
"effectivePaymentDate" : 1665975600000,
"tax" : 1.3345,
"netPaymentValue" : "3569.54",
"sponsorName" : "SPONSOR SALES FINANCE",
"sponsorPersonType" : "LEGAL_PERSON",
"sponsorGovernmentId" : "36147299000159",
"sponsorAddress" : "Rua Sponsor",
"sponsorAddressNumber" : "404",
"sponsorAddressComplement" : "NA",
"sponsorNeighborhood" : "Moeda",
"sponsorCity" : "São Paulo",
"sponsorState" : "SP",
"sponsorCountry" : "Brasil",
"sponsorZipCode" : "13801510",
"sponsorBank" : "001",
"sponsorAgency" : "2323",
"sponsorAgencyDigit" : "0"
}
],
"_links" : {
"purchase" : {
"href" : "https://gateway.sales.finance/v2/buyers/62144175000120/purchases/f7Hrm6k7RR",
"type" : "GET"
},
"purchase-response" : {
"href" : "https://gateway.sales.finance/v1/buyers/62144175000120/purchases/f7Hrm6k7RR/response",
"type" : "POST"
}
}
}Updated 19 days ago
Did this page help you?
