Link Payment API

Generate Link Payment URL

To generate a new link for payment, parameters is sent to a URL and the link is returned in the response.

Parameters is sent using HTTP(s) POST to https://{psp-url}/admin/link_pay


Name Format Mandatory Description
merchant_id string yes Merchants unique id.
order_id string yes Merchants order id. Unique id generated by the merchants system.
amount string yes The amount of the transaction must be 1 unit-of-currency (100 = 1 kr).
currency string no Currency to be used in payment: ‘SEK’,‘EUR’,‘DKK’,‘NOK’,‘GBP’,‘USD’,'PLN', 'HRK'. Default ‘SEK’.
language string no Language in payment window. ‘SE’,’NO’,’DK’,’GB’, 'FI', 'PL', 'HR'. Default ‘SE’.
accept_url string yes URL where customer is redirected after successful payment.
cancel_url string no URL where customer is redirected when clicking cancel in payment window.
callback_url string no URL where payment gateway sends transaction data after successful payment.
do_3d_secure string no ‘NO’ disables 3D-Secure. Please note that the banks liability shift is not active if 3D-secure is not used. Default ’YES’.
pay_method string no To control which payment methods to display in payment window. ‘PAYWIN’ displays all payment methods. ‘CARD’ displays only card entry. ‘BANK’ displays only bank payment. 'SWISH' only Swish payment. Default ‘PAYWIN’.
return_method string no Method to call accept_url. ’POST’ or ’GET’. Default ’POST’.
prompt_name_entry string no Control if cardholder name entry should be displayed in payment window. ‘YES’ activates fields. Default ‘NO’.
result_redirect string no ‘NO’ means that customer is displayed a web page after successful payment instead of being redirected to accept_url. Default ‘YES’.
create_subscription string no ‘YES’ means that an extra parameter ‘subscription_trans_id’ is sent to accept and callback-url if payment is successful. This is a reference to the card number that can be used later to debit the card. Please note that this requires support at the acquiring bank.
posenv string no Used to define where the transaction originates. This is important to match the acquiring agreement. ‘SSL’, ‘MAIL’, ‘TELEPHONE’ Default: ‘SSL’
capture_now string no ‘YES’ means that the payment is flagged for automatic debit. No separate call for debit is required. Default ‘NO’.
oiTypes string no Names of columns for order rows described left to right. Names are seperated by ';' (semi colon). Valid names are: AMOUNT, DESCRIPTION, ITEMID, ITEMPRICE, QUANTITY, DISCOUNT, VATPERCENT See description: here
oiRow(1..n) string no Contains the order row for the payment in the same order as oiTypes. Each row is described by "oiRow1", "oiRow2" and so on.
test string no ‘YES’ means that the payment is flagged for test. Default ‘NO’.
mac string no SHA-256 checksum calculated as the example below.
  Status: 200 OK

      "id": "103R042eZvKYlo2CGzSAyQA6", 
      "result": "Success", 
      "url": "https://{psp-url}/pay/link/103R042eZvKYlo2CGzSAyQA6"

MAC calculation

Sort all parameters in alphabetic order based on the parameter name:

amount 1000
currency SEK
merchant_id 1007
order_id WebOrder-2023
pay_method PAYWIN
Copy all parameter values to a buffer: 20231000
Append the merchants secret:
X85LmHiJ98 20231000
Calculate SHA-256-sum on the string buffer:

Example link generate request

Below is an example request from command line to generate a link.

Using curl
curl https://{domain}/api/v1/merchants \
   -d "accept_url="
  Status: 200 OK

      "id": "103R042eZvKYlo2CGzSAyQA6", 
      "result": "Success", 
      "url": "https://{psp-url}/pay/link/103R042eZvKYlo2CGzSAyQA6"