Developer Suite
Register Sandbox
Register Sandbox
    • Overview
    • API Endpoints
    • Ecommerce Checkout
      • Purchase
        POST
      • Get a transaction details
        POST
      • Close transaction
        POST
      • Check transaction
        POST
      • Refund API
        POST
      • Get transaction list
        POST
      • Exchange rate
        POST
    • Checkout Plugins
      • Prestashop
      • Woocommerce
    • Credentials on File
      • Link Account
        POST
      • Link Card
        POST
      • Purchase using token
        POST
      • Remove account token
        POST
      • Remove card token
        POST
      • Get linked account details
        POST
    • ABA QR API
      • QR API
        POST
    • Payment Link
      • Create payment link
        POST
      • Get payment link details
        POST
    • Pre-auth
      • Complete pre-auth transactions
        POST
      • Complete pre-auh transaction with payout
        POST
      • Cancel pre-purchase transaction
        POST
    • Payout
      • Payout
      • Update a beneficiary status
      • Add a beneficiary to whitelist
    • KHQR Guideline
    • Resources

    Payment Link

    1. Introduction#

    You can manually create a payment link through the ABA PayWay Merchant Portal or the ABA Merchant App. However, we also offer flexibility by allowing you to generate payment links via API, enabling seamless integration with your existing system.

    Why is this beneficial for you?#

    Imagine you own an online streaming shop, where customers purchase items during a live stream. Your system automatically responds to customers and requests payment by asking them to transfer funds to your bank account. This manual process can lead to several issues:
    1.
    Incorrect Account Number: Buyers might enter the wrong bank account number.
    2.
    Incorrect Payment Amount: Buyers may mistakenly transfer the wrong amount.
    3.
    Manual Verification: As a merchant, you must carefully verify transactions before shipping products.
    4.
    Time-Consuming & Inefficient: The back-and-forth communication delays order processing.

    How does the Payment Link API solve these pain points?#

    You can generate a payment link with the exact amount and automatically share it with the buyer.
    Once the buyer completes the payment, PayWay will notify your system, allowing you to automate the rest of the process effortlessly.

    2. Integration Steps#

    Before you start, make sure you have the following:
    PayWay Sandbox Account – Register here to test transactions.
    Sandbox Merchant ID & API Key—You’ll receive these via email after registering for the sandbox.
    1
    Create a payment link
    To create payment link via API, please refer to this API specification Create payment link. Once the payment link is successfully created, it will respond back as a JSON object, and there is a propery payment_link represent the full link of the url which you can share with your customer.
    Sample response
    {
        "data": {
          "id": "UD/8Hl***Ht1xQdhlw==",
          "title": "Test curl 001",
          "image": {
            "image": "",
            "filename": "",
            "size": 0
          },
          "amount": "0.03",
          "currency": "USD",
          "status": "OPEN",
          "description": "Payment link created from curl",
          "payment_limit": 5,
          "total_amount_org": 0,
          "total_refund": 0,
          "total_amount": 0,
          "total_trxn": 0,
          "created_at": "2023-04-13 03:43:30",
          "updated_at": "2023-04-13 03:43:30",
          "expired_date": 1681357409,
          "return_url": "https://domain.com",
          "merchant_ref_no": "ref00001",
          "outlet_id": "xknY***QfbOCJA==",
          "outlet_name": "Book Store",
          "payout": [],
          "payment_link": "https://dpayment-euat.payway.com.kh/JT4630l"
        },
        "status": {
          "code": "00",
          "message": "Success!"
        },
        "tran_id": 1681357410
    }
    2
    Handle the payment notification
    Once a successful payment is made on the payment link, PayWay will send a payment notification through your return_url. Your return_url shall accept POST method and Content-Type as application/json.
    Sample pushback notification response
    {
        "tran_id": "123456789",
        "status": "00",
        "merchant_ref_no": "ref0001"
    }

    tran_id string
    Payment transaction ID generated by the payment gateway.

    status string
    Status of the request.

    merchant_ref_no string
    Your payment link reference number.

    To get the details of the payment, use Check transaction with the tran_id value from the response above.
    Previous
    QR API
    Next
    Create payment link