# 账户下云esim卡订单退款

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v3/cloudesim/refund:
    post:
      summary: 账户下云esim卡订单退款
      deprecated: false
      description: |-
        账户下云esim卡订单退款
        错误码：
        45113 - 当前状态下不允许退款。订单在成功状态下才可以退款

        关于订单可退金额计算规则：
        1.购买后24小时内，全额退款；
        2.退款金额 = min(未使用天数/总可使用天数,未使用流量/总流量)*总用户支付金额 ；
        3.金额在日元外币种，最小单位为分，向下取整，日元最小单位为元，同向下取整；
      tags:
        - API接口/CloudESIM
        - 国内
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              title: ''
              type: object
              properties:
                appkey:
                  type: string
                  default: '{{APPKEY}}'
                  description: >-
                    appkey平台用以确定客户端应用的身份。应用键对应一个密钥 secret。要基于服务平台开发应用，必须事先通过申请获取
                    appkey/secret 后，才能进行应用的开发。
                  x-apifox-mock: '{{APPKEY}}'
                timestamp:
                  type: integer
                  description: 当前时间戳，10位数字
                  x-apifox-mock: '{{TIMESTAMP}}'
                nonce:
                  type: integer
                  minimum: 10000
                  maximum: 99999
                  description: |
                    5位随机正整数
                sign:
                  type: string
                  description: 签名串，请求参数的签名，服务平台通过它验证请求数据的合法性。
                  x-apifox-mock: '{{SIGN}}'
                orderId:
                  type: string
                  description: API购买套餐后的平台订单号
                  deprecated: true
                  title: 弃用
                remark:
                  type: string
                  title: 退款说明
                  description: 退款说明
                eshopOrderId:
                  type: integer
                  description: 购买后的平台内部订单号
              x-apifox-orders:
                - appkey
                - timestamp
                - nonce
                - sign
                - orderId
                - eshopOrderId
                - remark
              required:
                - appkey
                - timestamp
                - nonce
                - sign
                - remark
            example:
              appkey: '{{APPKEY}}'
              timestamp: null
              nonce: 85139
              sign: '{{SIGN}}'
              eshopOrderId: 11111111
              remark: laborum
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: 200：表示成功其他失败
                    title: 状态码
                  message:
                    type: string
                    description: 成功或失败原因
                    title: 原因
                  data:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: |
                      返回数据
                    title: ''
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: '200'
                message: success
                data: {}
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API接口/CloudESIM
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/2330898/apis/api-359350802-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://oapi.eiotclub.com
    description: 生产环境
security: []

```
