FAQ — subscriptions
How do I verify the signature before the first request?
Run the test vectors (subs_sigtest.) locally: subscriptions use a single HMAC pass — the key is SecretKey, the message is SubscriptionProjectID + Now. The negative vectors — the reversed concatenation order and the MD5 formula of older spec revisions — must not match. The full formula is in Request signature.
How does a subscription differ from a contract in one-time payments?
By who initiates the charge. With subscriptions the platform runs the schedule set for the project; a contract in one-time payments only binds the payment details, and the merchant starts every charge itself with a separate CreateInvoice. See Protocol overview.
How do I create a subscription paid by card or over SBP?
Pass CustomerType=Card and CustomerId in CreateSubscription — the response returns AuthorizeUrl, the payment page address; for an SBP QR code append ?useSbpQr=True to it. The ApproveSubscription step is not needed in this flow: the subscription is activated by the payment itself. See Methods.
When does the callback arrive?
On an actual status change: APPROVED after a PIN confirmation or a payment, REJECTED when the card is declined, CANCELLED after cancellation. The first delivery is delayed by 15 seconds. See Callback.
A notification arrived twice — what should I do?
Answer 200 and deduplicate on the X-Event-Id header (also RequestID): it stays the same across the delivery attempts of one event. An error in response to a duplicate makes the platform retry again.
Sandbox
Which PIN do I enter in the sandbox?
A fixed one — 1234; the sandbox sends no SMS. You get three attempts, and after the third the subscription moves to ApprovingFailed permanently. The full list of simplifications is in Sandbox ↔ Production differences.
How do I move from the sandbox to production?
The production address and credentials are issued by your i-Free manager; the signature formula and the method set are the same. What changes is collected in Sandbox ↔ Production differences.