Skip to main content

Order Notifications

You can receive notifications whenever your order status changes.

Order statuses

The diagram below shows the main statuses of the order workflow.

Order statuses

Event list

Below is a list of order-related notifications which you can subscribe to:

  • Order created
  • Order payment failed
  • Order payment refused
  • Order completed
  • Order completed with error
  • Order fulfillment failed
  • Subscription renewal order completed
  • Order cancelled

List of fields

The notification payload will include an 'order' object containing the following details:

NameDescriptionR/O
idOrder unique identifierR
statusOrder status corresponds to the event type.R
sourceOrder source: PURCHASE, SUBSCRIPTION, OFFER, MANUAL_RENEWAL, etcR
creationDateCreation date in ISO 8601 format, ex.: 2024-01-01T01:02:03ZR
currencyOrder's Currency, ex.: EURR
totalPriceIncVATOrder total price, including sales taxR
totalPriceExclVATOrder total price, excluding sales taxR
salesFlagSales flags is an array of strings provided in the cart. Similar to external context, but unencoded.O
consentFlagsConsent flags given by the end userO
consentFlags.newsletterOptinMarketing newsletter consent flagO
externalContextBased64 encoded string of cart parametersO
decodedExternalContextDecoded map of cart string parameters if they were provided in the json formatO
paymentPayment objectO
payment.idPayment idR
payment.methodPayment method id (visa, mastercard, sepa, visa_electron, visa_inst4, diners, pix, boleto etc.)O
payment.statusPayment status (COMPLETED, FAILED)R
userBuyer's details objectO
user.idBuyer's idO
user.emailBuyer's emailR
user.firstNameBuyer's first nameO
user.lastNameBuyer's last nameO
user.languageBuyer's language alpha-2 code, ex "pt"O
user.countryBuyer's country alpha-3 code, ex "BRA"O
user.streetBuyer's street addressO
user.zipcodeBuyer's postal codeO
user.cityBuyer's cityO
items[]List of items purchased (products, services, etc.)R
items[].idUnique ID for order line itemR
items[].product.nameProduct nameR
items[].product.uniqueReferenceA unique ID for identifying your product on the Nexway Monetize platformR
items[].product.publisherReferenceA unique ID for identifying your product in your information system, if definedO
items[].fulfillmentIdFulfillment process identifierO
items[].quantityProduct quantityR
items[].activationCodeProduct activation codeO
items[].unitPriceIncVATProduct unit price, including sales taxR
items[].unitPriceExclVATProduct unit price, excluding sales taxR
items[].VATRateSold product applied sales tax rateR
items[].discountRateDiscount rate applied to productO
items[].subscriptionIdSubscriptionId if the line item has oneO

If you need to get additional data, which is not available in the event, please refer to the REST API methods to get order or other entities.

Example

{
"subject": "order",
"type": "completed",
"objectId": "3KTEY9K4AAA",
"eventDate": "2017-08-17T11:25:33.606Z",
"order": {
"id": "3KTEY9K4AAA",
"status": "COMPLETED",
"creationDate": "2017-08-17T11:25:31Z",
"payment": {
"method": "visa",
"automaticBilling": false
},
"totalPriceIncVAT": 357,
"totalPriceExclVAT": 297.5,
"externalContext":"eyJzcGFnZSI6==",
"salesFlag":[
"EXTMD_Daily_fr_XXXrenew-30"
],
"consentFlags": {
"newsletterOptin": true
},
"currency": "USD",
"user": {
"id": "037dbcbb-c5bd-4a81-8fd7-3420b440fdf3",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"language": "en",
"country": "USA",
"street": "587 Main Street",
"zipcode": "20005",
"city": "Washington"
},
"items": [
{
"id": "fd58a2e5-548c-44a7-b78d-5b246c1a25cd",
"product": {
"name": "My product name",
"uniqueReference": "82165493-486f-54fa-a454-65458da64c53",
"publisherReference": "SKU-0001",
},
"fulfillmentId":"fff994ac-2e29-4dce-a8dd-6c582eee7927",
"subscriptionId":"fffdddac-2e29-4dce-a8dd-052e25968b8b",
"activationCode":"XXXXX-4REZC-CV64B-XXX",
"quantity": 1,
"externalContext": "what the customer wants",
"unitPriceIncVAT": 178.5,
"unitPriceExclVAT": 148.75,
"VATRate": 0.2
}
]
}
}

Additional fields for 'Order Completed With Content Including Subscription Data' notification

Certain notification types, like 'Order Completed with Subscription Data' and 'Order Cancelled with Subscription Data' include details about the subscription. Although, subscriptions are a separate domain with their own set of events.

NameDescriptionR/O
items[].subscriptionSubscription objectO
items[].subscription.idSubscriptionIdR
items[].subscription.createDateCreation date in ISO 8601 formatR
items[].subscription.modelIdSubscription modelR
items[].subscription.storeIdSelling store idR
items[].subscription.lifecycleLifecycle dataR
items[].subscription.lifecycle.idLifecycle id stringO
items[].subscription.lifecycle.anniversaryDateSubscription anniversary (expiration) date in ISO 8601 formatR