E2ECreate Subscriptions
POST
/subscriptionsFull options enabled (JPY)
Every optional knob enabled.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/subscriptions/' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-H 'X-Test-Mode: {{x_test_mode}}' \
-d '{
"line_items": [
{
"product_id": "{{e2e_product_nintendo_online}}",
"price_id": "{{e2e_price_nintendo_online_monthly}}",
"quantity": 1,
"tax_rates": [
"{{e2e_tax_jp_jct}}"
]
}
],
"default_tax_rates": [],
"default_fees": [],
"coupon": "<string>",
"customer_id": "{{e2e_customer_jp_individual}}",
"test_clock_id": "<string>",
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"currency": "JPY",
"start_on": "2026-06-01T00:00:00Z",
"end_on": "2027-06-01T00:00:00Z",
"transfer_data": {
"destination": "{{e2e_customer_destination}}",
"balance_id": "{{e2e_balance_jpy}}"
},
"trial_days": 0,
"trial_end": "<RFC3339 timestamp>",
"metadata": {
"scenario": "all-optional-knobs-enabled"
},
"description": "<string>",
"payment_behavior": "allow_incomplete",
"collection_method": "<string>",
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"auto_advance": false,
"due_date": "<RFC3339 timestamp>",
"billing_cycle_anchor": "2026-06-01T00:00:00Z",
"off_session": true,
"payment_settings": {
"payment_method_types": [
"card",
"promptpay"
],
"save_default_payment_method": "on_subscription"
},
"trial_settings": {
"end_behavior_missing_payment_method": "<string>"
},
"add_invoice_items": [
{
"price_id": "{{e2e_price_chatgpt_plus_monthly}}",
"quantity": 1
}
],
"billing_thresholds": {
"amount_gte": 0,
"reset_billing_cycle_anchor": false
},
"invoice_settings": {
"custom_fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"footer": "<string>",
"account_tax_ids": [
"<string>"
]
},
"pending_invoice_item_interval": {
"interval": "<string>",
"interval_count": 0
},
"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 | [0] |
| default_fees | array | [0] |
| coupon | string | <string> |
| customer_id | string | {{e2e_customer_jp_individual}} |
| test_clock_id | string | <string> |
| default_payment_method | object | {…} |
| currency | string | JPY |
| start_on | string | 2026-06-01T00:00:00Z |
| end_on | string | 2027-06-01T00:00:00Z |
| transfer_data | object | {…} |
| trial_days | number | 0 |
| trial_end | string | <RFC3339 timestamp> |
| metadata | object | {…} |
| description | string | <string> |
| payment_behavior | string | allow_incomplete |
| collection_method | string | <string> |
| payment_method_types | array | [1] |
| payment_method_providers | array | [1] |
| auto_advance | boolean | false |
| due_date | string | <RFC3339 timestamp> |
| billing_cycle_anchor | string | 2026-06-01T00:00:00Z |
| off_session | boolean | true |
| payment_settings | object | {…} |
| trial_settings | object | {…} |
| add_invoice_items | array | [1] |
| billing_thresholds | object | {…} |
| invoice_settings | object | {…} |
| pending_invoice_item_interval | object | {…} |
| labels | array | [1] |
{
"line_items": [
{
"product_id": "{{e2e_product_nintendo_online}}",
"price_id": "{{e2e_price_nintendo_online_monthly}}",
"quantity": 1,
"tax_rates": [
"{{e2e_tax_jp_jct}}"
]
}
],
"default_tax_rates": [],
"default_fees": [],
"coupon": "<string>",
"customer_id": "{{e2e_customer_jp_individual}}",
"test_clock_id": "<string>",
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"currency": "JPY",
"start_on": "2026-06-01T00:00:00Z",
"end_on": "2027-06-01T00:00:00Z",
"transfer_data": {
"destination": "{{e2e_customer_destination}}",
"balance_id": "{{e2e_balance_jpy}}"
},
"trial_days": 0,
"trial_end": "<RFC3339 timestamp>",
"metadata": {
"scenario": "all-optional-knobs-enabled"
},
"description": "<string>",
"payment_behavior": "allow_incomplete",
"collection_method": "<string>",
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"auto_advance": false,
"due_date": "<RFC3339 timestamp>",
"billing_cycle_anchor": "2026-06-01T00:00:00Z",
"off_session": true,
"payment_settings": {
"payment_method_types": [
"card",
"promptpay"
],
"save_default_payment_method": "on_subscription"
},
"trial_settings": {
"end_behavior_missing_payment_method": "<string>"
},
"add_invoice_items": [
{
"price_id": "{{e2e_price_chatgpt_plus_monthly}}",
"quantity": 1
}
],
"billing_thresholds": {
"amount_gte": 0,
"reset_billing_cycle_anchor": false
},
"invoice_settings": {
"custom_fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"footer": "<string>",
"account_tax_ids": [
"<string>"
]
},
"pending_invoice_item_interval": {
"interval": "<string>",
"interval_count": 0
},
"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>"
}