Skip to main content

Payment Link Enhanced Features

Pre-populate Customer & Billing Details

To avoid asking shoppers to enter additional data, the following details can be included in the Create Payment Link request.

ParameterVariableDescription
customerDetails.emailSet customers Email address.
customerDetails.billingAddress.firstNameSet customers First Name.
customerDetails.billingAddress.lastNameSet customers Last Name.
customerDetails.billingAddress.address1Set customers 1st Line address.
customerDetails.billingAddress.address2Set customers 2nd Line address.
customerDetails.billingAddress.citySet customers city.
customerDetails.billingAddress.postalcodeSet customers postcode.
customerDetails.billingAddress.countrySet customers country.
POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1

Content-Type: application/json
Authorization: Bearer 6945595921271780

...
"customerDetails":{
"billingAddress":{
"firstName":"John",
"lastName":"Smith",
"addressLine1":"123 Street Name",
"postalCode":"AB1 2CD",
"city":"London",
"country":"UK"
}
"email":"demo@dnapayments.com"
}
...

Configure Result Webhooks

Let your system react instantly to success or failure based on the webhook post.

ParameterVariableDescription
paymentSettings.callbackUrlYour endpoint for successful payments.
paymentSettings.failureCallbackUrlYour endpoint for failed transactions.
POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1

Content-Type: application/json
Authorization: Bearer 6945595921271780
...
"paymentSettings":{
"callbackUrl":"https://your.website.endpoint",
"failureCallbackUrl":"https://your.website.endpoint"
}
...

Specify Transaction Type

ParameterVariableDescription
transactionTypeAUTHAuthorise only (hold funds).
transactionTypeSALEAuthorise & Settle in one step.
transactionTypeVERIFICATIONCard verification & Token creation.
transactionTypePRE-AUTHPre-authorisation (hold funds).
POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1

Content-Type: application/json
Authorization: Bearer 6945595921271780
...
"transactionType":"VERIFICATION",
...

Initital Recurring / Subscription Setup

When you are starting a subscription, include a periodic object with:

ParameterVariableDescription
periodic.periodicTypeType of periodic payments type
periodic.sequenceTypeSequence of payment type
POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1

Content-Type: application/json
Authorization: Bearer 6945595921271780
...
"periodic":{
"periodicType":"ucof",
"sequenceType":"initial"
}
...

Attach custom Metadata

Pass any free-form data, this string is stored with the transaction and retrievable via our Transaction Management APIs.

ParameterVariableDescription
merchantCustomData.Your custom DataStores data string
POST https://test-api.dnapayments.com/v1/payment-links
HTTP/1.1

Content-Type: application/json
Authorization: Bearer 6945595921271780
...
"merchantCustomData":"Custom Field 123"
...

Example Post Request using the Enhanced Features

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": 0,
"currency": "GBP",
"invoiceId": "ProPayTestVerification001",
"description": "Description of Order",
"customerName": "John Smith",
"terminalId": "3334975d-043f-4ea6-9420-dfca5d14c9c4",
"expirationDate": "2025-10-30T12:20:29.776Z",
"paymentSettings": {
"callbackUrl": "https://your.website.endpoint",
"failureCallbackUrl": "https://your.website.endpoint"
},
"customerDetails": {
"billingAddress": {
"firstName": "John",
"lastName": "Smith",
"addressLine1": "Street 123",
"postalCode": "AB1 2CD",
"city": "London",
"country": "GB"
},
"email": "demo@dnapayments.com"
},
"transactionType": "VERIFICATION",
"merchantCustomData": "Custom field 123",
"periodic": {
"periodicType": "ucof",
"sequenceType": "initial"
}
}