Order Updated, Created, and Committed Events
Event Type: Legacy Custom Format
The body of the order event for updated, created, and committed events matches the order API schema, but omitting the transactions field, for example:
{
id: 1234,
type: "ORDER",
number: 1,
customer: {
id: 4321,
type: "CUSTOMER",
},
contract: {
id: "11111111-1111-1111-1111-111111111111",
type: "CONTRACT",
},
contractType: {
id: "22222222-2222-2222-2222-222222222222",
type: "CONTRACT_TYPE",
},
delivery: {
shippingDate: "2024-01-23",
},
discounts: [
{
code: "NEW_YEAR_NEW_ME",
},
],
status: "PENDING",
billing: {
status: "PENDING",
},
pricing: {
currencyCode: "USD",
totalPrice: 6400,
},
lineItems: [
{
id: "5",
type: "PRODUCT",
quantity: 6,
meta: {
source: "order gen",
},
},
],
updatedAt: "2023-12-28T00:00:52.000Z",
createdAt: "2023-09-27T01:02:01.000Z",
}
Order Refunded (Credit)
Event Type: Legacy Custom Format
For order refunded events, the body varies depending on whether it was a credit or monetary refund, for example:
{
"creditParams": {
"creditAmount": 5,
"customerId": "5275",
"subscriptionId": "81aa853b-4f09-4ecd-9404-85ac02a0997c"
},
"orderId": "1587",
"type": "credit"
}
Order Refunded (Monetary)
Event Format: Legacy Custom Format
{
"monetaryParams": {
"refundAmount": 100,
"transactionId": "12123455",
"currency": "GBP",
},
"orderId": "1588",
"type": "monetary"
}
Billing Attempt
Event Format: CloudEvent Format
{
"attemptNumber": 2,
"attemptsHistory": [
{
"attemptNumber": 1,
"billedAt": "2025-06-03T10:30:44.858Z",
"externalStatus": "FAILED",
"internalStatus": "billingFailed",
"message": "Insufficient Funds",
"meta": {},
"scheduledAt": "2025-06-03T10:30:00.000Z",
"source": "SCHEDULED",
"succeeded": false
},
{
"attemptNumber": 2,
"billedAt": "2025-06-03T10:45:44.858Z",
"externalStatus": "SUCCEEDED",
"internalStatus": "billingSucceeded",
"message": "",
"meta": {},
"scheduledAt": "2025-06-03T10:45:00.000Z",
"source": "SCHEDULED",
"succeeded": true
}
],
"billingData": {
"billedPrice": 770,
"formattedBilledPrice": "£7.70",
"formattedMonetaryCreditUsed": "£30.00",
"formattedTotalPrice": "£37.70",
"monetaryCreditUsed": 0,
"totalPrice": 770
},
"internalStatus": "billingSucceeded",
"message": "",
"nextAttempt": null,
"source": "SCHEDULER",
"status": "SUCCEEDED",
"success": true
}