1. Getting Started
XL DCB API for Partner
  • Getting Started
    • Introduction
    • Authentication
    • Headers
    • Recurring (Subscription)
    • On-Demand (One-Time Charge)
    • Callbacks (Webhooks)
    • Errors & Response Codes
    • Notes (Partner Guidance)
  • Subscriptions
    • Create Subscription (Initiate)
      POST
    • Confirm OTP
      POST
    • Unsubscribe
      POST
  • OnDemand
    • Create one-time charge (OTP flow)
      POST
    • Confirm OTP (execute charge)
      POST
    • Check transaction status
      GET
  1. Getting Started

Errors & Response Codes

03 - Errors & Response Codes#

Standard Response Format#

All API responses follow this consistent structure:
Success:
{
  "success": true,
  "correlation_id": "8000001a-0000-fd00-b63f-84710c7967bb",
  "code": "OTP_CONFIRMED",
  "message": "OTP Confirmed Successfully",
  "data": { ... }
}
Error:
{
  "success": false,
  "correlation_id": "8000001a-0000-fd00-b63f-84710c7967bb",
  "code": "INVALID_OTP",
  "message": "Detailed error description",
  "data": null
}

Security / Authentication Codes#

These codes are returned by the gateway before the request reaches the business logic. Applies to all endpoints.
HTTPCodeDescription
401MISSING_HEADERSOne or more mandatory headers (X-Partner-Id, X-Api-Key, X-Timestamp, X-Nonce, X-Signature) are absent.
401INVALID_TIMESTAMPX-Timestamp is outside the ±5 minute window or has an invalid format.
401UNAUTHORIZEDInvalid X-Partner-Id or X-Api-Key.
401DUPLICATE_NONCEThe X-Nonce value has already been used.
401INVALID_SIGNATUREThe computed HMAC-SHA256 signature does not match X-Signature.
429RATE_LIMIT_EXCEEDEDToo many requests per minute for this partner.

3.1 On-Demand (One-Time Charge)#

3.1.1 Create Charge (OTP Flow) — POST /on-demand/charges#

HTTPCodesuccessDescription
202CHARGE_CREATEDtrueCharge successfully initiated. OTP SMS sent to user.
400INVALID_REQUESTfalseMissing or invalid required fields in the request body.
409DUPLICATE_PARTNER_REFfalseA charge with this partner_ref_id already exists for this partner.
500CHARGE_FAILfalseUnexpected internal error. Contact support.

3.1.2 Confirm OTP (Execute Charge) — POST /on-demand/charges/{transaction_id}/otp/confirm#

HTTPCodesuccessDescription
200OTP_CONFIRMEDtrueOTP validated successfully. Payment is being processed.
400INVALID_REQUESTfalseMissing otp or payment_method in the request body.
400EXPIRED_TRANSIDfalseThe transaction has expired. User must initiate a new charge.
400PIN_OVER_ERRORfalseMaximum OTP attempts exceeded. User must initiate a new charge.
400INVALID_OTPfalseThe OTP entered by the user is incorrect.
400INVALID_MSISDNfalseThe mobile number is not valid or not registered with the carrier.
400INVALID_AMOUNTfalseThe charge amount is invalid or rejected by the payment provider.
400DUPLICATE_TRANSACTIONfalseThis transaction has already been processed.
400INVALID_TRANSACTIONfalseThe transaction ID is no longer recognized by the payment provider. Re-initiate.
404UNKNOWN_TRANSIDfalseThe transaction_id in the URL path was not found.
500MISSING_DATAfalseInternal data required to process the charge is missing. Contact support.
500GATEWAY_CONFIGURATION_ERRORfalseA payment provider configuration issue occurred. Contact support.
500INTERNAL_ERRORfalseUnexpected internal error. Contact support.

3.1.3 Check Transaction — GET /on-demand/charges/check?transaction_id={id}#

HTTPCodesuccessDescription
200CHARGE_STATUS_RETRIEVEDtrueStatus successfully retrieved from the payment provider.
400INVALID_REQUESTfalsetransaction_id query parameter is missing.
404NOT_FOUNDfalseThe transaction_id was not found or has no active token.
500INTERNAL_ERRORfalseFailed to communicate with the payment provider. Retry later.

3.2 Recurring (Subscription)#

3.2.1 Create Subscription — POST /partner-dcb/v1/subscriptions#

HTTPCodesuccessDescription
202SUBSCRIPTION_CREATEDtrueSubscription request accepted. OTP SMS sent to the user.
400INVALID_REQUESTfalseMissing or invalid required fields in the request body.
400INVALID_MSISDNfalseThe provided MSISDN is not a valid XL number.
400PRODUCT_ID_NOT_FOUNDfalseThe product_id is not registered or invalid.
400AMOUNT_FAILEDfalseThe amount does not match the registered product price.
409DUPLICATE_REF_IDfalseA subscription with this partner_ref_id already exists for this partner.
500GATEWAY_CONFIGURATION_ERRORfalseInvalid configuration at the carrier side. Contact support.
502PAYMENT_PROVIDER_ERRORfalseThe carrier could not process the request. Contact support.
503SERVICE_UNAVAILABLEfalseThe service is temporarily unavailable. Retry later.
500INTERNAL_SERVER_ERRORfalseUnexpected internal error. Contact support.

3.2.2 Confirm OTP — POST /partner-dcb/v1/subscriptions/{requestId}/otp/confirm#

HTTPCodesuccessDescription
200OTP_CONFIRMEDtrueOTP confirmed. Awaiting final activation from operator.
400INVALID_REQUESTfalseMissing otp or payment_method in the request body.
400INVALID_OTPfalseThe OTP entered by the user is incorrect.
400INSUFFICIENT_BALANCEfalseUser does not have enough balance. Note: Treated as OTP_CONFIRMED internally — the final result will be delivered via Callback.
404NOT_FOUNDfalseThe requestId in the URL path was not found.
409INVALID_STATEfalseThe subscription is in a state that does not allow OTP confirmation (e.g., already confirmed or expired).
500GATEWAY_CONFIGURATION_ERRORfalseInvalid configuration at the carrier side. Contact support.
502PAYMENT_PROVIDER_ERRORfalseAn error occurred at the carrier side during OTP processing. Contact support.
500INTERNAL_SERVER_ERRORfalseUnexpected internal error. Contact support.

3.2.3 Unsubscribe — POST /partner-dcb/v1/subscriptions/unsubscribe#

HTTPCodesuccessDescription
200UNSUBSCRIBE_ACCEPTEDtrueUnsubscribe request accepted.
400INVALID_REQUESTfalseMissing or invalid required fields in the request body.
400INVALID_MSISDNfalseThe provided MSISDN is not valid.
404SUBSCRIPTION_NOT_FOUNDfalseNo active subscription found for the given MSISDN and product_id.
409ALREADY_UNSUBSCRIBEDfalseThe subscription has already been unsubscribed.
409DUPLICATE_REQUESTfalseAn identical unsubscribe request is already in progress.
502PAYMENT_PROVIDER_ERRORfalseAn error occurred at the carrier side. Contact support.
500INTERNAL_SERVER_ERRORfalseUnexpected internal error. Contact support.
[!TIP]
For any 5xx error, contact Triyakom support and provide the transaction_id or partner_ref_id to facilitate log tracing.

Modified at 2026-05-13 03:50:43
Previous
Callbacks (Webhooks)
Next
Notes (Partner Guidance)
Built with