Credits Low Event (v1.0.0)

The credit level is below the threshold.

Details

This event is raised when the amount of credits are below the threshold. This could mean that other services need to pause subscriptions, notify the customer, try to charge the customer or something else.

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": 109
}

JSON Schema

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