Logoelepay
Subscriptions

Create subscription

Creates a subscription.

POST
/subscriptions
Subscription name
length ≤ 20
Customer ID
length ≤ 32
Currency code (ISO 4217)
length 3–3 · default: JPY
Amount per billing period
Subscription interval type
Interval span (how many intervals between charges)
default: 1
Fixed amount to pay before the first charge
First charge time (epoch millisecond)
format: int64
Metadata

Response Body

application/json

OK

TypeScript Definitions

Use the response body type in TypeScript.

curl -X POST "https://api.elepay.io/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string"  }'
{
  "id": "string",
  "appId": "string",
  "object": "subscription",
  "liveMode": true,
  "customerId": "string",
  "customer": {
    "id": "string",
    "object": "customer",
    "liveMode": true,
    "defaultSource": "string",
    "name": "string",
    "description": "string",
    "email": "string",
    "phone": "string",
    "remark": "string",
    "operator": "string",
    "status": "active",
    "metadata": {},
    "updateTime": 0
  },
  "nextChargeTime": 0,
  "isCharging": true,
  "chargedPeriods": 0,
  "metadata": {},
  "status": "new",
  "createTime": 0,
  "updateTime": 0
}