> For the complete documentation index, see [llms.txt](https://useepay.gitbook.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://useepay.gitbook.io/developer/reference/api-reference-xin-yong-ka/order/capture.md).

# 预授权完成

## API

## 预授权完成

<mark style="color:green;">`POST`</mark> `BASE_URL/api`

#### Request Body

| Name                                                    | Type    | Description                                                                                        |
| ------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------- |
| sign<mark style="color:red;">\*</mark>                  | string  | 签名值                                                                                                |
| signType<mark style="color:red;">\*</mark>              | string  | 签名类型, **MD5** / **RSA** (max=4)                                                                    |
| echoParam                                               | string  | 回声参数，Response 中将会原样返回 (max=256)                                                                    |
| notifyUrl                                               | string  | 异步通知地址 (max=512)                                                                                   |
| amount<mark style="color:red;">\*</mark>                | string  | 订单金额, 必须大于0，单位为对应货币的最小货币单位参考[货币单位](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md)一节 (max=12) |
| originalTransactionId<mark style="color:red;">\*</mark> | integer | 原始预授权的商户订单号 (max=64)                                                                               |
| transactionType<mark style="color:red;">\*</mark>       | string  | capture (max=64)                                                                                   |
| transactionId<mark style="color:red;">\*</mark>         | string  | 商户订单号, 需要唯一 (max=64)                                                                               |
| merchantNo<mark style="color:red;">\*</mark>            | string  | 商户号 (max = 16)                                                                                     |
| version<mark style="color:red;">\*</mark>               | string  | 目前固定为 1.0 (max = 5)                                                                                |

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

```
{
    "amount": "1234",
    "resultCode": "succeed",
    "sign": "8db0e04bfe40261209a99ba7fda32e77",
    "errorCode": "0000",
    "transactionId": "202112011028078",
    "errorMsg": "Approved or completed successfully",
    "transactionType": "capture",
    "reference": "1112112011028652516",
    "echoParam": "echoParam",
    "originalTransactionId": "202112011016327",
    "signType": "MD5",
    "currency": "USD",
    "merchantNo": "500000000007381"
}
```

{% endtab %}
{% endtabs %}

## Result

| 字段                    | 长度      | 描述                                                                                      | 是否必要 |
| --------------------- | ------- | --------------------------------------------------------------------------------------- | ---- |
| merchantNo            | max=16  | max=16 商户编号，由 USEEPAY 分配                                                                | yes  |
| transactionId         | max=64  | 商户订单号，需保证在商户端不重复                                                                        | yes  |
| originalTransactionId | max=64  | 原始预授权的商户订单号                                                                             | yes  |
| transactionType       | max=18  | 交易类型：capture                                                                            | yes  |
| reference             | max=32  | USEEPAY 订单号                                                                             |      |
| amount                | max=12  | 支付金额，单位为对应币种的最小货币单位[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md) | yes  |
| currency              | max=3   | 3 位 ISO 大写字母货币代码[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md)    | yes  |
| resultCode            | max=32  | 业务结果（详见 [业务结果码](/developer/reference/resultcode.md)）**判断交易是否成功的依据**                     | yes  |
| errorCode             | max=4   | 错误码（详见 错误码 errorCode）                                                                   |      |
| errorMsg              | max=256 | 错误码消息描述                                                                                 |      |
| echoParam             | max=256 | 回声参数，响应报文会原样返回                                                                          |      |
| sign                  | max=256 | 签名                                                                                      | yes  |
