> 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/english-3/coin-grants-refund.md).

# Coin Grants/Refund

## Coin Grants/Refund

## Coin Grants/Refund

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

It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body

#### Request Body

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| app\_id<mark style="color:red;">\*</mark> | String | Merchant AppKey |
| sign<mark style="color:red;">\*</mark>    | String | Signature       |
| data<mark style="color:red;">\*</mark>    | String |                 |
| time<mark style="color:red;">\*</mark>    | String |                 |

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

```javascript
{
  "code": "",
  "msg": "o",
  "data": "",
  "sign":""
}

data:
{
    "orderNum": "xxxx"
}
```

{% endtab %}
{% endtabs %}

The following are the parameters involved in rsa encryption:

Either the UID or OpenID of the payee must exist, and if both are present, the OpenID takes precedence.

<table><thead><tr><th width="136">name</th><th width="124">type</th><th>required</th><th width="214">example</th><th>Description</th></tr></thead><tbody><tr><td>appOrderId</td><td>String</td><td>YES</td><td>10000001</td><td>Merchant-side order id, unique across the board</td></tr><tr><td>assetType</td><td>String</td><td>YES</td><td>202012</td><td>Payment account type: AB part of AB, default to available accounts</td></tr><tr><td>openId</td><td>String</td><td>NO</td><td></td><td>The unique id of the receiving user, the unique identification of the user authorized by the open platform to the application</td></tr><tr><td>userId</td><td>String</td><td>NO</td><td></td><td>Receiving user uid (and openid must exist a) || at the same time there is priority to take openid</td></tr><tr><td>orderAmount</td><td>String</td><td>YES</td><td>200</td><td>Amount</td></tr><tr><td>orderSceneType</td><td>String</td><td>NO</td><td>202</td><td>Scene type of the order, numerical enumeration.</td></tr><tr><td>payCoinSymbol</td><td>String</td><td>YES</td><td>btc</td><td>Payment currency, capitalized as 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/english-3/coin-grants-refund.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.
