QuickLinkPay Scheme Integration Guide
What is QuickLinkPay
QuickLinkPay is a mobile terminal APP provided by Newage for merchants to use, merchants can use QuickLinkPay to do code-sweeping transactions, billing inquiries, transaction summaries, etc. QuickLinkPay also provides Scheme calls, so that other APPs can call LinkPay's payment functions. You can download LinkPay APP from APP Store and Google Play.
What is Scheme
Scheme is a way to define jumps between different pages or functions within an application. Scheme allows us to quickly jump between different pages within an application, as well as jump from other applications or web pages to a specific page in our application.
Integration Process
Android Integration Process
- First of all, you have to set up a URL Schemes and Identifier in the AndroidManifest.xml file of your app file so that you can jump back to your app interface after the linkpay transaction is completed. Like this:
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="payment.com"
android:path="/result"
android:scheme="app" />
</intent-filter>
</activity>
- Start linkpay with scheme, like this:
Purchase message:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("linkpay://newage.com/cashier?merchant_order_no=1122223&trans_type=1&order_amount=1¬ify_url=app://payment.com/result"));
startActivity(intent);
Refund message:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("linkpay://newage.com/cashier?merchant_order_no=1122223&orig_merchant_order_no=122222&trans_type=3&order_amount=1¬ify_url=app://payment.com/result"));
startActivity(intent);
IOS Integration Process
- First of all, you have to set up a URL Schemes and Identifier in the info.plist file of your app file so that you can jump back to your app interface after the linkpay transaction is completed. Like this:
<key>CFBundleURLName</key>
<string>payment.com/result</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app</string>
</array>
- Start linkpay with scheme, like this:
Purchase message:
let url = URL(string: "linkpay://newage.com/cashier?merchant_order_no=1122223&trans_type=1&order_amount=1¬ify_url=app://payment.com/result")!
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
Refund message:
let url = URL(string: "newage.com/cashier?merchant_order_no=1122223&orig_merchant_order_no=122222&trans_type=1&amount=1¬ify_url=app://payment.com/result")!
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
Transaction Message
Request parameters
Name | ID | Type | Mandatory | Description |
---|---|---|---|---|
Notify URL | notify_url | Text(32) | M | Scheme address that needs to be notified when a LinkPay transaction is completed to initiate a callback |
Pay Scenario | pay_scenario | Text(32) | O | Payment scene, see PayScenario Example:BSCANQR_PAY |
Payment Method ID | pay_method_id | Text(32) | O | Payment method number. If you want to specify a payment method, see PayMethod Example:Alipay |
Order amount | order_amount | Amount | M | Expressed in the quoted currency.currently, we mainly support the Japanese yen, for example, Example:34 |
Transaction type | trans_type | Number | M | For transaction types, see TransType, Currently only consumption and refunds are supported Example:1 |
Merchant system order number | merchant_order_no | Text(32) | M | Refund shall be the order number applied for refund, which is different from the order number of the original consumption transaction. Contains a maximum of 32 alphanumeric characters Example:1217752501201407033233368018 |
Original merchant system order number | orig_merchant_order_no | Text(32) | C | A maximum of 32 alphanumerical characters must be used if the transaction type is refund trans_type == 3 Example:1217752501201407033233368018 |
Description information of the order | description | Text(32) | C | Description information of the order |
Response parameters
Name | ID | Type | Mandatory | Description |
---|---|---|---|---|
Trans No | trans_no | Text(32) | M | Transaction order number, which is returned when the transaction is successful |
Trans Status | trans_status | Text(1) | M | Transaction status, when equals to 2, it means the transaction is successful, other values means the transaction is failed. |
Pay Scenario | pay_scenario | Text(32) | O | Payment scene, see PayScenario Example:BSCANQR_PAY |
Payment Method ID | pay_method_id | Text(32) | O | Payment method number. If you want to specify a payment method, see PayMethod Example:Alipay |
Order amount | order_amount | Amount | M | Expressed in the quoted currency.currently, we mainly support the Japanese yen, for example, Example:34 |
Transaction type | trans_type | Number | M | For transaction types, see TransType, Currently only consumption and refunds are supported Example:1 |
Merchant system order number | merchant_order_no | Text(32) | M | Refund shall be the order number applied for refund, which is different from the order number of the original consumption transaction. Contains a maximum of 32 alphanumeric characters Example:1217752501201407033233368018 |