Create Payment Link

POST Create Payment Link

Creation of a payment link is achieved by sending a HTTP POST request to these URLs. The access_token will be the one received in the Authentication Response.

HTTP Headers

HTTP Header
Field NameStateData TypeDescription
Content-TypeMandatoryStringapplication/json
AuthorizationMandatoryStringBearer access_token

Request Details

Create Payment Link request
Field NameStateData TypeDescription
amountMandatoryFloatThe amount of the payment, expressed as a decimal e.g. 5.00 for £5
currencyMandatoryString
GBPPound Sterling
invoiceIdOptionalStringMerchant’s order number. You can pass your own system ID or use an autogenerated unique number to reconcile the payment in your accounting system.
terminalIdMandatoryStringTerminal ID for the Merchant.

This should match a terminalId that is assigned to the client-id and client-secret used in the Authentication request.
expirationDateMandatoryStringThe expiration date of the payment Link.

ISO 8601 format e.g. 2021-11-30T16:00:00Z
customerNameMandatoryStringThe name of the customer.
descriptionOptionalStringA description of what the customer is paying for. Useful to provide reassurance and consumer confidence as well as aid reconciliation and success rates.

Create Payment Link Response

If the request is successful, you will receive a 200 OK response code, and the following response fields.

Field nameTypeDescription
idStringPayment link ID, the unique reference for this payment link assigned by the DNA Platform.
amountFloatThe amount of the payment, as a decmal.
currencyStringCurrency e.g. GBP.
invoiceIdStringThe InvoiceId supplied in the Request, if applicable.
terminalIdStringThe terminal ID supplied in the request.
customerNameStringThe Customer name.
descriptionStringThe description as supplied in the request.
createdDateStringThe date that the Payment Link was created.
expirationDateStringThe date that the Payment Link will expire.
viewedDateStringThe date that the Payment Link was viewed. Null if not applicable.
attemptedDateStringThe date that the Payment Link was attempted. Null if not applicable.
paidDateStringThe date that the Payment Link was viewed. Null if not applicable.
cancelledDateStringThe date that the Payment Link was viewed. Null if not applicable.
statusStringPayment link status. See Statuses for more details.
urlStringFull payment link URL

Example Request and Response

POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1
Content-Type: application/json
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 232
{
"amount": 1,
"currency": "GBP",
"invoiceId": "PL-1605200674803",
"terminalId": "4511a14f-61a3-4449-a1c1-7a314ee2374c",
"expirationDate": "2020-11-13T17:04:50.493Z",
"customerName": "Dave",
"description": "For a coffee"
}