> 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  |


---

# 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://useepay.gitbook.io/developer/reference/api-reference-xin-yong-ka/order/capture.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.
