Logoelepay
Subscriptions

Create subscription

定期課金を作成します。

POST
/subscriptions
定期課金名
length ≤ 20
カスタマID
length ≤ 32
通貨コード (ISO_4217)
length 3–3 · default: JPY
每期課金金額
定期課金周期タイプ
定期課金周期間隔(何周期単位ごとに課金されます)
default: 1
初回課金前に支払う固定金額
初回課金時間(エポックミリ秒)
format: int64
メタデータ

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
}