Purchase Finalized

Webhook event sent when a purchase is finalized, including operation details, payment values, payment dates, purchase items, and related HATEOAS links.

When a purchase is finalized, after all seller and funder legal representatives complete the signatures, 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-finalized

Webhook payload object

KeyTypeDescription

auctionId


string


Purchase identifier.


bidId


string


Bid identifier.


status


string


Purchase status. Possible values:
SOLD - Advanced
REFUSED - Refused


grossPaymentValue


number


Gross purchase amount.


netPaymentValue


number


Net purchase amount.


averageTax


number


Tax assigned to the purchase.


averageTenor


integer


Advance term in days.


paymentDate


long


Purchase payment date.


buyerName


string


funder's company name or full name.


buyerGovernmentId


string


funder's CNPJ or CPF.


sponsorName


string


Client's company name or full name.


sponsorGovernmentId


string


Client's CNPJ or CPF.


sponsorAddress


string


Client address.


sponsorAddressNumber


string


Client address number.


sponsorAddressComplement


string


Client address complement.


sponsorNeighborhood


string


Client neighborhood.


sponsorCity


string


Client city.


sponsorState


string


Client state.


sponsorCountry


string


Client country.


sponsorZipCode


string


Client ZIP code.


sponsorBank


string


Client bank code.


sponsorAgency


string


Client bank branch code, without the digit.


sponsorAccount


string


Client checking account, without the digit.


sponsorAccountDigit


string


Client checking account digit.


sellerName


string


Seller's company name or full name.


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.


sellerAccount


string


Seller checking account, without the digit.


sellerAccountDigit


string


Seller checking account digit.


sellerExternalCode


string


Agreement code with the seller.


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[][netPaymentValue]


number


Amount assigned to the seller.


items[][paymentDate]


long


Receivable due date.


items[][effectivePaymentDate]


long


Receivable due date.


items[][tax]


number


Tax assigned to the purchase item.


_links


object


Resources available through HATEOAS.
To learn more, click here.

Available resources are:
bid - List winning bid data.
file - Download the signed term.

Webhook payload example

{
  "_links": {
    "file": {
      "href": "https://gateway.hmg.sales.finance/v1/buyers/30306294000145/signatures/mDg2EVIduN/file",
      "type": "GET"
    },
    "bid": {
      "href": "https://gateway.hmg.sales.finance/v1/buyers/30306294000145/bids/eac0c0d2-0f87-4094-ab7c-976fe5e03394",
      "type": "GET"
    }
  },
  "auctionId": "zXGg0kZsw6",
  "bidId": "eac0c0d2-0f87-4094-ab7c-976fe5e03394",
  "status": "SOLD",
  "sellerExternalCode": "A-779",
  "grossPaymentValue": "96425.00",
  "netPaymentValue": "95930.26",
  "averageTax": 0.30000001192092896,
  "averageTenor": 51,
  "paymentDate": 1699992781,
  "buyerName": "Buyer Sales Plus",
  "buyerGovernmentId": "19653243000157",
  "sponsorName": "Sponsor Sales Plus",
  "sponsorGovernmentId": "20752233000158",
  "sponsorAddress": "Rua Sponsor",
  "sponsorAddressNumber": "574",
  "sponsorAddressComplement": "sponsor",
  "sponsorNeighborhood": "Moema",
  "sponsorCity": "São Paulo",
  "sponsorState": "SP",
  "sponsorCountry": "Brasil",
  "sponsorZipCode": "13801510",
  "sponsorBank": "033",
  "sponsorAgency": "341",
  "sponsorAccount": "1265",
  "sponsorAccountDigit": "0",
  "sellerName": "Sales Sales Plus",
  "sellerGovernmentId": "08668520000189",
  "sellerAddress": "Rua Seller",
  "sellerAddressNumber": "2",
  "sellerAddressComplement": "Seller 2",
  "sellerNeighborhood": "Moema",
  "sellerCity": "São Paulo",
  "sellerState": "SP",
  "sellerCountry": "Brasil",
  "sellerZipCode": "13801510",
  "sellerBank": "001",
  "sellerAgency": "2323",
  "sellerAccount": "22",
  "sellerAccountDigit": "2",
  "items": [
    {
      "uuid": "s30f7ZTtyq",
      "externalId": "DS4059",
      "invoiceDate": 1703798071,
      "invoiceNumber": "DC9216",
      "invoiceKey": null,
      "installment": 1,
      "totalInstallment": 1,
      "grossPaymentValue": 11897.25,
      "paymentDate": 1665975600000,
      "effectivePaymentDate": 1665975600000,
      "tax": 19.9,
      "netPaymentValue": 3569.54
    }
  ]
}

Did this page help you?