Invoice
POST
/invoices/{invoice_id}/line_itemsAdd Line Item
Body: AddInvoiceLineItemDTO — product_id, quantity.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/invoices/{{invoice_id}}/line_items' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-d '{
"product_id": "{{product_id}}",
"price_id": "<string>",
"quantity": 1,
"tax_rates": [
"<string>"
]
}'Headers
| Name | Value |
|---|---|
| X-Session-Token | {{session_token}} |
| X-Country | {{country}} |
Body
| Name | Type | Value |
|---|---|---|
| product_id | string | {{product_id}} |
| price_id | string | <string> |
| quantity | number | 1 |
| tax_rates | array | [1] |
{
"product_id": "{{product_id}}",
"price_id": "<string>",
"quantity": 1,
"tax_rates": [
"<string>"
]
}Responses
200200 OK
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"id": "<string>",
"object": "<string>",
"resource": "<string>",
"created_at": "<RFC3339 timestamp>",
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"next_action": [
{
"type": "<string>",
"title": "<string>",
"description": "<string>",
"i18n_key": "<string>",
"url": "<string>",
"client_secret": "<string>",
"payment_method": "<string>",
"qr_data": "<string>"
}
]
}400400 Bad Request
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}500500 Internal Server Error
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}