Paycose Docs
E2ECreate Subscriptions
POST/subscriptions

Full 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

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[0]
default_feesarray[0]
couponstring<string>
customer_idstring{{e2e_customer_jp_individual}}
test_clock_idstring<string>
default_payment_methodobject{…}
currencystringJPY
start_onstring2026-06-01T00:00:00Z
end_onstring2027-06-01T00:00:00Z
transfer_dataobject{…}
trial_daysnumber0
trial_endstring<RFC3339 timestamp>
metadataobject{…}
descriptionstring<string>
payment_behaviorstringallow_incomplete
collection_methodstring<string>
payment_method_typesarray[1]
payment_method_providersarray[1]
auto_advancebooleanfalse
due_datestring<RFC3339 timestamp>
billing_cycle_anchorstring2026-06-01T00:00:00Z
off_sessionbooleantrue
payment_settingsobject{…}
trial_settingsobject{…}
add_invoice_itemsarray[1]
billing_thresholdsobject{…}
invoice_settingsobject{…}
pending_invoice_item_intervalobject{…}
labelsarray[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

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