Paycose Docs
E2ECreate Invoices
POST/invoices

SGD 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

NameValueDescription
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

NameTypeValue
line_itemsarray[1]
default_tax_ratesarray[1]
account_tax_idsarray[1]
payment_method_typesarray[1]
payment_method_providersarray[1]
default_feesarray[0]
couponstring
customer_idstring{{e2e_customer_sg_individual}}
default_payment_methodobject{…}
collection_methodstring<string>
capture_methodstring<string>
auto_advancebooleanfalse
due_datestring<RFC3339 timestamp>
currencystringSGD
transfer_dataobject{…}
metadataobject{…}
shipping_addressobject{…}
shipping_rate_idstring<string>
enable_shippingbooleanfalse
labelsarray[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

NameValue
Content-Typeapplication/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

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}
500500 Internal Server Error

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}

On this page