Payment Links

Introduction

Payment links are a way to generate a unique payment link which, if sent to a customer, allows them to navigate to a page hosted by us where they can easily provide payment details and complete the transactions to you.

Once generated, the link could be emailed, send via SMS or as a QR code.

You can also implement this functionality for unsuccessful purchases where the original payment transaction has been declined so that you can proactively give your customer a second chance to make their purchase.

Our products provide:

  • The capability to request a Payment URL (link) for a specific amount through API
  • A hosted payment page where the customer can select the preferred payment method (based on the payment methods that are activated for your account) and make the payment
  • A hosted result page that tells the customer if the payment was successful or not, including a Retry button where the customer can chose a different payment method in case the transaction was not successful

Payments API

1. Creating a Payment URL

Use POST to make a call to /payment-url (see API Reference) such as the example below creates a URL for a sale payment to send to a customer.

{
  "transactionAmount": {
    "total": "42.42",
    "currency": "EUR"
  },
  "transactionType": "SALE",
  "transactionNotificationURL": "https://mywebshop/Customer",
  "expiration": "4102358400",
  "authenticateTransaction": true,
  "dynamicMerchantName": "MyWebsite",
  "invoiceNumber": "96126098",
  "purchaseOrderNumber": "123055342",
  "hostedPaymentPageText": "Dear Customer, please pay our invoice 123456. "
}
{
  "clientRequestId": "30dd879c-ee2f-11db-8314-0800200c9a66",
  "apiTraceId": "rrt-0bd552c12342d3448-b-ea-1142-12938318-7",
  "requestStatus": "SUCCESS",
  "orderId": "9723846",
  "paymentUrl": "https://hyperlink-to-payment.com",
  "transactionId": "2381723322"
}

The value in paymentUrl can then be sent to the customer via your preferred means.

2. Notification response

As shown above, the field transactionNotificationURL can be provided. If so, when the customer attempts to use the payment link and make a payment, you will be notified whether they were successful or not.

The message is made up of key/value pairs using the format key1=value1&key2=value2&..., for example (added line breaks for readability):

cardholderInfo=Your+card+is+currently+inactive.+Please+contact+your+customer+service.%60
&txndate_processed=17%2F01%2F23+13%3A40%3A22
&ccbin=541333
&fail_rc=50716
&oid=R-8d521c8a-1ab1-4fc0-aaa2-739fd98ba880&cccountry=BEL
&expmonth=12
&hash_algorithm=SHA256
&currency=978
&chargetotal=20.99
&invoicenumber=INV1234
&approval_code=N%3A-50716%3A3D+Secure+authentication+failed
&expyear=2030
&response_code_3dsecure=3
&notification_hash=deef184263149dfe029abb91d0353ee1046d7fa5a80a3ca16fb8b4ab52183f84
&transactionNotificationURL=https%3A%2F%2Fwebhook.site%2Fc1828d3e-f824-47c1-991a-347d15499b68
&tdate=1673959222&bname=sadasfasf
&ccbrand=MASTERCARD
&ponumber=PO1042
&txntype=sale
&paymentMethod=M
&txndatetime=2023%3A01%3A17-13%3A39%3A55
&cardnumber=%28MASTERCARD%29+...+0640
&ipgTransactionId=84617034966
&fail_reason=Transaction+declined.+3D+Secure+authentication+failed.
&status=FAILED

As you can see in this example based on the status=FAILED and fail_reason, the payment failed due to 3DS.

πŸ‘

Example complete

You have completed an end to end example of our payment-links endpoint for the Payments API.

Other Payment URL functions

To delete a Payment URL, add your storeId and the transactionId from the Payment URL creation request response (ipgTransactionId) to the /payment-url header, and use the DELETE method to call the /payment-url API.

You can retrieve the data associated with a payment URL by sending a GET to /paymentURL. Add storeId and the transactionId from the Payment URL creation request response (ipgTransactionId) to the /payment-url header to retrieve the details for a specific Payment URL, or set storeId, fromDate and toDate to call a response with all Payment URLs and their details created within a specific time range.


Want a quick overview?