# Ideal

## Direct

## Ideal

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

#### Headers

| Name                                           | Type   | Description                       |
| ---------------------------------------------- | ------ | --------------------------------- |
| content-type<mark style="color:red;">\*</mark> | String | application/x-www-form-urlencoded |

#### Request Body

| Name                                              | Type         | Description                                                                                                                 |
| ------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- |
| transactionType<mark style="color:red;">\*</mark> | String       | <p></p><p></p><p>交易类型 : <strong>pay</strong> </p>                                                                           |
| version<mark style="color:red;">\*</mark>         | String(5)    | 目前固定为 1.0                                                                                                                   |
| signType<mark style="color:red;">\*</mark>        | String       | 商户生成签名字符串所使用的签名算法类型，目前支持：RSA/MD5                                                                                            |
| merchantNo<mark style="color:red;">\*</mark>      | String(16)   | 商户号                                                                                                                         |
| transactionId<mark style="color:red;">\*</mark>   | String(64)   | 商户订单号                                                                                                                       |
| transactionExpirationTime                         | String(6)    | 过期时间 (分钟)                                                                                                                   |
| appId<mark style="color:red;">\*</mark>           | String (128) | 网站域名                                                                                                                        |
| amount<mark style="color:red;">\*</mark>          | String(12)   | 支付金额，单位为对应币种的最小货币单位[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md)                                     |
| currency<mark style="color:red;">\*</mark>        | String(3)    | 3 位 ISO 大写字母货币代码[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md) 目前仅支持**EUR**                           |
| notifyUrl<mark style="color:red;">\*</mark>       | String(512)  | [异步通知](/developer/reference/notify/notifyurl.md)                                                                            |
| echoParam                                         | String(256)  | 回声参数，响应报文会原样返回                                                                                                              |
| payerInfo<mark style="color:red;">\*</mark>       | String       | Json格式的String 付款方信息, 请下方                                                                                                    |
| orderInfo                                         | String       | json string, 订单信息, 请参考下方                                                                                                    |
| userInfo<mark style="color:red;">\*</mark>        | String       | json string, 消费者信息, 请参考[消费者信息](https://useepay.gitbook.io/developer/reference/api-reference/parameter-description#userinfo) |
| redirectUrl                                       | String(512)  | 跳转商户地址                                                                                                                      |

## Redirect

## Ideal

<mark style="color:green;">`POST`</mark> `USEEPAY_PATH/cashier`

#### Headers

| Name                                           | Type   | Description                       |
| ---------------------------------------------- | ------ | --------------------------------- |
| content-type<mark style="color:red;">\*</mark> | String | application/x-www-form-urlencoded |

#### Request Body

| Name                                              | Type         | Description                                                                                                                 |
| ------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- |
| transactionType<mark style="color:red;">\*</mark> | String       | <p></p><p></p><p>交易类型 : <strong>pay</strong> </p>                                                                           |
| version<mark style="color:red;">\*</mark>         | String(5)    | 目前固定为 1.0                                                                                                                   |
| signType<mark style="color:red;">\*</mark>        | String       | 商户生成签名字符串所使用的签名算法类型，目前支持：RSA/MD5                                                                                            |
| merchantNo<mark style="color:red;">\*</mark>      | String(16)   | 商户号                                                                                                                         |
| transactionId<mark style="color:red;">\*</mark>   | String(64)   | 商户订单号                                                                                                                       |
| transactionExpirationTime                         | String(6)    | 过期时间 (分钟)                                                                                                                   |
| appId<mark style="color:red;">\*</mark>           | String (128) | 网站域名                                                                                                                        |
| amount<mark style="color:red;">\*</mark>          | String(12)   | 支付金额，单位为对应币种的最小货币单位[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md)                                     |
| currency<mark style="color:red;">\*</mark>        | String(3)    | 3 位 ISO 大写字母货币代码[(详见 ISO 4217)](/developer/gui-fan-xing-shuo-ming/huo-bi-dan-wei.md) 目前仅支持**EUR**                           |
| notifyUrl<mark style="color:red;">\*</mark>       | String(512)  | [异步通知](/developer/reference/notify/notifyurl.md)                                                                            |
| echoParam                                         | String(256)  | 回声参数，响应报文会原样返回                                                                                                              |
| payerInfo<mark style="color:red;">\*</mark>       | String       | Json格式的String 付款方信息, 请下方                                                                                                    |
| orderInfo                                         | String       | json string, 订单信息, 请参考下方                                                                                                    |
| userInfo<mark style="color:red;">\*</mark>        | String       | json string, 消费者信息, 请参考[消费者信息](https://useepay.gitbook.io/developer/reference/api-reference/parameter-description#userinfo) |
| redirectUrl                                       | String(512)  | 跳转商户地址                                                                                                                      |
| autoRedirect                                      | String       | false: 不跳转 默认true                                                                                                           |
| autoRedirect                                      | String       | false：不直接跳转 默认true                                                                                                          |

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

```javascript
{
    "amount": "100",
    "redirectUrl": "https://checkout1.uat.useepay.com/?accessToken=eAF1VM1u20YQfpfNVZL5J4riqbJitQFsV4ntBEFRFCvumFp4uUssl1YIw-ccghwD9FjkAdpTH6lB-hadIbm206IrgBBnhjPffPPN3jELTascy-_YtbSNO-cVsJy9loUzlk2Y4g-2t1yXaCm5gwPvLkxrCwq9ujg52a7eoqfmXQXanYHbG9Gw_Kc7VnArLrsahjeH__ALKYArdv_zhOmhmtFKavhlx_WNxBrkMVaAfaGvDSHbSYUB5XNoCitrApazVX-wKpawEmMFGg-HwwxRzApTkae1FnTRoePk6hVBN4hr7PDr75__-vjpy2_v__78K7oqsMWea_djX5dyRUEUBXEYB4s4jZIAYwZM5AuDcHCGyzhN54sgytDvLNfNqkIyMYA-6A3UPloaroDdT5hs1ly_bGVxs-WErENukLq90XCOzbI4iufZPEniGM1QcanQeNuPY9bhBL5rG4DHHrlSa6OvZem54oLXDoihIMEMO-Ocqd4gdLQc40EbNVrCKT5aXhK2kIwW-MAsF5XUq776DoQAsVElpSOLFpeygrVR_QyebTZJ0ndaVm5NCYDcLA9TpCcMoiRZZEvkvXJnRsjrznuTNArTOErTLEVGENoyiImai705rE2rnTAHPdZUjzhBIwakRF8iW-h-FvSHjFDtRg0g9XTCJCUG_Vx7ecwHFz0XcUZde_cois2XPz98_eMTOQgvygqrPPCBrB-7_9Ymc4ss6618BzitCMeJRKFgt0YpahnVP5_gpglpoSAqPOkN9nuM4h5b9a__1joh7X1Ph-mNa1yxvVFi3CUaE8Wub28xqw_aGDOIwhu-p1UQuFBPgnrbmMbHnZqSVOmz9utBA3vI_AZ2jXQPDTlu3TcSSVb0I1CdPjcOSS24k0YPt8SY2kFVK1QPTSlCJfj3cSw_mMaBwH2h62VLmn0MubLE3hFZaP2otmlpBaMsG3awOzUF3jdDE7g9Z-OqXwywA3aPa-mHM6TbO1c3-dHReNc5aNzsyd55-5QcR_7T11FLBb2k_kdxdCOem9N2r9d7KG5Y7mwLE8brWgF26MG9ENiqV6BPSffarOFa7Mw7j4caNze4GTlqts4rXsucEDW5WGYR382DKY-KcBqGUEyXSQFTWKZZmPB4kUDG7v8B8ILu-Q%3D%3D",
    "resultCode": "received",
    "sign": "315312290b67f072da72560ecbb2ebdd",
    "errorCode": "0000",
    "transactionId": "202203130736240",
    "errorMsg": "Approved or completed successfully",
    "token": "mop:mapi:redis:d982ab50-a2c1-11ec-94ce-e96814a374e8",
    "transactionType": "pay",
    "reference": "1012203131936657028",
    "echoParam": "echoParam",
    "reserved": "reserved",
    "signType": "MD5",
    "currency": "EUR",
    "merchantNo": "500000000007381"
}
```

{% endtab %}
{% endtabs %}

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

#### Request Header

Content-Type: application/x-www-form-urlencoded

#### Request Body

```
amount=100&appId=www.pay.com&autoRedirect=false&country=&currency=EUR&deviceInfo=&echoParam=echoParam&gatewaySource=useepay&language=&merchantNo=500000000007381&notifyUrl=https://gatewaytest.useepay.com/gateway-test/notifyV2u0&orderInfo={"subject":"订单标题"}&payerInfo={"paymentMethod":"ideal","billingAddress":{"houseNo":"El+Gallo+Giro","email":"victor.yang@useepay.com","phoneNo":"3235854433","firstName":"Victor","lastName":"Yang","street":"7148+Pacific+Blvd,+Huntington+Park,+CA","postalCode":"000000","city":"Huntington+Park","state":"CA","country":"US"}}&redirectUrl=https://gatewaytest.useepay.com/gateway-test/redirectV2u0&reserved=reserved&sign=8711fc280d24e5d6ab980573e77bcc90&signType=MD5&terminalType=WEB&transactionExpirationTime=30&transactionId=202203130736240&transactionType=pay&userInfo={"userId":"victor007","ip":"103.25.65.178","email":"victor.yang@useepay.com","phoneNo":"(323)+585-4433","createTime":"20200520131400"}&version=1.0
```

{% endtab %}

{% tab title="Response" %}

```
{
    "amount": "100",
    "redirectUrl": "https://checkout1.uat.useepay.com/?accessToken=eAF1VM1u20YQfpfNVZL5J4riqbJitQFsV4ntBEFRFCvumFp4uUssl1YIw-ccghwD9FjkAdpTH6lB-hadIbm206IrgBBnhjPffPPN3jELTascy-_YtbSNO-cVsJy9loUzlk2Y4g-2t1yXaCm5gwPvLkxrCwq9ujg52a7eoqfmXQXanYHbG9Gw_Kc7VnArLrsahjeH__ALKYArdv_zhOmhmtFKavhlx_WNxBrkMVaAfaGvDSHbSYUB5XNoCitrApazVX-wKpawEmMFGg-HwwxRzApTkae1FnTRoePk6hVBN4hr7PDr75__-vjpy2_v__78K7oqsMWea_djX5dyRUEUBXEYB4s4jZIAYwZM5AuDcHCGyzhN54sgytDvLNfNqkIyMYA-6A3UPloaroDdT5hs1ly_bGVxs-WErENukLq90XCOzbI4iufZPEniGM1QcanQeNuPY9bhBL5rG4DHHrlSa6OvZem54oLXDoihIMEMO-Ocqd4gdLQc40EbNVrCKT5aXhK2kIwW-MAsF5XUq776DoQAsVElpSOLFpeygrVR_QyebTZJ0ndaVm5NCYDcLA9TpCcMoiRZZEvkvXJnRsjrznuTNArTOErTLEVGENoyiImai705rE2rnTAHPdZUjzhBIwakRF8iW-h-FvSHjFDtRg0g9XTCJCUG_Vx7ecwHFz0XcUZde_cois2XPz98_eMTOQgvygqrPPCBrB-7_9Ymc4ss6618BzitCMeJRKFgt0YpahnVP5_gpglpoSAqPOkN9nuM4h5b9a__1joh7X1Ph-mNa1yxvVFi3CUaE8Wub28xqw_aGDOIwhu-p1UQuFBPgnrbmMbHnZqSVOmz9utBA3vI_AZ2jXQPDTlu3TcSSVb0I1CdPjcOSS24k0YPt8SY2kFVK1QPTSlCJfj3cSw_mMaBwH2h62VLmn0MubLE3hFZaP2otmlpBaMsG3awOzUF3jdDE7g9Z-OqXwywA3aPa-mHM6TbO1c3-dHReNc5aNzsyd55-5QcR_7T11FLBb2k_kdxdCOem9N2r9d7KG5Y7mwLE8brWgF26MG9ENiqV6BPSffarOFa7Mw7j4caNze4GTlqts4rXsucEDW5WGYR382DKY-KcBqGUEyXSQFTWKZZmPB4kUDG7v8B8ILu-Q%3D%3D",
    "resultCode": "received",
    "sign": "315312290b67f072da72560ecbb2ebdd",
    "errorCode": "0000",
    "transactionId": "202203130736240",
    "errorMsg": "Approved or completed successfully",
    "token": "mop:mapi:redis:d982ab50-a2c1-11ec-94ce-e96814a374e8",
    "transactionType": "pay",
    "reference": "1012203131936657028",
    "echoParam": "echoParam",
    "reserved": "reserved",
    "signType": "MD5",
    "currency": "EUR",
    "merchantNo": "500000000007381"
}
```

{% endtab %}
{% endtabs %}

## Refund

支持退款


---

# Agent Instructions: 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:

```
GET https://useepay.gitbook.io/developer/reference/local-pay-ben-di-hua/ben-di-hua-jie-kou/yin-hang-zhuan-zhang/ideal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
