Credits Alert Event (v1.0.0)

The remaining credits in the bucket are below zero.

Overview

This event is raised when the amount of credits are too low. This could mean that other services need to pause subscriptions, notify the customer.

The event is raised by CMS adapter, specifically the SQS handler (pal.cms.sqs), when it processes bucket credit messages from the NBS adapter. The SQS handler does not invoke any notification, it shall be handled by subscribers of the message.

If the event needs to be used for other type of credit handling. The event needs to specify the credit type or the ProductId needs to be handled by the consumers.

Architecture diagram

Payload example

Payload example
{
"Reference": {
"Id": "123e4567-e89b-12d3-a456-426614174000",
},
"SetupIntent": {
"Id": "67890",
},
"Product": {
"Id": "123e4567-e89b-12d3-a456-426614174001",
},
"CreditAmount": 0
}

JSON Schema

10 properties
Reference object → Reference
required
SetupIntent object → Reference
required
Product object → Reference
required
CreditAmount integernull