Developer Documentations
API's, Self Help
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable.
API End Point Name URI
Messaging
| SMSMT URL | Please Request |
| SMSMO URL | To Be Provided By Merchant |
Send SMS
HTTP Method POST
Operation
Used by merchant to send information messages to the user.
Request
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"smsRequestId":"[merchantCode]00003b26b140600ce5cc9296",
"subscriptionId":"[merchantCode]00003b26b140600ce5cc9296",
"sender":"[senderId]",
"receiver":"9641234567890",
"language":"En",
"msgBody":"Test Message",
"aggregatorId":"[merchantName]",
"merchantId":"[merchantName]",
"product":"[productName]",
"subProduct":"[subProductName]"
}'
Header Parameters
API Messaging Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
API Messaging Request Header Parameters
| Name | Description | Required |
|---|---|---|
| authkey | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| smsRequestId | String | A unique identifier of the sendSMS transaction generated by [merchantName]. It should be preceded by [merchantCode] as prefix. | |
| subscriptionId | String |
A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. Can be empty in the initial Client identification flow but should be present in later SendSMS calls. * subscriptionId should be “SP” for onetime payment. |
|
| sender | String | Sender. Can be a short code, long code or text originator. | |
| receiver | String | Country code + the user’s mobile phone number in international format. | |
| language | String | Message language “Ar” for Arabic, “En” for English. | |
| msgBody | String | Message body of the MT in UTF-8 encoding. | |
| aggregatorId | String | The northbound aggregator partner. | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case. | |
| product | String | Identifier of the product, in our case “[productName]”. | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| SID | String | The Service ID (Will be provided by FOO) Mandatory in case of Single Purchase Services in KSA and KW flows. |
|
| PID | String | The Product ID (Will be provided by FOO). Mandatory in case of Single Purchase Services in KSA and KW flows. |
Response
{
"status": "1",
"statusDetail": "Sms successfully sent."
}
SMSMO
In the following section we will cover the SMS MO guide of Dizlee API Specification Messaging.
Request
| HTTP Method | POST |
| Operation | Used by Telco Operator to send the user sub/unsub messages to the merchant |
curl --location --request POST 'https://[MerchantEndpoint]' \
--header 'authkey: [MerchantAuthKey]' \
--header 'Content-Type: application/json' \
--data-raw '{
"Sender": "9641234567890",
"Destination": "[SC]",
"MessageType": "1",
"MessageText": "014"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| authkey | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| sender | String | The MSISDN that sent the SMS. | |
| destination | String | The Short code/number the SMS was sent to. | |
| messageType | String | The SMS language. “0” for English and “1” for Arabic. | |
| messageText | String | The content of the SMS. |
Response
Request Acknowledgement with 200 OK from the merchant
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -303 | Sending SMS Failed. | Sending SMS Failed. |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable.
API End Point Name URI
Messaging
| SMSMT URL | Please Request |
| SMSMO URL | To Be Provided By Merchant |
Send SMS
HTTP Method POST
Operation
Used by merchant to send information messages to the user.
Request
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"smsRequestId":"[merchantCode]00003b26b140600ce5cc9296",
"subscriptionId":"[merchantCode]00003b26b140600ce5cc9296",
"sender":"[senderId]",
"receiver":"9641234567890",
"language":"En",
"msgBody":"Test Message",
"aggregatorId":"[merchantName]",
"merchantId":"[merchantName]",
"product":"[productName]",
"subProduct":"[subProductName]"
}'
Header Parameters
API Messaging Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
API Messaging Request Header Parameters
| Name | Description | Required |
|---|---|---|
| authkey | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| smsRequestId | String | A unique identifier of the sendSMS transaction generated by [merchantName]. It should be preceded by [merchantCode] as prefix. | |
| subscriptionId | String |
A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. Can be empty in the initial Client identification flow but should be present in later SendSMS calls. * subscriptionId should be “SP” for onetime payment. |
|
| sender | String | Sender. Can be a short code, long code or text originator. | |
| receiver | String | Country code + the user’s mobile phone number in international format. | |
| language | String | Message language “Ar” for Arabic, “En” for English. | |
| msgBody | String | Message body of the MT in UTF-8 encoding. | |
| aggregatorId | String | The northbound aggregator partner. | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case. | |
| product | String | Identifier of the product, in our case “[productName]”. | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| SID | String | The Service ID (Will be provided by FOO) Mandatory in case of Single Purchase Services in KSA and KW flows. |
|
| PID | String | The Product ID (Will be provided by FOO). Mandatory in case of Single Purchase Services in KSA and KW flows. |
Response
{
"status": "1",
"statusDetail": "Sms successfully sent."
}
SMSMO
In the following section we will cover the SMS MO guide of Dizlee API Specification Messaging.
Request
| HTTP Method | POST |
| Operation | Used by Telco Operator to send the user sub/unsub messages to the merchant |
curl --location --request POST 'https://[MerchantEndpoint]' \
--header 'authkey: [MerchantAuthKey]' \
--header 'Content-Type: application/json' \
--data-raw '{
"Sender": "9641234567890",
"Destination": "[SC]",
"MessageType": "1",
"MessageText": "014"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| authkey | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| sender | String | The MSISDN that sent the SMS. | |
| destination | String | The Short code/number the SMS was sent to. | |
| messageType | String | The SMS language. “0” for English and “1” for Arabic. | |
| messageText | String | The content of the SMS. |
Response
Request Acknowledgement with 200 OK from the merchant
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -303 | Sending SMS Failed. | Sending SMS Failed. |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API end Point Name URI
Charging (SP)
| Charge URL | Please Request |
| Refund URL | Please Request |
Charging (SP)
Request
HTTP Method POST
Operation Used by merchant to charge the user
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"SP",
"userId":"964123456789",
"type":"SinglePurchase",
"firstCharge":true,
"amount":0.001,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| chargeRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | The type of the Charge request it can be: “SinglePurchase” (one time purchase) | |
| firstCharge | Boolean | Value: true = first successful charging event (amount > 0) or in case of Single Purchase charges | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code) | |
| totalCharge_p30d | Decimal | Sum of total charge in the last 30 days | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case if there are multiple subproducts types under the same product. | |
| channel | String | The channel of subscription, it can be one of the following: WEB, SMS, MobileApp or CC | |
| promoter | String | Specifies the promoter of the campaign. Can be [Merchant] or [Telco Operator] | |
| vatAmount | int | The tax value: For Prepaid it will contain the tax value. For Postpaid it will be 0. Mandatory for some Telco Operator | |
| billingType | String | billingType should be extracted from the getProfile response. Can be: [Postpaid, Prepaid]. Mandatory for some Telco Operator | |
| profileRequestId | String | profileRequestId should be the request Id used in getProfile to retrieve the billingType. Mandatory for some Telco Operator | |
| SID | String | The service ID (Will be provided by Dizlee). Mandatory for some Telco Operator | |
| PID | String | The Product ID (Will be provided by Dizlee). Mandatory for some Telco Operator |
Response1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "29320"
}
Response3
{
"status": "-304",
"statusDetail": "Operation Failed. Insufficient Funds.",
"chargeResponseId": "-1"
}
Response Parameters
Name |
Type |
Description |
Required |
|---|---|---|---|
status |
String |
“1” if successful Operation. “ERROR_CODE” in case of fail | |
status details |
String |
Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail | |
chargeResponseId |
String |
This is Telco OPCO generated identification of the Charge Response operation. Can be used within the refund request if refund requires OPCO chargeId. |
Refund
Request
API Charging Refund Request
| HTTP Method | POST |
| Operation | Used by Merchant to refund the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"refundRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"SP",
"transactionId":"8635081281569934573",
"chargeId":"8635081281569934573",
"userId":"964123456789",
"amount":0.001,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"reason":"test",
"purpose":"[Purpose]"
}'
Header Parameters
API Charging Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
API Charging Request Parameters
| Name | Type | Description | Required |
| refundRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| transactionId | String | The identifier of the transaction to be refunded, generated by the Merchant in the earlier purchase request. It should be preceded by the [merchantCode] as prefix. | |
| chargeResponseId | String | This is OPCO generated identification of the Charge Response operation. Can be used within the refund request if refund requires OPCO chargeId. | |
| amount | Decimal | Amount to be refunded. It must be less than or equal to the total amount pending to refund on the original transaction. If not filled, the full amount is refunded. | |
| currency | String | The currency code. For example “KWD” | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case if there are multiple subproducts types under the same product. | |
| reason | String | The refund reason | |
| purpose | String | Should be as [merchantName]-[productName] |
API Messaging Request
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"smsRequestId":"[merchantCode]00003b26b140600ce5cc9296",
"subscriptionId":"[merchantCode]00003b26b140600ce5cc9296",
"sender":"[senderId]",
"receiver":"9641234567890",
"language":"En",
"msgBody":"Test Message",
"aggregatorId":"[merchantName]",
"merchantId":"[merchantName]",
"product":"[productName]",
"subProduct":"[subProductName]"
}'
Response1
API Charging Refund Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response2
API Charging Refund Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
API Charging Refund Response Parameters
| Name | Type | Description | Required |
| status | String | “1” if successful Operation “ERROR_CODE” in case of fail |
|
| statusDetail | String | Represent the description of the request “Successful Operation” in case of Success “ERROR_DESCRIPTION” in case of Fail |
Response Codes
API Charging Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -302 | DOB is not allowed for the user | Operation Failed. Subscription Failed. |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -306 | User status changed to not allowed for DOB during the renewal process | Operation Failed. Remove Subscription. |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -317 | Charge – subscription – failed | User is not eligible |
| -318 | Charge failed | Past 30 days charge limit exceeded |
| -319 | Refund Failed | Operation Failed. Charge transaction not found. |
| -320 | Refund – Failed | Operation Failed. Charge transaction already refunded |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -323 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -324 | Charge / Eligibility failed | User is not eligible – Inactive Status |
| -325 | Charge / Eligibility failed | User is not eligible – Has Stop SLA Service |
| -326 | Charge / Eligibility failed | User is not eligible – Corporate Customer |
| -327 | Refund Failed | Operation Failed. Refund rejected. |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -333 | Subscription is not allowed from this Channel | Subscription is not allowed from this Channel |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API end Point Name URI
Charging (SP)
| Charge URL | Please Request |
| Refund URL | Please Request |
Charging (SP)
Request
HTTP Method POST
Operation Used by merchant to charge the user
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"SP",
"userId":"964123456789",
"type":"SinglePurchase",
"firstCharge":true,
"amount":0.001,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| chargeRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | The type of the Charge request it can be: “SinglePurchase” (one time purchase) | |
| firstCharge | Boolean | Value: true = first successful charging event (amount > 0) or in case of Single Purchase charges | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code) | |
| totalCharge_p30d | Decimal | Sum of total charge in the last 30 days | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case if there are multiple subproducts types under the same product. | |
| channel | String | The channel of subscription, it can be one of the following: WEB, SMS, MobileApp or CC | |
| promoter | String | Specifies the promoter of the campaign. Can be [Merchant] or [Telco Operator] | |
| vatAmount | int | The tax value: For Prepaid it will contain the tax value. For Postpaid it will be 0. Mandatory for some Telco Operator | |
| billingType | String | billingType should be extracted from the getProfile response. Can be: [Postpaid, Prepaid]. Mandatory for some Telco Operator | |
| profileRequestId | String | profileRequestId should be the request Id used in getProfile to retrieve the billingType. Mandatory for some Telco Operator | |
| SID | String | The service ID (Will be provided by Dizlee). Mandatory for some Telco Operator | |
| PID | String | The Product ID (Will be provided by Dizlee). Mandatory for some Telco Operator |
Response1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "29320"
}
Response3
{
"status": "-304",
"statusDetail": "Operation Failed. Insufficient Funds.",
"chargeResponseId": "-1"
}
Response Parameters
Name |
Type |
Description |
Required |
|---|---|---|---|
status |
String |
“1” if successful Operation. “ERROR_CODE” in case of fail | |
status details |
String |
Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail | |
chargeResponseId |
String |
This is Telco OPCO generated identification of the Charge Response operation. Can be used within the refund request if refund requires OPCO chargeId. |
Refund
Request
API Charging Refund Request
| HTTP Method | POST |
| Operation | Used by Merchant to refund the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"refundRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"SP",
"transactionId":"8635081281569934573",
"chargeId":"8635081281569934573",
"userId":"964123456789",
"amount":0.001,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"reason":"test",
"purpose":"[Purpose]"
}'
Header Parameters
API Charging Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
API Charging Request Parameters
| Name | Type | Description | Required |
| refundRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| transactionId | String | The identifier of the transaction to be refunded, generated by the Merchant in the earlier purchase request. It should be preceded by the [merchantCode] as prefix. | |
| chargeResponseId | String | This is OPCO generated identification of the Charge Response operation. Can be used within the refund request if refund requires OPCO chargeId. | |
| amount | Decimal | Amount to be refunded. It must be less than or equal to the total amount pending to refund on the original transaction. If not filled, the full amount is refunded. | |
| currency | String | The currency code. For example “KWD” | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case if there are multiple subproducts types under the same product. | |
| reason | String | The refund reason | |
| purpose | String | Should be as [merchantName]-[productName] |
API Messaging Request
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"smsRequestId":"[merchantCode]00003b26b140600ce5cc9296",
"subscriptionId":"[merchantCode]00003b26b140600ce5cc9296",
"sender":"[senderId]",
"receiver":"9641234567890",
"language":"En",
"msgBody":"Test Message",
"aggregatorId":"[merchantName]",
"merchantId":"[merchantName]",
"product":"[productName]",
"subProduct":"[subProductName]"
}'
Response1
API Charging Refund Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response2
API Charging Refund Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
API Charging Refund Response Parameters
| Name | Type | Description | Required |
| status | String | “1” if successful Operation “ERROR_CODE” in case of fail |
|
| statusDetail | String | Represent the description of the request “Successful Operation” in case of Success “ERROR_DESCRIPTION” in case of Fail |
Response Codes
API Charging Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -302 | DOB is not allowed for the user | Operation Failed. Subscription Failed. |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -306 | User status changed to not allowed for DOB during the renewal process | Operation Failed. Remove Subscription. |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -317 | Charge – subscription – failed | User is not eligible |
| -318 | Charge failed | Past 30 days charge limit exceeded |
| -319 | Refund Failed | Operation Failed. Charge transaction not found. |
| -320 | Refund – Failed | Operation Failed. Charge transaction already refunded |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -323 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -324 | Charge / Eligibility failed | User is not eligible – Inactive Status |
| -325 | Charge / Eligibility failed | User is not eligible – Has Stop SLA Service |
| -326 | Charge / Eligibility failed | User is not eligible – Corporate Customer |
| -327 | Refund Failed | Operation Failed. Refund rejected. |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -333 | Subscription is not allowed from this Channel | Subscription is not allowed from this Channel |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
Syntornization
| userStatusChange URL | Please Request |
| userStatusSync | Please Request |
| Notify URL | Please Request |
userStatusChange
UserStatusChange Request
HTTP Method POST
Operation Used by Telco Operator to sub/unsub a user in the merchant side
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"requestId":"8635081281569934573",
"userId":"964123456789",
"action":"subscribe",
"product":"[Product]",
"productId":"[Product]",
"channel":"CC"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| AuthCode | authentication key sent from Merchant side |
Request Parameters
A unique identifier of the charge
| Name | Type | Description | Required |
|---|---|---|---|
| requestId | String | Transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| userId | String | Countrycode + MSISDN of the user | |
| action | String | subscribe = subscribe the user and grant service access. unsubscribe = the service will remain active until the end of the current subscription cycle. | |
| Channel | String | The channel of action, it can be: MobileApp or CC | |
| product | String | Identifier of the product, in our case “[productName]” | |
| productId | String | The identifier of the product on Telco operator side. |
Response
Merchant should acknowledge the request followed by notify request.
On success, Merchant should send back HTTP 200 with the subscriptionId created after sync request with action subscribe. Any other HTTP status will be treated as error.
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "-308",
"statusDetail": "Unknown error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. |
userStatusSync
Request
UserStatusSync Request
HTTP Method POST
Operation Used by Telco Operator that manage the user life cycle to synchronize the user status with the merchant.
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"subscribe",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"freeOfCharge":"true",
"channelId":"2"
}'
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"unsubscribe",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"channelId":"2"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"update",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"statusChange":"activate",
"channelId":"99"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| authCode | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| userId | String | Countrycode + MSISDN of the user | |
| action | String | subscribe, unsubscribe, or update | |
| opcoServiceId | String | Operator defined value | |
| opcoProduct | String | Operator defined value | |
| opcoSubProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| opcoTransactionId | String | Operator defined value | |
| statusChange | String | Only present in case of action=update: activate or deactivate | |
| freeOfCharge | boolean | true or false. Only present in case of action=subscribe. This parameter is received only when the user is in the free trial. | |
| channelId | String | Operation channel. 1: web, 2: SMS, 102: CC Portal, 99: Other |
Notify
Request
Notify - Request
HTTP Method POST
Operation Used by merchant to notify Dizlee by the user action (Subscription, Unsubscription, etc.)
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"subscribe",
"channel":"WEB"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"correlationId":"31564865456",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"FlaggedToUnsub",
"status":"success",
"channel":"WEB",
"productId":"9619",
"revokingServiceDate":"05-03-2021 10:00:00"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"correlationId":"31564865456",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"Subscribe",
"status":"failure",
"channel":"WEB",
"productId":"9619",
"failReason":"insufficient balance",
"failErrorCode":"-304"
}'
Header Parameter
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameter
| Name | Type | Description | Required |
|---|---|---|---|
| notifyRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| productId | String | Identifier of the product | |
| correlationId | String | Should contain the requestId received in the userStatusChange request. It can be empty for subscriptions done through the web channel. | |
| failReason | String | If the status is failure, this should contain the failure cause. | |
| failErroCode | String | If the status is failure, this should contain the failure error code. | |
| revokingServiceDate | String | If the type is FlaggedToUnsub, this should contain the date of revoking the user access to the service. |
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
Syntornization
| userStatusChange URL | Please Request |
| userStatusSync | Please Request |
| Notify URL | Please Request |
userStatusChange
UserStatusChange Request
HTTP Method POST
Operation Used by Telco Operator to sub/unsub a user in the merchant side
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"requestId":"8635081281569934573",
"userId":"964123456789",
"action":"subscribe",
"product":"[Product]",
"productId":"[Product]",
"channel":"CC"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| AuthCode | authentication key sent from Merchant side |
Request Parameters
A unique identifier of the charge
| Name | Type | Description | Required |
|---|---|---|---|
| requestId | String | Transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| userId | String | Countrycode + MSISDN of the user | |
| action | String | subscribe = subscribe the user and grant service access. unsubscribe = the service will remain active until the end of the current subscription cycle. | |
| Channel | String | The channel of action, it can be: MobileApp or CC | |
| product | String | Identifier of the product, in our case “[productName]” | |
| productId | String | The identifier of the product on Telco operator side. |
Response
Merchant should acknowledge the request followed by notify request.
On success, Merchant should send back HTTP 200 with the subscriptionId created after sync request with action subscribe. Any other HTTP status will be treated as error.
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "-308",
"statusDetail": "Unknown error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. |
userStatusSync
Request
UserStatusSync Request
HTTP Method POST
Operation Used by Telco Operator that manage the user life cycle to synchronize the user status with the merchant.
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"subscribe",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"freeOfCharge":"true",
"channelId":"2"
}'
curl --location --request POST 'https://[Merchant Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"unsubscribe",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"channelId":"2"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"userId":"96412345678",
"action":"update",
"opcoServiceId":"123310169",
"opcoProduct":"101633239",
"opcosubProduct":"[subProductName]",
"opcoTransactionId":"035288953320233",
"statusChange":"activate",
"channelId":"99"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| authCode | authentication key sent from Merchant side |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| userId | String | Countrycode + MSISDN of the user | |
| action | String | subscribe, unsubscribe, or update | |
| opcoServiceId | String | Operator defined value | |
| opcoProduct | String | Operator defined value | |
| opcoSubProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| opcoTransactionId | String | Operator defined value | |
| statusChange | String | Only present in case of action=update: activate or deactivate | |
| freeOfCharge | boolean | true or false. Only present in case of action=subscribe. This parameter is received only when the user is in the free trial. | |
| channelId | String | Operation channel. 1: web, 2: SMS, 102: CC Portal, 99: Other |
Notify
Request
Notify - Request
HTTP Method POST
Operation Used by merchant to notify Dizlee by the user action (Subscription, Unsubscription, etc.)
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"subscribe",
"channel":"WEB"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"correlationId":"31564865456",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"FlaggedToUnsub",
"status":"success",
"channel":"WEB",
"productId":"9619",
"revokingServiceDate":"05-03-2021 10:00:00"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"notifyRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"correlationId":"31564865456",
"userId":"964123456789",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"type":"Subscribe",
"status":"failure",
"channel":"WEB",
"productId":"9619",
"failReason":"insufficient balance",
"failErrorCode":"-304"
}'
Header Parameter
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameter
| Name | Type | Description | Required |
|---|---|---|---|
| notifyRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| productId | String | Identifier of the product | |
| correlationId | String | Should contain the requestId received in the userStatusChange request. It can be empty for subscriptions done through the web channel. | |
| failReason | String | If the status is failure, this should contain the failure cause. | |
| failErroCode | String | If the status is failure, this should contain the failure error code. | |
| revokingServiceDate | String | If the type is FlaggedToUnsub, this should contain the date of revoking the user access to the service. |
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
Subscription
| Charge URL | Please Request |
| Subscriber URL | Please Request |
Charge
Request
| HTTP Method | POST |
| Operation | Used by merchant to charge/subscribe the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"type":"Subscription",
"firstCharge":true,
"freeOfCharge":"true",
"freeTrialPeriod":"1d",
"amount":0,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"type":"Renewal",
"firstCharge":false,
"freeOfCharge":"false",
"amount":0.001,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| chargeRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | The type of the charge request can be “Subscription” (first subscription) or “Renewal” (after first subscription). | |
| firstCharge | Boolean | true = first successful charging event (amount > 0) or in case of single purchase charges. | |
| freeOfCharge | Boolean | Mandatory in case of free trial period or promotion. Values are True or False. | |
| freeTrialPeriod | String | Linked to freeOfCharge trial period. Examples: 1d = 1 day, 2w = 2 weeks, 2m = 2 months. | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code). | |
| totalCharge_p30d | Decimal | Sum of total charge in the last 30 days | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| channel | String | The channel of subscription. It can be WEB, SMS, MobileApp, or CC. | |
| promoter | String | Specifies the promoter of the campaign. Can be [Merchant] or [Telco Operator]. | |
| vatAmount | int | The tax value. For Prepaid it contains the tax value; for Postpaid it will be 0. Mandatory for some Telco Operator | |
| billingType | String | billingType should be extracted from the getProfile response. Can be [Postpaid, Prepaid]. Mandatory for some Telco Operator | |
| profileRequestId | String | profileRequestId should be the request ID used in getProfile to retrieve the billingType. Mandatory for some Telco Operator | |
| SID | String | The service ID (will be provided by Dizlee). Mandatory for some Telco Operator | |
| PID | String | The product ID (will be provided by Dizlee). Mandatory for some Telco Operator |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "29320"
}
Response 3
{
"status": "-304",
"statusDetail": "Operation Failed. Insufficient Funds.",
"chargeResponseId": "-1"
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. | |
| chargeResponseId | String | This is Telco OPCO generated identification of the Charge Response operation. It can be used within the refund request if refund requires OPCO chargeId. |
Subscriber
Request
Subscriber Request
| HTTP Method | POST |
| Operation | Used by merchant to unsubscribe the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"subRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"DVO00003b26b140600254",
"type":"Subscribe",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"promoter":"merchant or Telco operator",
"channel":"WEB"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| subRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | Type of the subscribe request. It can be “Subscribe” or “Unsubscribe”. | |
| SID | String | The service ID (will be provided by Dizlee) | |
| PID | String | The product ID (will be provided by Dizlee) | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| promoter | String | Specifies the promoter of the campaign. Can be [merchantCode] or [countryInitials]. | |
| channel | String | The channel of subscription. It can be WEB, SMS, MobileApp, or CC. |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. |
Response Codes
| CODE | TYPE | DESCRIPTION |
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -302 | DOB is not allowed for the user | Operation Failed. Subscription Failed. |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -306 | User status changed to not allowed for DOB during the renewal process | Operation Failed. Remove Subscription. |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -317 | Charge – subscription – failed | User is not eligible |
| -318 | Charge failed | Past 30 days charge limit exceeded |
| -319 | Refund Failed | Operation Failed. Charge transaction not found. |
| -320 | Refund – Failed | Operation Failed. Charge transaction already refunded |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -323 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -324 | Charge / Eligibility failed | User is not eligible – Inactive Status |
| -325 | Charge / Eligibility failed | User is not eligible – Has Stop SLA Service |
| -326 | Charge / Eligibility failed | User is not eligible – Corporate Customer |
| -327 | Refund Failed | Operation Failed. Refund rejected. |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -333 | Subscription is not allowed from this Channel | Subscription is not allowed from this Channel |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
Subscription
| Charge URL | Please Request |
| Subscriber URL | Please Request |
Charge
Request
| HTTP Method | POST |
| Operation | Used by merchant to charge/subscribe the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"type":"Subscription",
"firstCharge":true,
"freeOfCharge":"true",
"freeTrialPeriod":"1d",
"amount":0,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"chargeRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"type":"Renewal",
"firstCharge":false,
"freeOfCharge":"false",
"amount":0.001,
"currency":"IQD",
"totalCharge_p30d":0,
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"channel":"WEB",
"promoter":"[Merchant or Telco]"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| chargeRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | The type of the charge request can be “Subscription” (first subscription) or “Renewal” (after first subscription). | |
| firstCharge | Boolean | true = first successful charging event (amount > 0) or in case of single purchase charges. | |
| freeOfCharge | Boolean | Mandatory in case of free trial period or promotion. Values are True or False. | |
| freeTrialPeriod | String | Linked to freeOfCharge trial period. Examples: 1d = 1 day, 2w = 2 weeks, 2m = 2 months. | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code). | |
| totalCharge_p30d | Decimal | Sum of total charge in the last 30 days | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| channel | String | The channel of subscription. It can be WEB, SMS, MobileApp, or CC. | |
| promoter | String | Specifies the promoter of the campaign. Can be [Merchant] or [Telco Operator]. | |
| vatAmount | int | The tax value. For Prepaid it contains the tax value; for Postpaid it will be 0. Mandatory for some Telco Operator | |
| billingType | String | billingType should be extracted from the getProfile response. Can be [Postpaid, Prepaid]. Mandatory for some Telco Operator | |
| profileRequestId | String | profileRequestId should be the request ID used in getProfile to retrieve the billingType. Mandatory for some Telco Operator | |
| SID | String | The service ID (will be provided by Dizlee). Mandatory for some Telco Operator | |
| PID | String | The product ID (will be provided by Dizlee). Mandatory for some Telco Operator |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "29320"
}
Response 3
{
"status": "-304",
"statusDetail": "Operation Failed. Insufficient Funds.",
"chargeResponseId": "-1"
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. | |
| chargeResponseId | String | This is Telco OPCO generated identification of the Charge Response operation. It can be used within the refund request if refund requires OPCO chargeId. |
Subscriber
Request
Subscriber Request
| HTTP Method | POST |
| Operation | Used by merchant to unsubscribe the user |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"subRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"DVO00003b26b140600254",
"type":"Subscribe",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"promoter":"merchant or Telco operator",
"channel":"WEB"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| subRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| type | String | Type of the subscribe request. It can be “Subscribe” or “Unsubscribe”. | |
| SID | String | The service ID (will be provided by Dizlee) | |
| PID | String | The product ID (will be provided by Dizlee) | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproduct types under the same product. | |
| promoter | String | Specifies the promoter of the campaign. Can be [merchantCode] or [countryInitials]. | |
| channel | String | The channel of subscription. It can be WEB, SMS, MobileApp, or CC. |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represents the description of the request: “Successful Operation” in case of success, “ERROR_DESCRIPTION” in case of fail. |
Response Codes
| CODE | TYPE | DESCRIPTION |
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -302 | DOB is not allowed for the user | Operation Failed. Subscription Failed. |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -306 | User status changed to not allowed for DOB during the renewal process | Operation Failed. Remove Subscription. |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -311 | Bad MSISDN | User not found. |
| -317 | Charge – subscription – failed | User is not eligible |
| -318 | Charge failed | Past 30 days charge limit exceeded |
| -319 | Refund Failed | Operation Failed. Charge transaction not found. |
| -320 | Refund – Failed | Operation Failed. Charge transaction already refunded |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -323 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -324 | Charge / Eligibility failed | User is not eligible – Inactive Status |
| -325 | Charge / Eligibility failed | User is not eligible – Has Stop SLA Service |
| -326 | Charge / Eligibility failed | User is not eligible – Corporate Customer |
| -327 | Refund Failed | Operation Failed. Refund rejected. |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -333 | Subscription is not allowed from this Channel | Subscription is not allowed from this Channel |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
ManageOTP
| GenerateOTP URL | Please Request |
| ValidateOTP URL | Please Request |
GenerateOTP
Create pages from scratch by dragging and dropping customizable building blocks. This system simplifies web design, making it accessible to all skill levels. Combine headers, images, and text sections to build cohesive layouts quickly and efficiently.
Request
| HTTP Method | POST |
| Operation | Used by merchant to Generate the OTP on the Telco Operator |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"genRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"amount":0,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"actionType":"1"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | Required |
| HTTP_MSISDN | mobile phone number in international format | Required |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| genRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | Required |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | Required |
| userId | String | Countrycode + MSISDN of the user | Required |
| SID | String | The service ID (Will be provided by Dizlee) | Required |
| PID | String | The product ID (Will be provided by Dizlee) | Required |
| aggregatorId | String | The northbound aggregator partner | Required |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | Required |
| product | String | Identifier of the product, in our case “[productName]” | Required |
| subProduct | String | Identifier of the subproduct in case there are multiple subproducts types under the same product. | Required |
| actionType | String | Always “1” to generate the OTP | Required |
| amount | Decimal | Charge amount | Optional |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code) | Optional |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "5f37521c01554fc6ba65131e383cd242"
}
Response 2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeId": "29320"
}
Response 3
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeId": "29320"
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful Operation. “ERROR_CODE” in case of fail. | Required |
| statusDetail | String | Represent the description of the request. “Successful Operation” in case of Success. “ERROR_DESCRIPTION” in case of Fail. | Required |
| chargeId | String | Returned only in case of Single Purchase in some Telco Operators. | Optional |
ValidateOTP
Request
| HTTP Method | POST |
| Operation | Used by Merchant to Validate the OTP sent by user and to charge him accordingly |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"valRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"DVO00003b26b140600254",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"amount":0,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"authCode":"123",
"chargeId":"1232564879"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| valRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| SID | String | The service ID (Will be provided by Dizlee) | |
| PID | String | The Product ID (Will be provided by Dizlee) | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproducts types under the same product. | |
| authCode | String | The OTP entered by the user. OTP is received by the user when GenerateOTP is requested. | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code, for example "KWD" (ISO-4217 code) | |
| chargeId | String | Required only in case of onetime payment services by some Telco Operators. “chargeId” is returned in the GenerateOTP API response when subscriptionId = SP. |
Response 1
Coming soon
Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful Operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represent the description of the request. “Successful Operation” in case of Success. “ERROR_DESCRIPTION” in case of Fail. | |
| chargeResponseId | String | This is Telco generated identification of the Charge Response operation. It will be used within the refund request. |
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -309 | Incorrect OTP | The SMS verification code is incorrect. |
| -310 | OTP has expired | The SMS verification code has expired. |
| -311 | Bad MSISDN | User not found. |
| -312 | User is not subscribed to product. | User is not subscribed to the specified product |
| -314 | Product is not in the validity period. | The product is not in the validity period. The product may have expired or have not taken effect. |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |
Info
All APIs discussed under this section are RESTful APIs with a JSON payload where applicable. All Inbound and Outbound requests must use secure connection (https).
API End Point Name URI
ManageOTP
| GenerateOTP URL | Please Request |
| ValidateOTP URL | Please Request |
GenerateOTP
Create pages from scratch by dragging and dropping customizable building blocks. This system simplifies web design, making it accessible to all skill levels. Combine headers, images, and text sections to build cohesive layouts quickly and efficiently.
Request
| HTTP Method | POST |
| Operation | Used by merchant to Generate the OTP on the Telco Operator |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"genRequestId":"8635081281569934573",
"subscriptionId":"8635081281569934573",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"amount":0,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"actionType":"1"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | Required |
| HTTP_MSISDN | mobile phone number in international format | Required |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| genRequestId | String | A unique identifier of the charge transaction generated by [MERCHANTNAME]. It should be preceded by the [merchantCode] as prefix. | Required |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. It should be preceded by [merchantCode] as prefix. subscriptionId should be “SP” for onetime payment. | Required |
| userId | String | Countrycode + MSISDN of the user | Required |
| SID | String | The service ID (Will be provided by Dizlee) | Required |
| PID | String | The product ID (Will be provided by Dizlee) | Required |
| aggregatorId | String | The northbound aggregator partner | Required |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | Required |
| product | String | Identifier of the product, in our case “[productName]” | Required |
| subProduct | String | Identifier of the subproduct in case there are multiple subproducts types under the same product. | Required |
| actionType | String | Always “1” to generate the OTP | Required |
| amount | Decimal | Charge amount | Optional |
| currency | String | The currency code. For example “KWD” (ISO-4217 Code) | Optional |
Response 1
{
"status": "1",
"statusDetail": "Successful Operation."
}
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeResponseId": "5f37521c01554fc6ba65131e383cd242"
}
Response 2
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeId": "29320"
}
Response 3
{
"status": "1",
"statusDetail": "Successful Operation.",
"chargeId": "29320"
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful Operation. “ERROR_CODE” in case of fail. | Required |
| statusDetail | String | Represent the description of the request. “Successful Operation” in case of Success. “ERROR_DESCRIPTION” in case of Fail. | Required |
| chargeId | String | Returned only in case of Single Purchase in some Telco Operators. | Optional |
ValidateOTP
Request
| HTTP Method | POST |
| Operation | Used by Merchant to Validate the OTP sent by user and to charge him accordingly |
curl --location --request POST 'https://[Dizlee API Endpoint]' \
--header 'Content-Type: application/json' \
--header 'apikey: {APIKey}' \
--header 'HTTP_MSISDN: 9641234567890' \
--data-raw '{
"valRequestId":"DVO00003b26b140600ce5cc9296",
"subscriptionId":"DVO00003b26b140600254",
"userId":"964123456789",
"SID":"123",
"PID":"456",
"amount":0,
"currency":"IQD",
"aggregatorId":"[aggregatorName]",
"merchantId":"[merchantName]",
"product":"[Product]",
"subProduct":"[subProduct]",
"authCode":"123",
"chargeId":"1232564879"
}'
Header Parameters
| Name | Description | Required |
|---|---|---|
| apikey | authentication key sent from Dizlee side | |
| HTTP_MSISDN | mobile phone number in international format |
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| valRequestId | String | A unique identifier of the refund transaction generated by [merchantName]. It should be preceded by the [merchantCode] as prefix. | |
| subscriptionId | String | A unique identifier that represents the user lifecycle since subscription. Should be “SP” for onetime payment. | |
| userId | String | Countrycode + MSISDN of the user | |
| SID | String | The service ID (Will be provided by Dizlee) | |
| PID | String | The Product ID (Will be provided by Dizlee) | |
| aggregatorId | String | The northbound aggregator partner | |
| merchantId | String | The Owner of the product. [MERCHANTNAME] in our case | |
| product | String | Identifier of the product, in our case “[productName]” | |
| subProduct | String | Identifier of the subproduct in case there are multiple subproducts types under the same product. | |
| authCode | String | The OTP entered by the user. OTP is received by the user when GenerateOTP is requested. | |
| amount | Decimal | Charge amount | |
| currency | String | The currency code, for example "KWD" (ISO-4217 code) | |
| chargeId | String | Required only in case of onetime payment services by some Telco Operators. “chargeId” is returned in the GenerateOTP API response when subscriptionId = SP. |
Response 1
Coming soon
Response 2
{
"status": "1",
"statusDetail": "Unknown Error."
}
Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| status | String | “1” if successful Operation. “ERROR_CODE” in case of fail. | |
| statusDetail | String | Represent the description of the request. “Successful Operation” in case of Success. “ERROR_DESCRIPTION” in case of Fail. | |
| chargeResponseId | String | This is Telco generated identification of the Charge Response operation. It will be used within the refund request. |
Response Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | OK | Successful Operation |
| -100 | Missing param/value | Missing param/value |
| -101 | Authentication error | You are not authorized to perform this request |
| -200 | Cannot perform action | Unable to perform action. |
| -300 | Account Inactive | Operation Failed.Account Inactive |
| -301 | Single Charge Failed | Operation Failed,Single Charge Failed |
| -304 | Insufficient Funds | Operation Failed.Insufficient Funds |
| -305 | Duplicate Transaction | Operation Failed.Duplicate Transaction |
| -307 | Suspend Service | Operation Failed.Suspend Service |
| -308 | Unknown error from Opco | Unknown error. |
| -309 | Incorrect OTP | The SMS verification code is incorrect. |
| -310 | OTP has expired | The SMS verification code has expired. |
| -311 | Bad MSISDN | User not found. |
| -312 | User is not subscribed to product. | User is not subscribed to the specified product |
| -314 | Product is not in the validity period. | The product is not in the validity period. The product may have expired or have not taken effect. |
| -322 | Quota limit Exceeded | Quota limit Exceeded |
| -330 | Operation Failed | Operation Failed. Service Not Found. |
| -331 | Operation Failed | Operation Failed. Product Not Found. |
| -332 | Incorrect eligibility ResponseId or transactionId | Transactionid is incorrect or has expired |
| -429 | Too Many Requests | Requests rate limit reached, please contact support |
| -500 | Internal Error | Something went wrong. |
| -504 | Timeout occurred on Opco side | Gateway Timeout |