Scheduled Purchase

When the purchase/advance is scheduled, meaning an investor has approved a purchase to be paid on D+X, we trigger an event to indicate this operation scheduling.

The following day, theTítulo negociado event is sent again, and we send the actual payment confirmation for the operation.

Below is an example of the Payload:

Path: /payables-response

{
  "purchaseId": "parniqQ70k",
  "sponsorId": 4026534,
  "sponsorName": "SACADO S.A",
  "sponsorGovernmentId": "13677912100135",
  "sellerId": 1614639279,
  "sellerName": "CEDENTE S.A",
  "sellerGovernmentId": "35060339000286",
  "buyerId": 540897447,
  "buyerName": "INVESTIDOR S.A.",
  "buyerGovernmentId": "01331122000222",
  "buyerReceivementBank": "341",
  "buyerReceivementAgency": "1234",
  "buyerReceivementAccount": "1234",
  "buyerReceivementAccountDigit": "1",
  "eventType": "PurchaseScheduledEvent",
  "items": [
    {
      "payableUuid": "P7FQZxtGJD",
      "status": "SOLD", [*]
      "detail": "",
      "externalId": "GwQMrDKM0R",
      "invoiceNumber": "soroKFUWbs",
      "installment": 1, [**]
      "totalInstallment": 1, [**]
      "paymentDate": 1585450800000,
      "tax": 1.8,
      "sponsorTax": 0,
      "paymentValue": 99.93,
      "sellerPaymentValue": 98.87,
      "sponsorPaymentValue": 0,
      "_links": {
        "payable": {
          "href": "https://zuul.monkeyecx.com/v2/sponsors/4026534/payables/P7FQZxtGJD",
          "type": "GET"
        }
      }
    },
    {
      "payableUuid": "5xHO6IkIyz",
      "status": "SOLD", [*]
      "detail": "",
      "externalId": "qTDXKkLZ7b",
      "invoiceNumber": "5Pfb1BEazX",
      "installment": 1, [**]
      "totalInstallment": 1, [**]
      "paymentDate": 1585450800000,
      "tax": 1.8,
      "sponsorTax": 0,
      "paymentValue": 99.93,
      "sellerPaymentValue": 98.87,
      "sponsorPaymentValue": 0,
      "_links": {
        "payable": {
          "href": "https://zuul.monkeyecx.com/v2/sponsors/4026534/payables/5xHO6IkIyz",
          "type": "GET"
        }
      }
    }
  ],
  "_links": {
    "sponsor": {
      "href": "https://zuul.monkeyecx.com/v1/sponsors/4026534",
      "type": "GET"
    },
    "payables": {
      "href": "https://zuul.monkeyecx.com/v2/sponsors/4026534/payables",
      "type": "GET"
    }
  }
}`

[*] The status field can contain the value SOLD only. The next day, we send a new webhook if the operation is declined.

[**] The installment and totalInstallment fields are used only when the invoice is paid in installments. For one-time payments, the default value is 1.

The above payload includes information about which investor made the advance (Company Name, EIN, Bank Details).

This payload also contains the IDs (PayableId, ExternalId, and InvoiceNumber) used to identify the invoice in your system.

When sending invoices, either via API or file, you define the layout and choose one of the three identifiers above. You should use the same identifier when receiving the webhook request.