> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/codapay/direct-api-integration/direct-api-integration-for-alternative-payment-methods/backend-call-flow/carrier-billing-dcb.md).

# Carrier Billing (DCB)

## Carrier Billing Call Flow

<figure><img src="/files/7RALt93OZHvpH6IAk3U9" alt=""><figcaption></figcaption></figure>

### Carrier Billing MT-MO Authentication Flow

In **Carrier Billing MT-MO authentication**, the customer receives instructions via SMS and authorizes the transaction by responding with an SMS based on those instructions.

<figure><img src="/files/ns2XomTfTpVSjASNGpTE" alt=""><figcaption></figcaption></figure>

### Carrier Billing MO Authentication Flow

In **Carrier Billing MO authentication**, authorization is also completed via SMS. However, the partner's payment page must provide clear instructions on how to proceed with the SMS authentication process.

<figure><img src="/files/FYU1fvpPLRwn87sgH7mM" alt=""><figcaption></figcaption></figure>

## Request Message

<table><thead><tr><th width="148">Parameters</th><th width="95">Type</th><th width="116">Length</th><th>Description</th></tr></thead><tbody><tr><td>api_key</td><td>String</td><td>256</td><td><strong>Mandatory</strong><br>API key provided by Coda. Refer to <a data-mention href="/pages/SJ2KtFdcmUYgMDiplZT1">/pages/SJ2KtFdcmUYgMDiplZT1</a> to find out how to get it.</td></tr><tr><td>project_id</td><td>String</td><td>10</td><td><p>*<strong>This field is only needed for v2.0 API</strong></p><p><strong>Mandatory</strong> </p><p>Project ID provided by Coda, unique for each title product. Refer to <a data-mention href="/pages/SJ2KtFdcmUYgMDiplZT1">/pages/SJ2KtFdcmUYgMDiplZT1</a> to find out how to get it.</p></td></tr><tr><td>order_id</td><td>String</td><td>64</td><td><p><strong>Mandatory</strong> </p><p>Your unique identifier for the transaction</p></td></tr><tr><td>country</td><td>Number</td><td>N/A</td><td><strong>Mandatory</strong><br>ISO 3166 based country code. Can refer to <a data-mention href="/pages/7B3qZnefeSwkSs84sKuB">/pages/7B3qZnefeSwkSs84sKuB</a></td></tr><tr><td>lang</td><td>String</td><td>2</td><td><p><strong>Mandatory</strong></p><p>2-character language code. See <a data-mention href="/pages/lumiE4ZV7er3NqdusLTc">/pages/lumiE4ZV7er3NqdusLTc</a>for options.</p></td></tr><tr><td>type</td><td>Number</td><td>1</td><td>1: Digital content,<br>2: Non-digital content</td></tr><tr><td>pay_type</td><td>Number</td><td>1</td><td><p><strong>Mandatory</strong></p><p>Carrier Billing use pay_type = 1<br><br>For Carrier billings, if customers enter MSISDN of different carrier billings than the carrier billings in request message, the transaction will be failed with error 240. </p><p></p><p>Refer <a data-mention href="/pages/H5smNhrW5H8UuJgvQJ6Y">/pages/H5smNhrW5H8UuJgvQJ6Y</a> for more details</p></td></tr><tr><td>mno_code</td><td>Number</td><td>N/A</td><td><p><strong>Mandatory</strong></p><p>Mobile Network Code. If empty, Coda selects available MNO.</p></td></tr><tr><td>msisdn</td><td>Number</td><td>15</td><td><p><strong>Optional</strong></p><p>MSISDN (non-formatted; without country code).<br><br>Only include this if MSISDN is required and not email.</p></td></tr><tr><td>merchant_name</td><td>String</td><td>128</td><td><p><strong>Optional</strong></p><p>The merchant name that will be displayed in an SMS message, if the partner wants to specify the partner name, please enter the name in this field.<br></p><p>The default value is empty.</p></td></tr><tr><td>items</td><td>ItemInfo</td><td>N/A</td><td><p><strong>Mandatory</strong></p><p>List of items being purchased by the users</p></td></tr><tr><td>items[].code</td><td>String</td><td>128</td><td><p><strong>Mandatory</strong></p><p>Code associated with the item on your side</p></td></tr><tr><td>items[].name</td><td>String</td><td>128</td><td><strong>Mandatory</strong> Name of the item being purchased. Only supports latin characters.</td></tr><tr><td>items[].price</td><td>Number</td><td>N/A</td><td><strong>Mandatory</strong><br>Price of the item inclusive of any taxes in the currency specified in the request.</td></tr><tr><td>items[].type</td><td>Number</td><td>N/A</td><td><strong>Mandatory</strong><br>Default=1</td></tr><tr><td>profile</td><td>Map</td><td>N/A</td><td><strong>Mandatory</strong><br>Refer Profile Info below for more details</td></tr></tbody></table>

