Skip to Content
SubscriptionsProtocol overview

Subscriptions — overview

XML API for managing subscriptions on the i-Free billing platform. All requests are sent via POST to /Http/Services/{Method}.aspx — the method name is case-insensitive.

Endpointhttps://subs-sandbox.digitalspb.com/Http/Services/{Method}.aspx
Referencehttps://i-free.money/developers/en/sandbox
ParameterValue
Content-Typetext/xml — XML body, or application/x-www-form-urlencoded — the same fields as form parameters
Root element<Request> for requests, <Response> for responses
ResponseXML <Response> with a StatusName field

Protocol version: 1.0.2

This is not the same protocol as Callisto one-time payments: a different host, a different signature formula, a different set of methods. The integrations share almost no code.

The responsibility model differs too: here the platform runs the charging schedule set for the project, and the partner does not initiate each charge. For the opposite — bind the payment details and charge on your own schedule — use a contract in one-time payments, see Mobile phone payments (DCB).

Three activation channels

There is a single creation method — CreateSubscription; the activation channel is chosen by the set of customer fields in the request.

ChannelRequest fieldsHow it is activated
SMS_PINSubscriber_MSISDN (the legacy name MSISDN is also accepted)The subscriber enters the PIN from SMS → ApproveSubscription
AUTH_PAGE — card and SBPCustomerType=Card + CustomerIdRedirect to AuthorizeUrl from the response; for an SBP QR code append ?useSbpQr=True to it. ApproveSubscription is not called — the subscription is activated once the payment completes
AUTH_PAGE — WAPClientIP with no number — the operator gateway determines itThe subscriber confirms on the AuthorizeUrl page and comes back with the result parameters (action=approved / cancelled / alreadyexist)

SMS_PIN flow

  1. CreateSubscription — initialize a subscription for Subscriber_MSISDN. The response contains SubscriptionID and the confirmation channel; the subscription status is Pending.
  2. ApproveSubscription — confirm with the PIN code from SMS.
  3. SubscriptionStatusNotification with EventType=APPROVED — the subscription is active.
  4. GetSubscriptionStatus — check the status at any time.
  5. CancelSubscription — cancellation initiated by the partner.

The SubscriptionID from the CreateSubscription response identifies the subscription in every other method — store it. A repeated CreateSubscription for the same number within the project is rejected with SubscriptionAlreadyCreated until the previous subscription is cancelled.

Subscription statuses

StatusMeaning
PendingCreated, waiting for the subscriber to confirm
ActiveConfirmed — by PIN or by payment
CancelledCancelled
ApprovingFailedConfirmation did not happen: PIN attempts exhausted or the card was declined
RedeliveringA charge failed, a retry follows
RenewingFailedCharge attempts exhausted — the subscription is closed
ClosedAll billing cycles are done

Sandbox test data

ParameterValue
SubscriptionProjectID2001 — other values are rejected with SECURITY_ERROR
SecretKeysubs_secret_key
PIN code1234 — fixed, the sandbox sends no SMS. Three attempts; after the third the subscription stays in ApprovingFailed forever
Failing cardsLast 4 digits 0001…0005 — insufficient funds, card blocked, limit exceeded, declined by bank, card expired
Failing numbersEnding 0001 — SubscriberNotSupported, 0002 — SubscriberInBlacklist, 0003 together with ClientIP — ClientIPMSISDNCountryNotEqual

The values above are published sandbox fixtures, suitable for testing only. Production SubscriptionProjectID and SecretKey are issued at onboarding and must never end up in client-side code or the repository.