Skip to Content

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.

EventWhen it arrives
APPROVEDThe subscription is confirmed: a correct PIN in ApproveSubscription or a successful card / SBP payment. SubscriptionStatus=Active
REJECTEDThe card payment was declined (cards …0001……0005). SubscriptionStatus=ApprovingFailed
CANCELLEDAfter CancelSubscription. SubscriptionStatus=Cancelled
APPROVED_BILLINGA scheduled charge succeeded. BillingIteration grows, PaidUntil shifts. Only with the charge cycle enabled — see “Sandbox hooks: charges”
REJECTED_BILLING_ATTEMPTA charge attempt failed, a retry follows. SubscriptionStatus=Redelivering, BillingErrorCode=210
REJECTED_BILLINGAttempts exhausted (three in a row). SubscriptionStatus=RenewingFailed, the subscription is closed
FINISHEDAll billing cycles are done. SubscriptionStatus=Closed

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.

ParameterValue
First callback delay15 sec after the status change
Max attempts7 (the sandbox one-minute window)
Backoff2s → 2s → 5s → 5s → 10s → 10s — the start of the production schedule; after that the sandbox stops delivering
HTTP timeout60 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>