## Profile Info

<table><thead><tr><th width="165">Parameters</th><th width="101">Type</th><th width="83">Length</th><th>Description</th></tr></thead><tbody><tr><td>user_id</td><td>String</td><td>128</td><td><p><strong>Mandatory</strong> </p><p>Your user's unique identifier</p></td></tr><tr><td>client_ip</td><td>String</td><td>15</td><td><strong>Optional</strong><br>Customer IP Address (only support IPv4)</td></tr><tr><td>user_agent</td><td>String</td><td>512</td><td><strong>Optional</strong><br>Customer's user agent data (details of browser and operating system)</td></tr><tr><td>email</td><td>String</td><td></td><td><p><strong>Optional</strong></p><p>The email address where the successful transaction receipt will be sent. Upon a successful payment, Coda will automatically deliver a digital receipt to this address. <em>This feature is not enabled by default. To activate automated receipt delivery for your titles, please contact the payment enablement team at</em> <a href="mailto:codapay_integration@coda.co"><em>codapay_integration@coda.co</em></a><em>.</em><br></p><p><em>Receipt example:</em> <img src="/files/VpemzyLCFf0d472Nomf0" alt=""></p></td></tr></tbody></table>

### Sample Request

{% tabs %}
{% tab title="v2.0 with MSISDN" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "project_id": "1", //This field is only needed for v2.0 API
  "country": "702",
  "api_key": "test_e944d44f065eade8157737385a09",
  "order_id": "&#x3C;Your OrderID>",
  "lang": "en",
  "merchant_name": "Codapay",
  "type": "1",
  "pay_type": "1",
  "mno_code": "52503",
  "msisdn": "&#x3C;Your number>",
  "items": [
    {
      "code": "5",
      "name": "Test Item",
      "price": 60.0
    }
  ],
  "profile": {
    "user_id": "12345"

  }
}
</code></pre>

{% endtab %}

{% tab title="v2.0 without MSISDN" %}

```json
{
  "project_id": "1", //This field is only needed for v2.0 API
  "country": "702",
  "api_key": "test_e944d44f065eade8157737385a09",
  "order_id": "<Your OrderID>",
  "lang": "en",
  "merchant_name": "Codapay",
  "type": "1",
  "pay_type": "1",
  "mno_code": "52503",
  "items": [
    {
      "code": "5",
      "name": "Test Item",
      "price": 60.0
    }
  ],
  "profile": {
    "user_id": "12345"

  }
}
```

{% endtab %}

{% tab title="v1 with MSISDN " %}

```json
{
  "api_key": "<API Key>",
  "order_id": "<Your OrderID>",
  "lang": "en",
  "pay_type": 1,
  "msisdn": "<Your number>",
  "mno_code": 22,
  "merchant_name": "Codapay",
  "type": 1,
  "items": [
    {
      "code": "1",
      "name": "One Day",
      "price": 10000,
      "type": 1
    }
  ],
  "profile": {
    "user_id": "12345"
  }
}
```

{% endtab %}

{% tab title="v1 without MSISDN" %}

```json
{
  "api_key": "<API Key>",
  "order_id": "<Your OrderID>",
  "lang": "en",
  "pay_type": 1,
  "mno_code": 22,
  "merchant_name": "Codapay",
  "type": 1,
  "items": [
    {
      "code": "1",
      "name": "One Day",
      "price": 10000,
      "type": 1
    }
  ],
  "profile": {
    "user_id": "12345"
  }
}
```

{% endtab %}
{% endtabs %}

## Response Message

<table><thead><tr><th width="153.33333333333331">Parameters</th><th width="141">Type</th><th width="94">Length</th><th>Description</th></tr></thead><tbody><tr><td>result_code</td><td>Number</td><td>N/A</td><td>Success or Error code. Success = 0.<br><br>Error Code list please refer to <a data-mention href="/pages/Ijfanb3Eb2mtXRsbF81n">/pages/Ijfanb3Eb2mtXRsbF81n</a></td></tr><tr><td>result_desc</td><td>String</td><td>512</td><td>If the resultCode is an error, this value describes the error.<br><a data-mention href="/pages/Ijfanb3Eb2mtXRsbF81n">/pages/Ijfanb3Eb2mtXRsbF81n</a></td></tr><tr><td>txn_id</td><td>Number</td><td>N/A</td><td>Unique payment transaction identifier.</td></tr><tr><td>txn_timeout</td><td>Number</td><td>N/A</td><td>Transaction Timeout in Minutes.</td></tr><tr><td>total_price</td><td>Number</td><td>N/A</td><td>The total amount the user has paid for the transaction. This will always be in local currency.</td></tr><tr><td>pay_instructions</td><td>String</td><td>15</td><td>If this value is populated, partner should display the instructions provided on screen to the customer.</td></tr><tr><td>profile</td><td>Object</td><td>N/A</td><td>Refer the Profile info below for more details</td></tr></tbody></table>

