Get Payment Links
This API call returns multiple Payment link information, like would be seen in the Merchant Portal view of Payment Links.
GET
Payment Links
URLs
Creation of a payment link is achieved by sending a HTTP GET
request to these URLs. The access_token
will be the one received in the Authentication Response.
HTTP Headers
HTTP Header | |||
---|---|---|---|
Field Name | State | Data Type | Description |
Content-Type | Mandatory | String | application/json |
Authorization | Mandatory | String | Bearer access_token |
Request Query Parameters
Create Payment Link request | |||
---|---|---|---|
Field Name | State | Data Type | Description |
terminalId | Mandatory | String | Terminal ID for the Merchant. |
from | Mandatory | String | The Start Date for the search. ISO 8601 format e.g. 2021-11-30T16:00:00Z |
to | Mandatory | String | The End Date for the search. ISO 8601 format e.g. 2021-11-30T16:00:00Z |
You can request payment links up to 365 days old | |||
page | Optional | Integer | The page number, which specifies the set of records to retrueve. Default=1 |
size | Optional | Integer | The number of records to be returned per page. Default=20, Max=5000 |
status | Optional | String | Payment link status. See Statuses for more details. |
Get Payment Links Response
If the request is successful, you will receive a 200 OK
response code, and the following response fields.
Field name | Type | Description |
---|---|---|
totalCount | Integer | The total number of payment links returned in the Response. |
records | Array | An array containing an object for each payment link record returned. |
Get Payment Links Response > Records
The records
Array contains the following fields.
Field name | Type | Description |
---|---|---|
id | String | Payment link ID, the unique reference for this payment link assigned by the DNA Platform. |
amount | Float | The amount of the payment, as a decmal. |
currency | String | Currency e.g. GBP. |
invoiceId | String | The InvoiceId supplied in the Request, if applicable. |
terminalId | String | The terminal ID supplied in the request. |
customerName | String | The Customer name. |
description | String | The description as supplied in the request. |
createdDate | String | The date that the Payment Link was created. |
expirationDate | String | The date that the Payment Link will expire. |
viewedDate | String | The date that the Payment Link was viewed. Null if not applicable. |
attemptedDate | String | The date that the Payment Link was attempted. Null if not applicable. |
paidDate | String | The date that the Payment Link was viewed. Null if not applicable. |
cancelledDate | String | The date that the Payment Link was viewed. Null if not applicable. |
status | String | Payment link status. See Statuses for more details. |
url | String | Full payment link URL |
Example Request and Response
- Request
- Response
https://test-api.dnapayments.com/v1/payment-links?terminalId=4511a14f-61a3-4449-a1c1-7a314ee2374c&from=2020-12-09T00:00:00.000&to=2020-12-15T23:59:99.000&page=1&size=3&status=paid
{
"totalCount": 28,
"records":
[
{
"id": "7a6WeHXXR",
"amount": 12,
"currency": "GBP",
"invoiceId": "PL-1607902147657",
"customerName": "Pinky",
"description": "He needs some milk",
"createdDate": "2020-12-13T23:29:19.935175Z",
"expirationDate": "2020-12-15T23:29:00Z",
"viewedDate": null,
"attemptedDate": null,
"paidDate": null,
"cancelledDate": "2020-12-13T23:37:58.451375Z",
"status": "cancelled",
"url": "https://test-pay.dnapayments.com/checkout/?r=7a6WeHXXR"
},
{
"id": "pdtvrwH1d",
"amount": 5,
"currency": "GBP",
"invoiceId": "PL-1607777249830",
"customerName": "Corrine",
"description": "Coffee",
"createdDate": "2020-12-12T12:46:11.745567Z",
"expirationDate": "2020-12-13T12:47:44.273Z",
"viewedDate": "2020-12-12T15:46:12.33615Z",
"attemptedDate": "2020-12-12T15:49:08.588324Z",
"paidDate": "2020-12-12T15:49:11.291697Z",
"cancelledDate": null,
"status": "paid",
"url": "https://test-pay.dnapayments.com/checkout/?r=pdtvrwH1d"
},
{
"id": "ThksZM0Oz",
"amount": 50,
"currency": "GBP",
"invoiceId": "PL-1607611875852",
"customerName": "Andrew",
"description": "Insurance",
"createdDate": "2020-12-10T14:50:05.727335Z",
"expirationDate": "2020-12-11T14:51:36.54Z",
"viewedDate": null,
"attemptedDate": null,
"paidDate": null,
"cancelledDate": null,
"status": "expired",
"url": "https://test-pay.dnapayments.com/checkout/?r=ThksZM0Oz"
}
]
}