go to Evonet

LinkPay Integration Step

Follow this chapter to complete payment integration via our Hostage product LinkPay API.

Get a Payment Link

Follow the steps below to build your API request and obtain a payment link (LinkUrl).

Once you receive the payment link, you can redirect the user to the LinkPay Payment Page. On the LinkPay Payment Page, the user can select a payment method and complete the payment.

📘

Note

If you have built your own checkout page and want the user to select the payment method within your checkout, simply pass the enumerated value of the selected payment method into the merchantOrderInfo.enabledPaymentMethod field when calling the POST interaction API. For example:

"enabledPaymentMethod": ["Boost"]

The name and logo of each payment method should be displayed on your checkout page. You can download them here: Payment Method Names & Logos

For more parameter details, please refer to the POST interaction API.


Receive the Payment Result

Via Webhook

If you include a webhook URL in the POST interaction request, you will receive a payment result notification via Webhook when the payment succeeds.

For parameters, see the API Explorer: interaction Notification

Via returnURL

If you include a returnURL in the POST interaction request, Evonet will append the payment result to the returnURL and redirect the user back to the merchant site once the payment succeeds.

📘

Example

If your returnURL is:

https://www.merchant.com

After the payment is completed successfully, Evonet will redirect the user to:

https://www.merchant.com?merchantOrderID=123123123123&result=success

Retrieve the Payment Result

Follow the steps below to retrieve the payment result of a LinkPay order you created.

Use GET and append merchantOrderID to the request URL to obtain the payment result.

How to determine if the payment was successful: In the Retrieve the Payment Result API response or in an asynchronous notification, check the following fields:

"result.code": "S0000"
"merchantOrderInfo.status": "Paid"
"transactionInfo.status": "Capture"

For more parameter details, see the GET interaction API


Use POST /payment/{merchantTransID}/refund to initiate a full or partial refund for an order that has already been successfully paid.

📘

merchantTransID must be obtained from transactionInfo.merchantTransInfo.merchantTransID in the retrieval response or in an asynchronous notification.


Use GET /payment/{merchantTransID} to query the refund status.


Using LinkPay for subscriptions

It is possible to use LinkPay to setup subscription scenario, the integration flow is about the same as above, only few minor adjustments as below:

First Time Subscription:

  1. When creating a LinkPay payment link, use the following parameters:
    {
      "userInfo": {
        "reference": "your_user_reference"
      },
      "paymentMethod": {
        "recurringProcessingModel": "Subscription"
      }
    }
    User action required: On the LinkPay payment page, the user must check "Save card details for next time" so that the system can generate a token after payment completion for future recurring transactions.
  2. Save the Token
    • After payment is completed, store the token from either webhook or payment response API.
    • Store the token.value in your system and bind it with userInfo.reference.

Subsequent subscription (MIT Transaction)

  • Use the Payment API to initiate the transaction.
  • The request parameters must include (see the Appendix Payment API interface for details):
    {
      "paymentMethod": {
        "token": {
          "value": "Previously saved token value"
        },
        "recurringProcessingModel": "Subscription"
      }
    }
  • Order Tracking:Use merchantTransID to track the order ID of the subsequence payments. (GET Payment)
  • Capture transactions
    • captureAfterHours should set to 0 for immediate capture
    • If this field is not provided, the merchant must later call the POST /capture API to perform manual capture.