**版本：202201**

# 创建一次性应用收费

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

使用提供的详情创建新的一次性应用收费。

## 请求

**application/json**

**请求体 | 示例**

**请求体**

- `application_charge` object

  Application charge

  - `name` string (required)

    The application charge name.
  - `price` string (required)

    The amount of the charge, must match with the APP package setting amount
  - `return_url` string (required)

    Redirect URL after payment
  - `test` boolean

    Whether it is a test charge

    **默认值：** `false`

```json
{
  "application_charge": {
    "name": "string",
    "price": "string",
    "return_url": "string",
    "test": false
  }
}
```

## 响应

**200 | 422**

200

**application/json**

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

**数据结构**

- `id` string

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

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

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

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

  **示例：** `https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Kmby9zm_W1dlg11zyVY1XtVkG3teakrbTYPwwmE6WhU/372212374209312759/one-time/confirm?signature=83207d1ad129d5c2ac36bd8b1b6ff8a8`
- `return_url` string

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

  **示例：** `pending`
- `test` boolean

  **默认值：** `true`

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

  **示例：** `2024-04-23T02:39:05Z`
- `updated_at` string

  **示例：** `2024-04-23T02:39:05Z`

```json
{
  "id": "372212374209312759",
  "application_id": "Kmby9zm_W1dlg11zyVY1XtVkG3teakrbTYPwwmE6WhU",
  "name": "test",
  "price": "100",
  "confirm_url": "https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Kmby9zm_W1dlg11zyVY1XtVkG3teakrbTYPwwmE6WhU/372212374209312759/one-time/confirm?signature=83207d1ad129d5c2ac36bd8b1b6ff8a8",
  "return_url": "https://shoplazza.com",
  "status": "pending",
  "test": false,
  "created_at": "2024-04-23T02:39:05Z",
  "updated_at": "2024-04-23T02:39:05Z"
}
```

```json
{
    "id": "372212374209312759",
    "application_id": "Kmby9zm_W1dlg11zyVY1XtVkG3teakrbTYPwwmE6WhU",
    "name": "test",
    "price": "100",
    "confirm_url": "https://test-shoplazza.stg.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Kmby9zm_W1dlg11zyVY1XtVkG3teakrbTYPwwmE6WhU/372212374209312759/one-time/confirm?signature=83207d1ad129d5c2ac36bd8b1b6ff8a8",
    "return_url": "https://shoplazza.com",
    "status": "pending",
    "test": false,
    "created_at": "2024-04-23T02:39:05Z",
    "updated_at": "2024-04-23T02:39:05Z"
}
```

422

**application/json**

无 Schema
