> For the complete documentation index, see [llms.txt](https://platformv2docs.chainup.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platformv2docs.chainup.com/zeng-bi.md).

# 赠币

## 赠币接口 <a href="#zeng-bi-jie-kou" id="zeng-bi-jie-kou"></a>

## 赠币接口

<mark style="color:green;">`POST`</mark> `https://service.xxx.com/platformapi/chainup/open/opay/refundOrder`

需要将参数表格中的数据包装成json字符串 利用rsa 进行参数加密和签名 作为body中的data和sign

#### Request Body

| Name                                      | Type   | Description                  |
| ----------------------------------------- | ------ | ---------------------------- |
| app\_id<mark style="color:red;">\*</mark> | String | 商家唯一app\_id                  |
| time<mark style="color:red;">\*</mark>    | String | 请求时间                         |
| sign                                      | String | 用rsa\_third\_pri对query中的数据签名 |
| data                                      | String | rsa\_saas\_pub加密query中数据     |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "code": "", //返回code	
    "msg": "", //成功或失败提示信息	
    "data": "",
    "sign": ""
}

data 中解密后的结构体

{
    "orderNum": "订单编号"
}
```

{% endtab %}
{% endtabs %}

以下为参与rsa加密的参数:

收款用户uid与openid必须存在一个,同时存在优先取openid

<table><thead><tr><th width="136">名称</th><th width="124">类型</th><th>是否必需</th><th width="214">例子</th><th>描述</th></tr></thead><tbody><tr><td>appOrderId</td><td>String</td><td>YES</td><td>10000001</td><td>商家端订单id，全局唯一</td></tr><tr><td>assetType</td><td>String</td><td>YES</td><td>202012</td><td>支付账户类型：AB的AB部分，默认到可用账户</td></tr><tr><td>openId</td><td>String</td><td>NO</td><td></td><td>收款用户的唯一id，开放平台授权给应用的用户唯一标识</td></tr><tr><td>userId</td><td>String</td><td>NO</td><td></td><td>收款用户uid(与openid必须存在一个) ||同时存在优先取openid</td></tr><tr><td>orderAmount</td><td>String</td><td>YES</td><td>200</td><td>金额</td></tr><tr><td>orderSceneType</td><td>String</td><td>NO</td><td>202</td><td>订单的场景类型，数字枚举；</td></tr><tr><td>payCoinSymbol</td><td>String</td><td>YES</td><td>btc</td><td>支付币种，大写如BTC</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://platformv2docs.chainup.com/zeng-bi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
