Purchase Created

Webhook event sent when a purchase is created, including operation details, payment values, payment dates, 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

KeyTypeDescription

auctionId


string

Purchase 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.

sponsorName


string

Client's company name or full name.

sponsorPersonType


string

Client entity type.

Possible values are:
LEGAL_PERSON - Legal entity
NATURAL_PERSON - Individual


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.

sellerPersonType


string

Seller entity type.

Possible values are:
LEGAL_PERSON - Legal entity
NATURAL_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.


_links


object

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

Available resources are:
seller - List seller data.
sponsor - List Client data.
purchase - List this purchase.
purchases - List all funder purchases.
signature - List a purchase signature.

Webhook payload example

{
  "_links": {
    "bid": {
      "href": "https://gateway.hmg.sales.finance/v1/buyers/62144175000120/bids/6620a220-b400-4222-bb94-afbc029956be",
      "type": "GET"
    }
  },
  "auctionId": "f7Hrm6k7Rl",
  "bidId": "6620a220-b400-4222-bb94-afbc029956be",
  "status": "WAITING_CUSTODY",
  "averageTax": 16.9105,
  "averageTenor": 169,
  "paymentDate": 1649041200000,
  "grossPaymentValue": 50891.25,
  "netPaymentValue": 22451.45,
  "buyerName": "BUYER SALES FINANCE",
  "buyerGovernmentId": "62144175000120",
  "sponsorName": "BUYER SALES FINANCE",
  "sponsorPersonType": "LEGAL_PERSON",
  "sponsorGovernmentId": "36147299000159",
  "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": "SELLER SALES FINANCE 2",
  "sellerPersonType": "LEGAL_PERSON",
  "sellerGovernmentId": "57648355000109",
  "sellerAddress": "Rua Seller 2",
  "sellerAddressNumber": "2",
  "sellerAddressComplement": "Seller 2",
  "sellerNeighborhood": "Moema",
  "sellerCity": "São Paulo",
  "sellerState": "SP",
  "sellerCountry": "Brasil",
  "sellerZipCode": "13801510",
  "sellerBank": "001",
  "sellerAgency": "2323",
  "sellerAgencyDigit": "0",
  "sellerAccount": "22",
  "sellerAccountDigit": "2",
  "createdAt": 1649424623283,
  "items": [
    {
      "uuid": "7qohB0H6m1",
      "externalId": "CX4119",
      "invoiceDate": 1593054000000,
      "invoiceNumber": "XV4119",
      "invoiceKey": null,
      "installment": 1,
      "totalInstallment": 1,
      "grossPaymentValue": 11897.25,
      "paymentDate": 1665975600000,
      "effectivePaymentDate": 1665975600000,
      "tax": 19.9,
      "netPaymentValue": 3569.54
    }
  ]
}

Did this page help you?