Callbacks
When the subscription status changes, the mock sends SubscriptionStatusNotification (XML, HMAC-SHA256 signature — the Now / Signature fields in the body) to the project’s callback URL.
| Event | When it arrives |
|---|---|
APPROVED | The subscription is confirmed: a correct PIN in ApproveSubscription or a successful card / SBP payment. SubscriptionStatus=Active |
REJECTED | The card payment was declined (cards …0001……0005). SubscriptionStatus=ApprovingFailed |
CANCELLED | After CancelSubscription. SubscriptionStatus=Cancelled |
APPROVED_BILLING | A scheduled charge succeeded. BillingIteration grows, PaidUntil shifts. Only with the charge cycle enabled — see “Sandbox hooks: charges” |
REJECTED_BILLING_ATTEMPT | A charge attempt failed, a retry follows. SubscriptionStatus=Redelivering, BillingErrorCode=210 |
REJECTED_BILLING | Attempts exhausted (three in a row). SubscriptionStatus=RenewingFailed, the subscription is closed |
FINISHED | All billing cycles are done. SubscriptionStatus=Closed |
Sandbox
Cycle events arrive only if <TestInfo><BillingPeriodSeconds> was passed when the subscription was created. Without it the sandbox performs no charges — otherwise the demo project would keep emitting notifications for every subscription ever created.
| Parameter | Value |
|---|---|
| First callback delay | 15 sec after the status change |
| Max attempts | 7 (the sandbox one-minute window) |
| Backoff | 2s → 2s → 5s → 5s → 10s → 10s — the start of the production schedule; after that the sandbox stops delivering |
| HTTP timeout | 60 sec |
SubscriptionStatusNotification
<Request>
<SubscriptionID>12345678</SubscriptionID>
<SubscriptionProjectID>2001</SubscriptionProjectID>
<SubscriberID>1234567</SubscriberID>
<Subscriber_MSISDN>79001234567</Subscriber_MSISDN>
<EventType>APPROVED</EventType>
<SubscriptionStatus>Active</SubscriptionStatus>
<BillingIteration>1</BillingIteration>
<BillingAttempt>1</BillingAttempt>
<Country>ru</Country>
<OperatorID>22</OperatorID>
<CustomerPrice currency="RUB" amount="0.00"/>
<BillingOperationID>b4da05e2-...</BillingOperationID>
<BillingErrorCode>0</BillingErrorCode>
<PaidUntil>2026-07-25T12:00:00+03:00</PaidUntil>
<Now>20260625120015</Now>
<Signature>d2f36558ca5455be...</Signature>
</Request>ContentRequest — asking for the SMS text
<!-- arrives before every successful charge -->
<Request>
<SubscriptionID>10000003</SubscriptionID>
<EventType>Content_request</EventType>
<BillingIteration>1</BillingIteration>
<ContentMessage><Parameter Name="BODY"/></ContentMessage>
</Request>