# Verify API

This API is used to do the verification step of Exchange Payment request. It is not required if you have **No SMS Verification Flow** setup in your account.

## Request

### Endpoint

```markup
https://fe-pay.lianlianpay.com/exchange/v1/bankcardpayverify
```

> Direct APIs have an additional requirement which involves our payment risk team and due diligence team. You need to contact your business development to obtain the access.

### Request Parameters

| Name         | Required | Type       | Description                                                                                                                                                                   |
| ------------ | -------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| api\_version | Required | String(6)  | Fixed value, `1.0`                                                                                                                                                            |
| sign\_type   | Required | String(3)  | RSA                                                                                                                                                                           |
| sign         | Required | String     | Signature value, refer to [signature document](../development/signature)                                                                                                      |
| time\_stamp  | Required | String(14) | The time when request is initialized. Format: yyyyMMddHHmmss, E.g. 20170801225714. The deviation can NOT exceed 30 minutes between your server and LianLian's server(GMT +8). |
| oid\_partner | Required | String(18) | The unique identification assigned to the merchant. E.g. 201304121000001004                                                                                                   |
| user\_id     | Required | String(32) | The unique identification assigned to the user in the merchant’s system                                                                                                       |
| token        | Required | String     | The token returned in [Exchange Payment Apply API](exchange-payment-apply-api)                                                                                                |
| verify\_code | Required | String(6)  | The SMS verification code sent in [Exchange Payment Apply API](exchange-payment-apply-api)                                                                                    |
| no\_order    | Required | String(32) | Merchant transaction No.                                                                                                                                                      |

### Sample Request

```
curl https://fe-pay.lianlianpay.com/exchange/v1/bankcardpayverify \
-H "Content-type:application/json;charset=utf-8" \
-d '{
        "oid_partner": "201103171000000000",
        "no_order": "2013051500001",
        "api_version": "1.0",
        "verify_code": "222222",
        "token": "D096DBA0E3E0CC8F1D504C06E71D292D",
        "user_id": "01020000",
        "time_stamp": "20130515094137",
        "sign_type ": "RSA",
        "sign": "ZPZULntRpJwFmGNIVKwjLEF2Tze7bqs60rxQ22CqT5J1UlvGo575QK9z/+p+7E9cOoRoWzqR6xHZ6WVv3dloyGKDR0btvrdqPgUAoeaX/YOWzTh00vwcQ+HBtXE+vPTfAqjCTxiiSJEOY7ATCF1q7iP3sfQxhS0nDUug1LP3OLk="
    }'
```

## Response

### Parameters

| Name      | Required | Type        | Description                                                                                                           |
| --------- | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
| ret\_code | Required | String(4)   | Return code, whether the request is handled successfully or not. Refer to [return codes](../development/return-codes) |
| ret\_msg  | Required | String(100) | Return message, description of `ret_code`, in Chinese                                                                 |

The following parameters are returned only when `ret_code=0000`:

| Name             | Required | Type        | Description                                                                                                                                                                      |
| ---------------- | -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| oid\_partner     | Required | String(18)  | The unique identification assigned to the merchant. E.g. 201304121000001004                                                                                                      |
| sign\_type       | Required | String(3)   | Fixed value, RSA                                                                                                                                                                 |
| sign             | Required | String      | Signature value, refer to [signature document](../development/signature)                                                                                                         |
| no\_order        | Required | String(32)  | Merchant transaction No.                                                                                                                                                         |
| dt\_order        | Required | String(14)  | The date when the transaction is initialized. Format: yyyyMMddHHmmss, E.g. 20170801225714                                                                                        |
| oid\_paybill     | Required | String(18)  | Unique transaction No. in LianLian system. E.g. 2011030900001098                                                                                                                 |
| result\_pay      | Required | String      | <p>Payment result. <br> SUCCESS - Payment proceed successfully <br> PROCESSING -  Payment is processing. Return only when <strong>No SMS Verification Flow</strong> is setup</p> |
| settle\_date     | Required | String(8)   | Format YYYYMMDD.                                                                                                                                                                 |
| info\_order      | Optional | String(255) | Returns when `info_order` is sent in API requests                                                                                                                                |
| pay\_type        | Required | String(1)   | The pay type used in current transaction.                                                                                                                                        |
| currency\_order  | Required | String(3)   | The currency used in the transaction. Refer to [supported currencies](../development/supported-currencies)                                                                       |
| money\_order     | Required | String(12)  | Merchant transaction amount, range: 0.01 \~ 100,000,000.00, 2 decimal places are expected, in the currency of `currency_order`                                                   |
| currency\_settle | Required | String(3)   | The settle currency of transaction                                                                                                                                               |
| money\_settle    | Required | String(12)  | The settle amount of transaction                                                                                                                                                 |
| currency\_pay    | Required | String(3)   | The currency of which the payer used. Refer to [supported currencies](../development/supported-currencies)                                                                       |
| money\_pay       | Required | String(12)  | The amount of which the payer payed                                                                                                                                              |
| exchange\_rate   | Required | String      | The exchange rate of current transaction                                                                                                                                         |
| no\_agree        | Optional | String(16)  | A token which represents the key payment information, refer to [Card binding document](../relevant-api/card-bind-overview) for more details                                      |

### Sample Response

```javascript
{
    "oid_partner": "201103171000000000",
    "dt_order": "20130515094013",
    "no_order": "2013051500001",
    "oid_paybill": "2013051613121201",
    "money_order": "31.68",
    "currency_order": "USD",
    "money_pay": "210.97",
    "currency_pay": "CNY",
    "money_sellte": "31.47",
    "currency_sellte": "USD",
    "exchange_rate": "6.66",
    "result_pay": "SUCCESS",
    "settle_date": "20130516",
    "info_order": "用户13958069593购买了3桶羽毛球",
    "pay_type": "D",
    "bank_code": "01020000",
    "ret_code": "0000",
    "ret_msg": "交易成功",
    "sign_type": "RSA",
    "sign": "ZPZULntRpJwFmGNIVKwjLEF2Tze7bqs60rxQ22CqT5J1UlvGo575QK9z/+p+7E9cOoRoWzqR6xHZ6WVv3dloyGKDR0btvrdqPgUAoeaX/YOWzTh00vwcQ+HBtXE+vPTfAqjCTxiiSJEOY7ATCF1q7iP3sfQxhS0nDUug1LP3OLk="
}
```
