Credit Note
POST
/credit_notesCreate Credit Note
Body — CreateCreditNoteDTO + nested CreateCreditNoteLineDTO.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/credit_notes/' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-d '{
"invoice_id": "{{invoice_id}}",
"lines": [
{
"type": "invoice_line_item",
"invoice_line_item": "",
"amount": 0,
"unit_amount": 0,
"unit_amount_decimal": "",
"quantity": 1,
"description": ""
}
],
"reason": "duplicate",
"memo": "",
"credit_amount": 0,
"refund_amount": 0,
"out_of_band_amount": 0,
"effective_at": null,
"metadata": {},
"shipping_cost": {
"shipping_rate": "<string>",
"amount": 0
},
"email_type": "<string>",
"refund": {
"refund": "<string>",
"payment_record_refund": "<string>",
"type": "<string>"
},
"labels": [
"<string>"
]
}'Headers
| Name | Value |
|---|---|
| X-Session-Token | {{session_token}} |
| X-Country | {{country}} |
Body
| Name | Type | Value |
|---|---|---|
| invoice_id | string | {{invoice_id}} |
| lines | array | [1] |
| reason | string | duplicate |
| memo | string | |
| credit_amount | number | 0 |
| refund_amount | number | 0 |
| out_of_band_amount | number | 0 |
| effective_at | null | null |
| metadata | object | {…} |
| shipping_cost | object | {…} |
| email_type | string | <string> |
| refund | object | {…} |
| labels | array | [1] |
{
"invoice_id": "{{invoice_id}}",
"lines": [
{
"type": "invoice_line_item",
"invoice_line_item": "",
"amount": 0,
"unit_amount": 0,
"unit_amount_decimal": "",
"quantity": 1,
"description": ""
}
],
"reason": "duplicate",
"memo": "",
"credit_amount": 0,
"refund_amount": 0,
"out_of_band_amount": 0,
"effective_at": null,
"metadata": {},
"shipping_cost": {
"shipping_rate": "<string>",
"amount": 0
},
"email_type": "<string>",
"refund": {
"refund": "<string>",
"payment_record_refund": "<string>",
"type": "<string>"
},
"labels": [
"<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>"
}