**版本：202201**

# 创建周期性应用收费

**POST** `/openapi/2022-01/recurring_application_charges`

使用提供的详情创建新的周期性应用收费。

## 请求

**application/json**

**请求体 | 示例**

**请求体**

- `recurring_application_charge` object

  - `name` string (required)

    The recurring application charge name.
  - `price` float (required)

    The price of the recurring application charge.
  - `return_url` string (required)

    Redirect URL after payment
  - `trial_days` int32

    Trial period in days
  - `capped_amount` string

    The limit a customer can be charged for usage based billing. If this property is provided, then you must also provide the terms property. See usage charges for more information.
  - `terms` string

    The terms and conditions of usage based billing charges. Must be present in order to create usage charges, for example when the capped_amount property is provided. Presented to the merchant when they approve an app's usage charges.
  - `test` boolean

    Whether it is a test charge

```json
{
  "recurring_application_charge": {
    "name": "string",
    "price": 0,
    "return_url": "string",
    "trial_days": 0,
    "capped_amount": "string",
    "terms": "string",
    "test": true
  }
}
```

## 响应

**200 | 422**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `id` string

  **示例：** `372269669345671159`
- `application_id` string

  **示例：** `s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0`
- `name` string

  **示例：** `test`
- `price` string

  **示例：** `100`
- `capped_amount` string

  **示例：** `10`
- `terms` string

  **示例：** `terms`
- `return_url` string

  **示例：** `https://shoplazza.com`
- `confirmation_url` string

  **示例：** `https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0/372269669345671159/recurring/confirm?signature=25e6433350d9dbb320bee53dd65b76db`
- `status` string

  **示例：** `pending`
- `trial_days` integer

  **默认值：** `0`

  **示例：** `0`
- `activated_on`
- `trial_ends_on`
- `billing_on`
- `cancelled_on`
- `cancel_sub_on`
- `test` boolean

  **默认值：** `true`

  **示例：** `false`
- `created_at` string

  **示例：** `2024-04-23T06:26:45Z`
- `updated_at` string

  **示例：** `2024-04-23T06:26:45Z`

```json
{
  "id": "372269669345671159",
  "application_id": "s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0",
  "name": "test",
  "price": "100",
  "capped_amount": "10",
  "terms": "terms",
  "return_url": "https://shoplazza.com",
  "confirmation_url": "https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0/372269669345671159/recurring/confirm?signature=25e6433350d9dbb320bee53dd65b76db",
  "status": "pending",
  "trial_days": 0,
  "activated_on": {},
  "trial_ends_on": {},
  "billing_on": {},
  "cancelled_on": {},
  "cancel_sub_on": {},
  "test": false,
  "created_at": "2024-04-23T06:26:45Z",
  "updated_at": "2024-04-23T06:26:45Z"
}
```

```json
{
    "id": "372269669345671159",
    "application_id": "s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0",
    "name": "test",
    "price": "100",
    "capped_amount": "10",
    "terms": "terms",
    "return_url": "https://shoplazza.com",
    "confirmation_url": "https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0/372269669345671159/recurring/confirm?signature=25e6433350d9dbb320bee53dd65b76db",
    "status": "pending",
    "trial_days": 0,
    "activated_on": null,
    "trial_ends_on": null,
    "billing_on": null,
    "cancelled_on": null,
    "cancel_sub_on": null,
    "test": false,
    "created_at": "2024-04-23T06:26:45Z",
    "updated_at": "2024-04-23T06:26:45Z"
}
```

422

**application/json**

无 Schema
