Verify PIN
Checks the PIN and, if the anti-fraud verdict allows, opens the subscription. This is the call that commits.
POST /api/sp/v1/dcb/subscription/verify
Request
| Field | Type | Notes |
|---|---|---|
msisdn | string | The subscriber's number. |
shortCode | string | The short code your credential is bound to. |
serviceId | integer | The service. |
spTransactionId | string | Yours to generate, unique per attempt. See Idempotency. |
pin | string | What the subscriber typed. Four digits, the same as the legacy platform. Send it as a JSON string, not a number: the field is validated as a string and a numeric value is rejected. A PIN may also begin with 0 ("0042"), which a numeric type would destroy. |
ti | string | The anti-fraud transaction identifier: the same one you used to fetch the script. |
ts | string | The matching timestamp. |
ti must be the one the script call registeredIf this ti was never used to fetch the anti-fraud script (or you generated a fresh one for this
call), you get FRAUD_TRANSACTION_UNKNOWN, on every attempt. It is not a decline and
retrying will not help. See Anti-fraud.
What happens, in order
- The PIN is checked.
- The anti-fraud verdict is obtained.
- The operator is asked whether this subscriber can be billed at all.
- The subscription is opened.
- The first charge is attempted.
The fraud check runs after the PIN proves possession and before anything is charged. That ordering is deliberate: a wrong PIN costs no fraud check, and no charge happens behind an unverified interaction.
Step 3 is new (2026-09-23) and it can refuse the whole call. If the operator's profile service
cannot answer for this number, nothing is created (no subscription, no welcome SMS) and you get
OPERATOR_UNAVAILABLE. Previously the subscription was opened anyway and the charge deferred, which
produced subscribers who were active, never charged, and indistinguishable from paying ones.
Response
{
"requestId": "01JB2K9WQ4X7YH3M8N5P6R7T8V",
"code": "OK",
"data": {
"subscriptionId": 4821,
"state": "active",
"subscribedAt": "2026-09-13T08:14:22.000000Z"
}
}
| Field | Notes |
|---|---|
subscriptionId | Ours, not yours. Useful when quoting a subscription to us. |
state | trial if a free period is running, active if the first charge succeeded. |
subscribedAt | ISO 8601. |
firstChargeOutcome | Only on CHARGE_FAILED / INSUFFICIENT_BALANCE, where the subscription exists and only the first charge did not land. "declined": the charge was attempted and refused, so prompting a top-up is appropriate. Absent on success. |
firstChargeOutcome: "deferred" no longer occurs here, changed 2026-09-23It used to mean "the operator's profile service could not be reached, and we subscribed anyway."
We no longer do that. If the operator cannot be asked, the subscription is not created and you
get OPERATOR_UNAVAILABLE instead, described below. "declined" is now the only value.
A failed first charge does not return this shape. It returns INSUFFICIENT_BALANCE or
CHARGE_FAILED with the same fields under data - see the envelope.
What can refuse it
PIN_INVALID · PIN_EXPIRED · PIN_ATTEMPTS_EXCEEDED · PIN_NOT_REQUESTED · FRAUD_BLOCKED ·
FRAUD_TRANSACTION_UNKNOWN · FRAUD_CHECK_UNAVAILABLE (retryable) · OPERATOR_UNAVAILABLE
(retryable) · ALREADY_SUBSCRIBED.
FRAUD_CHECK_UNAVAILABLE consumes nothing. Retry with the same spTransactionId and the same
PIN: both are still valid.
OPERATOR_UNAVAILABLE: 503, retryable, and nothing was created
{
"requestId": "01JB2K9WQ4X7YH3M8N5P6R7T8V",
"code": "OPERATOR_UNAVAILABLE",
"retryable": true,
"message": "The operator could not be asked about this subscriber, so nothing was subscribed and nothing was charged. Retry with a NEW PIN — this one was already spent."
}
No data.subscriptionId, because there is no subscription. The rule you already have still
decides it: read data.subscriptionId, not the code.
⚠️ The PIN was spent before this point, so the retry needs a new one. You may reuse the same
spTransactionId (nothing reached a gateway, so the idempotency claim is released), but you must
issue a fresh PIN first. Retrying with the old PIN meets PIN_INVALID.
If this persists for one number while others succeed, it is very likely that number rather than an outage: a test MSISDN, or one outside the scope of the environment you are calling. Check that before reporting an operator fault.