E2ECreate Invoices
POST
/invoicesSGD physical (GST exclusive)
SGD + exclusive GST.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/invoices/' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-H 'X-Test-Mode: {{x_test_mode}}' \
-d '{
"line_items": [
{
"product_id": "{{e2e_product_razer_deathadder}}",
"price_id": "{{e2e_price_razer_deathadder}}",
"quantity": 1
}
],
"default_tax_rates": [
"{{e2e_tax_sg_gst}}"
],
"account_tax_ids": [
"<string>"
],
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"default_fees": [],
"coupon": "",
"customer_id": "{{e2e_customer_sg_individual}}",
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"collection_method": "<string>",
"capture_method": "<string>",
"auto_advance": false,
"due_date": "<RFC3339 timestamp>",
"currency": "SGD",
"transfer_data": {
"destination": "{{e2e_customer_destination}}",
"balance_id": "{{e2e_balance_sgd}}"
},
"metadata": {
"scenario": "sgd-gst-exclusive"
},
"shipping_address": {
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"shipping_rate_id": "<string>",
"enable_shipping": false,
"labels": [
"<string>"
]
}'Headers
| Name | Value | Description |
|---|---|---|
| X-Session-Token | {{session_token}} | |
| X-Country | {{country}} | |
| X-Test-Mode | {{x_test_mode}} | true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request. |
Body
| Name | Type | Value |
|---|---|---|
| line_items | array | [1] |
| default_tax_rates | array | [1] |
| account_tax_ids | array | [1] |
| payment_method_types | array | [1] |
| payment_method_providers | array | [1] |
| default_fees | array | [0] |
| coupon | string | |
| customer_id | string | {{e2e_customer_sg_individual}} |
| default_payment_method | object | {…} |
| collection_method | string | <string> |
| capture_method | string | <string> |
| auto_advance | boolean | false |
| due_date | string | <RFC3339 timestamp> |
| currency | string | SGD |
| transfer_data | object | {…} |
| metadata | object | {…} |
| shipping_address | object | {…} |
| shipping_rate_id | string | <string> |
| enable_shipping | boolean | false |
| labels | array | [1] |
{
"line_items": [
{
"product_id": "{{e2e_product_razer_deathadder}}",
"price_id": "{{e2e_price_razer_deathadder}}",
"quantity": 1
}
],
"default_tax_rates": [
"{{e2e_tax_sg_gst}}"
],
"account_tax_ids": [
"<string>"
],
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"default_fees": [],
"coupon": "",
"customer_id": "{{e2e_customer_sg_individual}}",
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"collection_method": "<string>",
"capture_method": "<string>",
"auto_advance": false,
"due_date": "<RFC3339 timestamp>",
"currency": "SGD",
"transfer_data": {
"destination": "{{e2e_customer_destination}}",
"balance_id": "{{e2e_balance_sgd}}"
},
"metadata": {
"scenario": "sgd-gst-exclusive"
},
"shipping_address": {
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"shipping_rate_id": "<string>",
"enable_shipping": false,
"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>"
}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>"
}