Create subscription
POST /Http/Services/CreateSubscription.aspx
Initializes a subscription. Two branches:
- SMS_PIN —
Subscriber_MSISDNin the request (the legacy nameMSISDNis also accepted). The response containsSubscriptionIDandSubscriberAcceptanceChannel=SMS_PIN; confirm withApproveSubscriptionusing PIN1234. - Bank card and SBP —
CustomerType=CardandCustomerIdin the request. The response containsSubscriberAcceptanceChannel=AUTH_PAGEandAuthorizeUrl: redirect the subscriber there. For SBP QR payment append?useSbpQr=True.ApproveSubscriptionis not used in this branch — the subscription is activated once the payment completes.
The SubscriptionStatusNotification callback is sent on actual activation
(EventType=APPROVED), not right after creation.
A repeated call for the same Subscriber_MSISDN within a project returns the
existing subscription (the production platform answers
WRONG_PARAMS / SubscriptionAlreadyCreated).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
Now | string | yes | Current UTC time in yyyyMMddHHmmss format. |
Signature | string | yes | Request signature: LOWERCASE(HMACSHA256(SecretKey, SubscriptionProjectID + Now)). |
SubscriptionProjectID | integer (int32) | yes | Subscription project ID. |
MerchantSubsID | string | — | |
Localization | string | — | Optional. Localization of texts for the user; default ru-RU. |
Subscriber_MSISDN | string | — | Optional. User’s MSISDN to create the subscription for (or SubscriberID). Not passed for WAP activation (SubscriberAcceptanceChannel=AUTH_PAGE). The sandbox also accepts the legacy name MSISDN. |
SubscriberID | integer (int64) | — | Subscriber ID in the System, instead of Subscriber_MSISDN. For WAP activation the MSISDN is not needed: it is resolved when the user opens the activation page. |
BillingPeriod | string | — | |
BillingCount | string | — | |
BillingPeriodIntervalType | string | — | |
StartTimeUtc | string | — | Optional. Subscription activation start time (for SMS_PIN — when the PIN SMS is sent); default is the current time. Format yyyy-MM-dd HH:mm. |
BillingStartTimeUtc | string | — | Optional. Time of the first payment; by default StartTimeUtc plus the shift from the project settings. Format yyyy-MM-dd HH:mm. |
ContentProjectUID | string | — | |
SubscriptionTitle | string | — | |
ResendSmsPinIfSubscriptionAlreadyExists | string | — | Optional, default false. For SMS_PIN: when the subscription already exists, the response is still WRONG_PARAMS / SubscriptionAlreadyCreated, but the PIN SMS is sent again (no more than 2 times). |
ClientIP | string | — | IP address of the user who initiates the request. |
CustomerId | string | — | Customer ID in the merchant’s system (unique). |
CustomerType | string | — | Payment source type for the subscription: Card — bank card or SBP. |
ExpectedApprovingType | string | — | |
ExternalApprovingType | NONE · IVR · SMS · USSD · SMS_PIN · AUTH_PAGE · AUTH_PAGE_AOC · SMS_AOC | — | |
ContentLogin | string | — | |
ContentPassword | string | — | |
AdditionalParams | string | — | |
ApplyPreAuthTemplate | boolean | — | |
ExternalServiceId | string | — | |
PartnerLandingSplitId | string | — | |
LandingPageId | string | — |
Response codes
| Code | Description |
|---|---|
200 | Result in StatusName (REQUEST_ACCEPTED on success) |
500 | Internal platform error |