Skip to main content

Order Payment

1. Direct Payment

Endpoint

POST /api/v6.1/sale_order_payment/direct

Headers

{
"Content-Type": "application/json",
"X-API-KEY": "{your_api_key}"
}

Request Body

| Field | Data Type | Description |
|------------------|-------------|-------|
| order_code | String | Order code to pay |
| method_name | String | Payment method |
| amount | Number | Payment amount |
| description | String | Transaction description |
| pay_date | String (YYYY-MM-DD) | Payment date |\

{
"order_code": "DH_TET_2025_2",
"method_name": "Foreign Exchange Forex",
"amount": 50000,
"description": "Temporary payment",
"pay_date": "2025-02-03"
}

Response (Success)

| Field | Data Type | Description |
|-----------|-------------|-------|
| message | String | Result message |
| data | Object | Response data |
| via | String | Payment method |
| id | Number | Payment transaction ID |
| order_id| Number | Related order ID |\

{
"message": "Successfully added",
"data": {
"via": "direct",
"id": 37,
"order_id": 197
}
}

2. Pay by Points

Endpoint

POST /api/v6.1/sale_order_payment/point

Headers

{
"Content-Type": "application/json",
"X-API-KEY": "{your_api_key}"
}

Request Body

| Field | Data Type | Description |
|--------------|-------------|-------|
| order_code | String | Order code to pay |
| point | Number | Points used for payment |
| description | String | Transaction description |
| pay_date | String (YYYY-MM-DD) | Payment date |\

{
"order_code": "DH_TET_2025_2",
"point": 10,
"description": "Temporary payment",
"pay_date": "2025-02-03"
}

Response (Success)

{
"message": "Successfully added",
"data": {
"via": "point",
"id": 38,
"order_id": 197
}
}

3. Pay via Fund

Endpoint

POST /api/v6.1/sale_order_payment/fund

Headers

{
"Content-Type": "application/json",
"X-API-KEY": "{your_api_key}"
}

Request Body

| Field | Data Type | Description |
|--------------|-------------|-------|
| order_code | String | Order code to pay |
| fund_name | String | Fund name used for payment |
| amount | Number | Payment amount |
| description | String | Transaction description |
| pay_date | String (YYYY-MM-DD) | Payment date |\

{
"order_code": "DH_TET_2025_2",
"fund_name": "Customer Support Fund",
"amount": 50000,
"description": "Payment from fund",
"pay_date": "2025-02-03"
}

Response (Success)

{
"message": "Successfully added",
"data": {
"via": "fund",
"id": 27,
"sheet_code": "PT/2025-03/0022"
}
}