订购

获取订购信息

GET /residential/subscription

查询示例:

curl -X GET https://resi-api.iproyal.com/v1/residential/subscription \
     -H "Authorization: Bearer <your_api_token>"

查询结果:

{
  "quantity": 1000,
  "amount": 3150,
  "status": "paid",
  "next_payment_date": "2025-07-26",
  "payment_method": "balance",
  "card_id": null
}

删除订购

DELETE /residential/subscription

查询示例:

curl -X DELETE https://resi-api.iproyal.com/v1/residential/subscription \
     -H "Authorization: Bearer <your_api_token>"
     -H "Content-Type: application/json" 

更换付款方式

POST /residential/subscription/change-payment-method

查询参数:

名称
类型
说明

payment_method(付款方式)

字符串

balance (余额)或 card(银行卡)

card_id(卡号)

数值

用户名下银行卡

查询示例:

curl -X POST https://resi-api.iproyal.com/v1/residential/subscription/change-payment-method \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer <your_api_token>" \
     -d '{
           "payment_method": "card",
           "card_id": 1231
         }'

Last updated