Purchase
Status: Trusted Tester
Purchases are a receipt of items sold to your organization. When selling to another organization you will want to create an Order instead.
Purchases generated by the platform to record the wholesale fees that are charged to a partner for products they sell to their customers. One time fees and each renewal will appear as separate line items broken out per customer.
All amounts will be specified in the minor unit of the purchase's currency. For example in the case of USD that would be cents. For more info on converting between minor and major units see this wikipedia article.
A platform generated identifier for the purchase
Possible values: [purchases]
attributes object
The time at which the purchase was created
The payment status of the purchase will be one of the following:
draft: Indicates the purchase is not closed yet. New line items can be added when the purchase is in this state.due: The purchase has been finalized and is ready to be paid.overdue: The purchase is unpaid and has past the due datepaid: The full amount has been paid.uncollectible: After multiple failed attempts to collect payment it's unlikely that this purchase will be paid
Possible values: [draft, due, overdue, paid, uncollectible]
draftThe sum of all price reductions applied to products
The sum of all taxes applied to items of the purchase
The total amount the purchase is for, accounting for any applied discounts or taxes
The 3 letter currency code as defined by ISO 4217
Possible values: >= 3 characters and <= 3 characters
CADlineItems object[]
The unique identifier of a product or service
The ID of the organization that purchased the product
The wholesale cost of the product before discounts or taxes are applied.
The total amount the cost of this product has been reduced by
The total amount of tax charged for this product
The final cost of the product accounting for any applied discounts or taxes
relationships object
partner object
The partner that the purchase receipt is being sent to. They will be the one who purchased the product at a wholesale rate and activated it for one of their customers
data objectrequired
Possible values: >= 3 characters and <= 4 characters
Possible values: [partner]
{
"id": "string",
"type": "purchases",
"attributes": {
"createdAt": "2024-07-29T15:51:28.071Z",
"statusCode": "draft",
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"currencyCode": "CAD",
"lineItems": [
{
"sku": "string",
"customerId": "string",
"unitAmount": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0
}
]
},
"relationships": {
"partner": {
"data": {
"id": "string",
"type": "partner"
}
}
}
}