## Profile Info

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="131">Type</th><th width="117">Length</th><th>Description</th></tr></thead><tbody><tr><td>extInfoByte</td><td>N/A</td><td>N/A</td><td>Please ignore this field.</td></tr><tr><td>redirect_url</td><td>String</td><td>128</td><td>The payment gateway's redirect URL is returned only if the selected payment channel follows a redirect URL workflow.</td></tr><tr><td>merchantType</td><td>String</td><td>128</td><td>Please ignore this field.</td></tr></tbody></table>

### Sample Response

{% tabs %}
{% tab title="Sample with msisdn" %}

```json
{
    "txn_id": 7395215708672061682,
    "txn_timeout": 11,
    "result_code": 0,
    "total_price": 100.0,
    "pay_instructions": "We just sent an SMS to xxxxxx. To complete the transaction, send \"PAY\" followed by five digits code from the SMS to 75457. Example: PAY 12345.",
    "profile": {
        "extInfoByte": "0",
        "user_id": "12345",
        "merchantType": "Codapay"
    }
}
```

{% endtab %}

{% tab title="Sample without msisdn" %}

```json
{
    "txn_id": 7395215708672061123,
    "txn_timeout": 61,
    "result_code": 0,
    "total_price": 1000.0,
    "pay_instructions": "",
    "profile": {
        "extInfoByte": "0",
        "user_id": "12345",
        "merchantType": "Codapay",
        "redirect_url": "https://sample_URL.com"
    }
}
```

{% endtab %}
{% endtabs %}

## Mobile Operator Codes

<table><thead><tr><th width="151">Country</th><th width="232">Payment Channels (MNO)</th><th width="107">Auth Type</th><th>Network Code</th></tr></thead><tbody><tr><td>Bangladesh</td><td>Robi</td><td>N/A</td><td>47002</td></tr><tr><td>Indonesia</td><td>Indosat</td><td>MT-MO</td><td>51001 or 51021</td></tr><tr><td>Indonesia</td><td>Telkomsel</td><td>MT-MO</td><td>51010 or 51020</td></tr><tr><td>Indonesia</td><td>TRI</td><td>MT-MO</td><td>51089</td></tr><tr><td>Indonesia</td><td>XL</td><td>MO</td><td>51008 or 51011</td></tr><tr><td>Cambodia</td><td>Smart Axiata</td><td>MT-MO</td><td>45605</td></tr><tr><td>Laos</td><td>Unitel</td><td>MT-MO</td><td>45703</td></tr><tr><td>Myanmar</td><td>ATOM</td><td>MT-MO</td><td>41406</td></tr><tr><td>Myanmar</td><td>Ooredoo</td><td>MT-MO</td><td>41405</td></tr><tr><td>Malaysia</td><td>Celcom</td><td>MT-MO</td><td>50213, 50219</td></tr><tr><td>Malaysia</td><td>Maxis</td><td>MO</td><td>50212 or 50217</td></tr><tr><td>Philippines</td><td>Smart/Sun</td><td>MT-MO</td><td>51503</td></tr><tr><td>Pakistan</td><td>Telenor Pakistan</td><td>MT-MO</td><td>52586</td></tr><tr><td>Singapore</td><td>M1</td><td>MT-MO</td><td>52503</td></tr><tr><td>Taiwan</td><td>Asia Pacific Telecom</td><td>N/A</td><td>46605</td></tr><tr><td>Taiwan</td><td>Chunghwa Telecom</td><td>N/A</td><td>46692, 46611</td></tr><tr><td>Taiwan</td><td>FarEasTone</td><td>N/A</td><td>46602, 46607, 46601, 46606, 46603</td></tr></tbody></table>

{% hint style="warning" %} <mark style="color:orange;">**Reference of USD Transactions**</mark>

Please check out this [guide ](/codapay/direct-api-integration/direct-api-integration-for-alternative-payment-methods/initiate-usd-transactions.md)to learn more about USD transactions.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coda.co/codapay/direct-api-integration/direct-api-integration-for-alternative-payment-methods/backend-call-flow/carrier-billing-dcb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
