Logoelepay
Invoice

Create invoice

インボイスを作成します。

POST
/invoices

Authorization

AuthorizationBearer <token>

API呼出すの認証は、秘密鍵を認証トークンとして扱い、Bearer 認証経由で行われます。 秘密鍵は、全ての API リクエスト操作が可能となる重要なキーなので、取扱いにご注意ください。

In: header

Request Body

application/json;charset=utf-8

インボイスリクエスト

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json;charset=utf-8

curl -X POST "https://api.elepay.io/invoices" \  -H "Content-Type: application/json;charset=utf-8" \  -d '<customerId>string</customerId>  <amount>0</amount>'
{
  "id": "string",
  "object": "invoice",
  "liveMode": true,
  "customer": {
    "id": "string",
    "object": "customer",
    "liveMode": true,
    "defaultSource": "string",
    "name": "string",
    "description": "string",
    "email": "string",
    "phone": "string",
    "remark": "string",
    "operator": "string",
    "status": "active",
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "updateTime": 0
  },
  "invoiceNo": "string",
  "name": "string",
  "memo": "string",
  "amount": 0,
  "currency": "JPY",
  "status": "draft",
  "operator": "string",
  "invoiceTime": 0,
  "sendTime": 0,
  "paidTime": 0,
  "expiryTime": 0,
  "createTime": 0,
  "fields": [
    "string"
  ],
  "items": [
    {
      "id": "string",
      "object": "invoiceItem",
      "name": "string",
      "unitPrice": 0,
      "currency": "JPY",
      "quantity": 0,
      "unit": "string",
      "taxRateType": "standard",
      "transactionTime": 0
    }
  ],
  "remark": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "enableAutoCharge": true
}