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.
| Parameter | Variable | Description |
|---|---|---|
| customerDetails. | Set customers Email address. | |
| customerDetails.billingAddress. | firstName | Set customers First Name. |
| customerDetails.billingAddress. | lastName | Set customers Last Name. |
| customerDetails.billingAddress. | address1 | Set customers 1st Line address. |
| customerDetails.billingAddress. | address2 | Set customers 2nd Line address. |
| customerDetails.billingAddress. | city | Set customers city. |
| customerDetails.billingAddress. | postalcode | Set customers postcode. |
| customerDetails.billingAddress. | country | Set 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.
| Parameter | Variable | Description |
|---|---|---|
| paymentSettings. | callbackUrl | Your endpoint for successful payments. |
| paymentSettings. | failureCallbackUrl | Your 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
| Parameter | Variable | Description |
|---|---|---|
| transactionType | AUTH | Authorise only (hold funds). |
| transactionType | SALE | Authorise & Settle in one step. |
| transactionType | VERIFICATION | Card verification & Token creation. |
| transactionType | PRE-AUTH | Pre-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:
| Parameter | Variable | Description |
|---|---|---|
| periodic. | periodicType | Type of periodic payments type |
| periodic. | sequenceType | Sequence 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.
| Parameter | Variable | Description |
|---|---|---|
| merchantCustomData. | Your custom Data | Stores 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"
}
}