Order Template Events

The system provides real-time updates through webhooks for order template status changes and transaction completions. Clients can subscribe to these events to receive immediate notifications about order processing.

Event Structures

Webhook Structure

All webhook events follow a consistent structure:

{
   "id": "string",           // Unique event identifier
   "type": "string",         // Event type (ORDER_TEMPLATE or CAAS)
   "data": {},              // Event-specific data payload
   "at": "string"           // timestamp in UTC
}

Order Template Event Structure

Order template events are triggered for status changes and always contain the same data structure.

Event Type:ORDER_TEMPLATE

Data Structure:

{
   "providerId": "string",
   "orderTemplateId": "string", 
   "providerTransactionRef": "string",
   "orderTemplateStatus": "string",
   "userInputAmount": {
      "amount": "string",
      "currency": "string"
   },
   "errorData": object | null
}

Events

Order Template Consumed

Triggered when an order template is successfully consumed at a physical location.

Example:

{
   "id":"5bca79f9-5718-4602-be41-8d45ca8cecfd",
   "type":"ORDER_TEMPLATE",
   "data":{
      "providerId":"828627387817136135", // Identifier of the payment provider
      "orderTemplateId":"1263543355914194944", // Unique identifier of the order template
      "providerTransactionRef":"830324007540008113329484765809",
      "orderTemplateStatus":"CONSUMED", // Status of the order template (CONSUMED, EXPIRED)
      "userInputAmount":{ // Amount and currency specified by the user
         "amount":"59", // Amount value
         "currency":"USD" // Currency code
      },
      "errorData":null // Error information (null if no error)
   },
   "at":"2025-07-18T17:11:20Z"
}

Order Template Expired

Triggered when an order template expires before being consumed.

Example:

{
   "id":"8516fca3-bc6a-4579-a5cc-83ff73976093",
   "type":"ORDER_TEMPLATE",
   "data":{
      "providerId":"828627387817136135",
      "orderTemplateId":"1266110955147890688",
      "providerTransactionRef":"830324007540008113329488782591",
      "orderTemplateStatus":"EXPIRED",
      "userInputAmount":{
         "amount":"55.0",
         "currency":"USD"
      },
      "errorData":null
   },
   "at":"2025-07-25T20:13:02Z"
}

Buy Transaction Events

Buy transaction events are triggered for order completions and failures and always contain the same data structure.


Event Type:CAAS

Data Structure:

{
   "type": "BUY",
   "providerId": "string",
   "transactionId": "string",
   "metadata": {
      "orderStatus": "string",
      "blockchainData": object | null
   },
   "errorData": object | null
}

Buy Order Completed

Triggered when a buy transaction is successfully completed.

Example:

{
   "id":"91ae00c4-4dd3-43fd-a027-98d50c384da3",
   "type":"CAAS",
   "data":{
      "type":"BUY", // Always "BUY" for buy transaction events
      "providerId":"828627387817136135", // Identifier of the payment provider
      "transactionId":"1263543643131744256", // Unique identifier of the transaction
      "metadata":{ // Additional transaction metadata
         "orderStatus":"COMPLETED", // Status of the order (COMPLETED, FAILED)
         "blockchainData":null // Blockchain-related information (null if not applicable)
      },
      "errorData":null // Error information (null if successful)
   },
   "at":"2025-07-18T17:11:30Z"
}

Buy Order Failed

Triggered when a buy transaction fails due to an error.

Example:

{
   "id":"7748297e-11e4-4a66-bca3-2d1cdde403e7",
   "type":"CAAS",
   "data":{
      "type":"BUY", // Always "BUY" for buy transaction events
      "providerId":"828627387817136135", // Identifier of the payment provider
      "transactionId":"1263543643131744256", // Unique identifier of the transaction
      "metadata":{ // Additional transaction metadata
         "orderStatus":"COMPLETED", // Status of the order (COMPLETED, FAILED)
         "blockchainData":null // Blockchain-related information (null if not applicable)
      },
      "errorData":{ // Error information (null if successful)
         "code":"314-001-S3",
         "message":"Transaction cancelled by Auth Void"
      }
   },
   "at":"2025-07-18T17:07:10Z"
}

BlockchainData Structure

When blockchain information is available, the blockchainData field contains the following structure:

{
   "targetWalletAddress": "string", // Destination wallet address for the transaction
   "blockchainTransactionId": "string", // Unique identifier of the blockchain transaction
   "blockchainMemo": "string", // Additional memo or note attached to the blockchain transaction
   "currency": "string", // Currency code of the blockchain transaction
   "chain": "string", // Blockchain network used for the transaction
   "refundWalletAddress": "string", // Wallet address for potential refunds
   "sourceWalletAddress": "string" // Source wallet address for the transaction
}

Event Error Codes


Error CodeError Message
314-001-S3Transaction cancelled by Auth Void
352-102-S1Unexpected internal error occurred