Create Payment Link
POST /paymentlinks/create
This endpoint allows merchants to create new payment links for both payment collection and card tokenization. The request structure varies depending on the type of link being created.
Test URL
Send the request to the following URL:
https://checkout-api.staging.straumur.is/api/v1/paymentlinks/create
This call creates a new payment link with the specified configuration.
Minimum Request Example – Pay by Link
{
"type": "PayByLink",
"terminalIdentifier": "1adfe4a1",
"amount": 20000,
"currency": "ISK",
"items": [
{
"name": "Playstation 2 Analog RCA/SCART to HDMI Adapter Low Latency",
"quantity": 1,
"amountWithoutDiscount": 25000,
"amount": 20000,
"unitPrice": 20000
}
],
}
Minimum Request Example – Tokenize by Link
{
"type": "TokenizeByLink",
"terminalIdentifier": "1adfe4a1",
"recurringProcessingModel": "CardOnFile",
"amount": 0,
"currency": "ISK"
}
Request Required Fields
Field | Type | Required | Description | Example | Min Length | Max Length |
---|---|---|---|---|---|---|
terminalIdentifier | String | Required | The terminal identifier to uniquely identify the terminal. You can find your Terminal Identifier in the Merchant Portal. Open Section "Terminals" > Select Terminal to open Details panel > Copy Terminal Identifier. | 1adfe4a1 | 12 | 12 |
amount | Integer | Required | The amount to be charged in minor units. Must end in 00 for ISK. Must be 0 for TokenizeByLink type. | 48900 | - | - |
currency | String | Required | The three-character ISO currency code. | ISK | 3 | 3 |
type | String | Required | Type of payment link. | PayByLink | - | - |
items | Array | Required | A detailed list of items the customer is purchasing. This information appears on the checkout page. Must be empty for TokenizeByLink. | - | - | 200 |
Item Array Fields
Subfield | Type | Required | Description | Example | Min Length | Max Length |
---|---|---|---|---|---|---|
Array | Optional | List of cart items. Each item should have the following fields: | - | - | 200 | |
name | String | Required | The name of the item. | item 1 | - | - |
amount | Integer | Required | The amount of the item in minor units. | 42000 | - | - |
unitPrice | Integer | Required | The amount of a single quantity of item in minor units. | 23500 | - | - |
quantity | Integer | Required | The quantity of the items bought. | 2 | - | - |
amountWithoutDiscount | Integer | Required | The amount of the item without discount in minor units. If provided, Amount cannot be higher than the amount without discount | 47000 | - | - |
Supported Type Values
Value | Description |
---|---|
PayByLink | Creates a pay-by-link for collecting payments |
TokenizeByLink | Creates a tokenize-by-link for saving payment methods |
Example Success Response
{
"paymentLinkReference": "30001aylo2a",
"url": "https://pay.example.com/link/30001aylo2a",
"responseDateTime": "2025-01-04T09:50:14.343503Z",
"responseIdentifier": "e3605f81-6b09-4ce1-83ad-5a8d49f3cd44"
}
Response Fields
Field | Type | Description | Example |
---|---|---|---|
paymentLinkReference | String | Unique reference for the payment link | 30001aylo2a |
url | String | The shareable payment link URL | https://pay.example.com/link/30001aylo2a |
responseDateTime | String | The date and time when the response was generated. | 2025-01-04T09:50:14.343503Z |
responseIdentifier | String | The unique identifier for the response. | e3605f81-6b09-4ce1-83ad-5a8d49f3cd44 |
Error Response
Error responses are standardized. For details, see Errors.
You can also find a detailed overview of our HTTP Status Codes.