> For the complete documentation index, see [llms.txt](https://docs.lionparcel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lionparcel.com/api/api-reference-en/api-reference/cod-international.md).

# COD International

International COD is a service that allows clients to send packages to the destination country using the Cash on Delivery (COD) method

## COD Flow

The international COD process consists of several stages:

#### 1. Booking

The client makes a shipment booking by selecting the International COD service. Next, for the process **Create Shipment**, the client can access [Create Shipment (Pick Up & Drop Off Collection)](/api/api-reference-en/api-reference/create-shipment-pick-up-and-drop-off-collection.md).

In the Create Shipment process, the client needs to input several COD-related parameters as follows:

<table data-header-hidden><thead><tr><th width="159.0001220703125"></th><th width="174"></th><th></th></tr></thead><tbody><tr><td>Parameter</td><td>Sample Value</td><td>Description</td></tr><tr><td><code>service_code</code></td><td><code>"INTERPACK"</code></td><td>The service code used for International COD</td></tr><tr><td><code>is_cod</code></td><td><code>true</code></td><td>Indicates that the shipment uses COD service</td></tr><tr><td><code>cod_value</code></td><td><code>50</code></td><td>COD value to be paid by the recipient</td></tr><tr><td><code>price</code></td><td><code>50</code></td><td>Price of the item being shipped</td></tr></tbody></table>

**Currency rules:**

* **Item Price (`price`)** and **COD Value (`cod_value`)** uses **destination country currency**.
* **Shipping fee** uses **origin country currency**.

#### 2. Outgoing & Incoming

After booking is successful, the shipment is processed from the origin country to the destination country.

At this stage, the shipment goes through outgoing and incoming processes until it is handed over to the vendor in the destination country.

#### 3. Delivery

The shipment is then delivered by the courier to the recipient.

If the recipient receives the package, COD payment is made using the destination country's currency.

#### 4. Settlement COD

After COD payment is received, COD revenue goes into the COD Wallet.

The amount is then converted to the origin country's currency for settlement purposes.

#### 5. Withdraw

The client can withdraw COD revenue to a bank account.

The withdrawn amount uses the origin country's currency.

## Currency in International COD

In International COD, there are two currencies used:

| Component    | Currency                     |
| ------------ | ---------------------------- |
| Shipping fee | Currency Origin              |
| Item Price   | Currency Destination         |
| COD Value    | Currency Destination         |
| COD Fee      | Converted to Origin Currency |
| COD Revenue  | Converted to Origin Currency |

For example, for shipment CGK (Indonesia) → KUL (Malaysia), the shipping fee uses IDR, while the COD amount is billed to the recipient in MYR. COD revenue is then converted back to IDR at settlement.

## Management of Shipments That Could Not Be Delivered

If the shipment cannot be delivered, it will be returned to the hub for the next process.

Undelivered shipments will be stored for 14 days awaiting action from the client. If there is no action from the client during that period, the shipment will enter the SCRAP process according to the defined flow.

Note: For client needs, this process can be monitored and followed up according to the available shipment monitoring mechanism.

***

## Relabel & Redelivery

For certain conditions that require **Relabel** or **Redelivery**, the shipment will get **a new STT** as part of the shipment handling process.

In this process:

* The system will create a new STT.
* The processing fee is charged to Corporate or POS according to the terms.
* The rate uses the rate based on the Corporate origin.
* The STT resulting from the Reroute process uses the 77LP format.

The list of shipments resulting from Reroute can be monitored through the Important Shipments feature.

### Endpoint

<table data-header-hidden><thead><tr><th width="141.59375"></th><th></th></tr></thead><tbody><tr><td><code>POST</code></td><td><a href="https://api-stg-middleware.thelionparcel.com/v1/client/reroute"><code>https://api-stg-middleware.thelionparcel.com/v1/client/reroute</code></a></td></tr><tr><td>URL</td><td><code>[BASE_URL]/v1/client/reroute</code></td></tr></tbody></table>

### Headers

<table><thead><tr><th width="145.82421875">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization</td><td><code>Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI0MTYxMTc4MzAsImlhdCI6MTc4NTM5NzgzMCwidXNlcm5hbWUiOiJCT09LSU5HQVBJQ09SUERVQUJFTEFTIiwiY2xpZW50X2NvZGUiOiJDTDQzNDU5IiwiY2xpZW50X2NvZGVfZ2VuZXNpcyI6IkNMNDM0NTkiLCJpbnRlZ3JhdGlvbl90b2tlbl9pZCI6NTMsInNob3BfZG9tYWluIjoiYm9va2luZ2FwaS5jb20iLCJwbGF0Zm9ybSI6IkFQSSBMaW9uIFBhcmNlbCJ9.At7BM4uqQWpWgJ6u-xqygXQ0fO3VcPruNMNLBobUORWVyfxr63KCOgWt9cbzOK-4ikdNmd-R7Np2oC0SdLifXLWjTfWhz2wQS7aITK0YjOMkBtrCsqWHG8xsK8MiXJheko4w8C9vn4vATMI7BDL1iySw8uXbpICiU7k8TvgF4U-uxsOZlIvfEva5S17ZGeGRYTik9qjIst7Aq8IlJBww3meEl9znlNkdyuFgLZg_cUU1Jc6o5-5fUkljHelDyFuPuDm3KEDuds3ov0YKTi1EYQu266KzTXdhgWtyf6-98RHQlbic6o_RZ4KeNb6YrtC63AHHLonmkrmUGH7TdH09sQ</code></td></tr></tbody></table>

### Request Body

The request body uses application/json format.

<table><thead><tr><th width="184.800048828125">Field</th><th width="92.2000732421875">Required</th><th width="78.800048828125">Type</th><th>Length (Min/Max)</th><th>Description</th></tr></thead><tbody><tr><td>shipment_id</td><td>yes</td><td>String</td><td>min : 1 max:10</td><td>Origin shipment ID</td></tr><tr><td>stt_no</td><td>yes</td><td>String</td><td>min : 1 max:30</td><td>Origin STT number</td></tr><tr><td>stt_destination</td><td>yes</td><td>String</td><td>min: 1<br>max : 255</td><td>New district destination</td></tr><tr><td>stt_recipient_name</td><td>yes</td><td>String </td><td>min : 3<br>max : 200</td><td>New recipient name. Can't use icons or emoticons</td></tr><tr><td>stt_recipient_address</td><td>yes</td><td>String</td><td>min : 3<br>max : 200</td><td>New recipient address. Can't use icons or emoticons</td></tr><tr><td>stt_recipient_phone</td><td>yes</td><td>String</td><td>min : 12<br>max :15 </td><td>New recipient phone number</td></tr><tr><td>stt_cod_amount</td><td>no</td><td>float</td><td>min : 1 </td><td></td></tr></tbody></table>

{% hint style="info" %}
Fill in at least one of the following: `shipment_id` or `stt_no`. If one of them has already been filled in, the other field is not required.
{% endhint %}

## Test It: Reroute Shipment (Relabel & Redelivery)

> Request relabel or redelivery for a shipment. The process creates a new STT with the 77LP prefix. The process fee is charged to Corporate or POS according to the applicable terms, and the rate is based on the Corporate origin. Rerouted shipments can be monitored through the Kiriman Penting feature. Provide at least one of shipment\_id or stt\_no.<br>

```json
{"openapi":"3.0.3","info":{"title":"Lion Parcel API","version":"1.1.1"},"tags":[{"name":"Shipment","description":"Create, pick up, cancel, and reroute shipments (marketplace/aggregator flow)."}],"servers":[{"url":"https://api-stg-middleware.thelionparcel.com","description":"Staging"}],"paths":{"/v1/client/reroute":{"post":{"operationId":"rerouteShipment","summary":"Test It: Reroute Shipment (Relabel & Redelivery)","description":"Request relabel or redelivery for a shipment. The process creates a new STT with the 77LP prefix. The process fee is charged to Corporate or POS according to the applicable terms, and the rate is based on the Corporate origin. Rerouted shipments can be monitored through the Kiriman Penting feature. Provide at least one of shipment_id or stt_no.\n","tags":["Shipment"],"parameters":[{"name":"Authorization","in":"header","required":true,"description":"Staging Bearer token for this client.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["stt_destination","stt_recipient_name","stt_recipient_address","stt_recipient_phone"],"properties":{"shipment_id":{"type":"string","minLength":1,"maxLength":10,"description":"Original shipment ID."},"stt_no":{"type":"string","minLength":1,"maxLength":30,"description":"Original STT number."},"stt_destination":{"type":"string","minLength":1,"maxLength":255,"description":"New district destination."},"stt_recipient_name":{"type":"string","minLength":3,"maxLength":200,"description":"New recipient name. Icons and emoticons are not allowed."},"stt_recipient_address":{"type":"string","minLength":3,"maxLength":200,"description":"New recipient address. Icons and emoticons are not allowed."},"stt_recipient_phone":{"type":"string","minLength":12,"maxLength":15,"description":"New recipient phone number."},"stt_cod_amount":{"type":"number","format":"float","minimum":1,"description":"COD amount, if applicable."}},"allOf":[{"anyOf":[{"required":["shipment_id"]},{"required":["stt_no"]}]}]}}}},"responses":{"200":{"description":"Reroute request processed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"data":{"type":"object","properties":{"new_awb":{"type":"string","description":"New STT number with the 77LP prefix."},"status":{"type":"string","description":"Reroute status."},"original_awb":{"type":"string","description":"Original STT number."}}},"success":{"type":"boolean","description":"Whether the request succeeded."}}}}}},"400":{"description":"Invalid request or neither shipment_id nor stt_no was provided.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request succeeded."},"code":{"type":"integer","description":"HTTP status code."},"message":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"500":{"description":"Internal server error while processing the reroute.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the request succeeded."},"code":{"type":"integer","description":"HTTP status code."},"message":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}},"components":{"schemas":{"ErrorMessage":{"type":"object","description":"Bilingual error message returned by the API.","properties":{"en":{"type":"string","description":"Error message in English."},"id":{"type":"string","description":"Error message in Indonesian."}}}}}}
```

### Request Example

```
{
    "shipment_id": "C2MJAWCX",
    "stt_no":"88LP1792122598387",
    "stt_destination": "BEAUFORT, SABAH, MALAYSIA",
    "stt_recipient_name": "John",
    "stt_recipient_address": "Jl. Mawar No. 10, BEAUFORT, SABAH, MALAYSIA",
    "stt_recipient_phone": "62812345678",
    "stt_cod_amount":100
}
```

### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "code": 200,
    "data": {
        "new_awb": "77LP1792122711947",
        "status": "REROUTE",
        "original_awb": "88LP1792122598387"
    },
    "success": true
}
```

{% endtab %}

{% tab title="400" %}
{% code overflow="wrap" %}

```json
//Occurs when the request body is invalid or there are mandatory fields that are not provided

{
  "success": false,
  "code": 400,
  "message": {
    "id": "Invalid request format",
    "en": "Invalid request format"
  }
}

//Occurs when shipment_id/stt_no is not found or is not filled in

{
  "success": false,
  "code": 400,
  "message": {
    "id": "Must provide either stt_no or shipment_id",
    "en": "Must provide either stt_no or shipment_id"
  }
}



```

{% endcode %}
{% endtab %}

{% tab title="500" %}

```json
// Occurs when there is a server-side error while processing reroute

{
  "success": false,
  "code": 500,
  "message": {
    "id": "An error occurred on the server",
    "en": "Internal server error"
  }
}
```

{% endtab %}
{% endtabs %}

<br>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lionparcel.com/api/api-reference-en/api-reference/cod-international.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
