PUT Update Payment Link ID
The PUT Update Payment Link ID method enables you to update the details of an existing payment link.
When using this method, pass only the parameters that you want to update. Any parameter that is passed in the request body will be updated to the specified value in the payment link. For example, parameters that are passed with null values in the request body will be set to null
in the existing payment link.
A payment link associated with an active Premium Finance Lite quote cannot be modified. If the merchant attempts to modify a payment link associated with a Premium Finance Lite quote, the request will return a 409 conflict error.
API Versions:
- Version 2.1: Allows the merchant to specify a single payment reference ID.
- Version 2.2: Adds support for multiple payment reference IDs and a fourth option for additional customer details preference.
- Version 2.3: Adds support for suppress technology fee and PFR objects.
API Endpoint |
https://api.uat.anddone.com/secure/paymentlinks/{id} |
This API is used update the details of an existing payment link.
API Data | Details |
URI | secure/paymentlinks/{id} |
Method | PUT |
Authorization | API Key Authorization |
Authorization | |
x-api-key | API key {env_merchantAccessKey} |
Request Headers | |
x-app-key | Merchant ID or App Key {env_merchantId} |
x-version | API version (e.g., 2.1). If no version is specified, the call will default to version 2.0 of the API. |
Origin | URL or IP address provided to AndDone as an allowed origin. |
Content-Type | application/json |
Path Parameters
Parameter | Description |
PaymentLinkId | The unique ID of the payment link to be updated. |
API Version 2.1
Request Parameters (v2.1)
Field Name | Data Type | Mandatory | Field Length | Description |
Body Request Example (JSON)
Response Parameters (v2.1)
Body Response Example (JSON)
"id": "Mxab1E58",
"merchantId": "4bvl9KxM",
"title": "PL-5386753092135",
"paymentLink": "https://link.uat.anddone.com/#/Mxab1E58",
"shortLink": "https://link.uat.anddone.com/#/Mxab1E58",
"amount": 125.75,
"paymentDescription": "PURPOSE",
"expireIn": 7,
"expireInUnit": "Days",
"expireOn": "02-02-2024 14:18:30",
"applyPaymentAdjustments": null,
"enablePartialPayment": false,
"enableMultiplePayment": false,
"customers": [
{
"firstName": "Bill",
"lastName": "Billingsly",
"email": "[email protected]",
"phone": "5555555555",
"notifyViaSMS": false,
"notifyViaEmail": false,
"createdOn": "02-02-2024 12:18:30",
"accounts": null,
"billingAddress": {
"addressLine1": "2788 Beach St.",
"addressLine2": "Unit 3",
"city": "Anchorage",
"state": "AK",
"country": 1,
"postalCode": "11234",
"timeZone": null
}
}
],
"lineItems": [],
"payments": [],
"noOfPaymentMade": 0,
"totalPaidAmount": 0.0,
"enableProtection": false,
"protectionMode": null,
"displayReceipt": null,
"linkStatus": "Enabled",
"invoiceNumber": null,
"createdOn": "02-02-2024 12:11:27",
"createdBy": "VijaySh",
"modifiedOn": "02-02-2024 12:18:30",
"modifiedBy": "VijaySh",
"shortDescription": null,
"responseType": "CallBack",
"callbackParameters": {
"callbackSuccessUrl": null,
"callbackFailureUrl": null,
"accessKey": null,
"secretKey": null,
"referenceNo": null,
"referenceType": null,
"transactionId": null,
"callbackApiUrl": "",
"callbackMessage": "",
"redirectionTime": null
},
"displaySettings": {
"selectedCustomerFields": null,
"additionalDetailsPreference": "ManualEnter",
"displaySummary": false,
"acceptCustomerInfo": false,
"removeHeader": false,
"acceptCard": false,
"acceptBankAccount": false,
"saveCustomer": false,
"saveCustomerAccount": false,
"intent": {
"paymentTypes": [
"ACH",
"CreditCard",
"DebitCard"
]
}
},
"splits": null,
"saveForFuture": null,
"quoteKey": null,
"accountNumber": null,
"referenceType": "AccountNumber",
"referenceNumber": "Act-10287346",
"referenceKey": "",
"referenceDataList": null,
"enablePremiumFinance": false
}
API Version 2.2
Version 2.2 of PUT Update Payment Link ID adds support for multiple payment reference IDs and a fourth option for additional customer details preference.
Request Parameters (v2.2)
Field Name | Data Type | Mandatory | Field Length | Description |
title | String | true | NA | The unique ID (Merchant Reference) assigned to the payment by the merchant. If this value is not unique, the payment link will not be generated. |
paymentDescription | String | false | NA | Description of the payment. |
amount | Number | true | NA | The payment amount in USD. Example: A payment for Ten Dollars and Fifty Cents, is represented as ‘10.50’. Supports up to two decimal places. |
expireIn | Number | true | NA | Indicates the period of time that the payment link is valid for. Based on expireInUnit. The default value is 0. |
expireInUnit | Number | true | NA | The units used to define the expiration period (expireIn) for the payment. Values are: 0 - seconds, 1 - minutes, 2 - hours, 3 - days, 4 - weeks. The default value is 0. | referenceDataList | Array | true | NA | This array contains the reference identifiers associated with the payment link. ReferenceType, ReferenceKey, and ReferenceNumber are nested parameters under this array. |
- referenceType | Number | true | NA | Indicates the type of reference ID (referenceNumber) associated with the payment. Accepted values are: 1 - QuoteId, 2 - AccountNumber, 3 - PolicyNumber, 4 - InvoiceNumber, 5 - Other. |
- referenceKey | String | false | NA | If referenceType is set to 5 (Other), the referenceKey parameter is used to provide a descriptive tag for the reference number |
- referenceNumber | String | true | NA | The payment reference ID number or string. |
responseType | Number | false | NA | This parameter sets the payment confirmation page option. Accepted values are: 1 - A custom confirmation message (callbackMessage) and/or URL redirect (callbackApiUrl) is specified. 2 - The default confirmation page/message is displayed. |
callbackParameters | Object | false | NA | This object contains the callback parameters for responseType option 1. |
callbackApiUrl | String | false | NA | If responseType is set to 1, this parameter can be used to specify the URL that the customer is redirected to after payment confirmation. |
callBackMessage | String | false | NA | If responseType is set to 1, this parameter can be used to specify a custom message that is displayed to the customer in the payment confirmation page. |
redirectionTime | Number | false | NA | This parameter allows you to set a delay in seconds before the customer is redirected to the callbackApiUrl after payment confirmation. The default delay is 10 seconds. |
customers | Object | false | NA | If additionalDetailsPreference is set to 2 or 4 (Merchant enters details), this object contains the customer information that is displayed in the payment form. |
firstName | String | false | NA | Customer's first name. |
lastName | String | false | NA | Customer's last name. |
String | false | NA | Customer's contact Email address. | |
phone | String | false | NA | Customer's contact phone number. |
settings | Object | false | NA | |
- additionalDetailsPreference | Number | true | NA | Sets the option for the customer details to be displayed or collected in the payment link form. Accepted values are 1 - AskShopper. The customer enters details. 2 - ManualEnter - The merchant enters the details, and the customer can edit the details in the payment form. 3 - NoDetails, 4 - ManualEnterEditNotAllowed - The merchant enters the details, and the details cannot be edited in the payment form. |
selectedCustomerFields | String | false | NA | If additionalDetailsPreference is set to 1 (Customer enters details) this parameter indicates the information required from the shopper: Accepted values are: First Name, Last Name, Email, Phone Number. |
intent | Object | NA | NA | This object defines the accepted payment methods for the transaction. |
paymentTypes | Array[string] | true | NA | The accepted payment types for the transaction. Accepted values are: CreditCard, DebitCard, and ACH. |
Body Request Example (JSON)
{
"merchantId": "4bvl9KxM",
"title": "PMTlnk-21125rynx15",
"expireIn": 120,
"expireInUnit": "Minutes",
"referenceDataList": [
{
"referenceType": "2",
"referenceNumber": "86753023413",
"referenceKey": null
},
{
"referenceType": "5",
"referenceNumber": "CST-54327890321",
"referenceKey": "Customer Number"
},
{
"referenceType": "3",
"referenceNumber": "PCY8765412367",
"referenceKey": null
}
]
}
Response Parameters (v2.2)
Body Response Example (JSON)
{
"id": "Z8gMQjnv",
"merchantId": "4bvl9KxM",
"title": "PMTlnk-21125rynx15",
"paymentLink": "https://link.uat.anddone.com/#/Z8gMQjnv",
"shortLink": "https://link.uat.anddone.com/#/Z8gMQjnv",
"amount": 125.0,
"paymentDescription": "Premium down payment.",
"expireIn": 120,
"expireInUnit": "Minutes",
"expireOn": "02-02-2024 14:00:38",
"applyPaymentAdjustments": null,
"enablePartialPayment": false,
"enableMultiplePayment": false,
"customers": [],
"lineItems": [],
"payments": [],
"noOfPaymentMade": 0,
"totalPaidAmount": 0.0,
"enableProtection": false,
"protectionMode": null,
"displayReceipt": null,
"linkStatus": "Enabled",
"invoiceNumber": null,
"createdOn": "02-02-2024 11:26:57",
"createdBy": "VijaySh",
"modifiedOn": "02-02-2024 12:00:38",
"modifiedBy": "VijaySh",
"shortDescription": null,
"responseType": "CallBack",
"callbackParameters": {
"callbackSuccessUrl": null,
"callbackFailureUrl": null,
"accessKey": null,
"secretKey": null,
"referenceNo": null,
"referenceType": null,
"transactionId": null,
"callbackApiUrl": "",
"callbackMessage": "Thank you for your payment!",
"redirectionTime": null
},
"displaySettings": {
"selectedCustomerFields": null,
"additionalDetailsPreference": "NoAdditionalDetails",
"displaySummary": false,
"acceptCustomerInfo": false,
"removeHeader": false,
"acceptCard": false,
"acceptBankAccount": false,
"saveCustomer": false,
"saveCustomerAccount": false,
"intent": {
"paymentTypes": [
"ACH",
"CreditCard",
"DebitCard"
]
}
},
"splits": null,
"saveForFuture": null,
"quoteKey": null,
"accountNumber": null,
"referenceType": "None",
"referenceNumber": null,
"referenceKey": null,
"referenceDataList": [
{
"referenceType": "AccountNumber",
"referenceNumber": "86753023413",
"referenceKey": null
},
{
"referenceType": "Other",
"referenceNumber": "CST-54327890321",
"referenceKey": "Customer Number"
},
{
"referenceType": "PolicyNumber",
"referenceNumber": "PCY8765412367",
"referenceKey": null
}
],
"enablePremiumFinance": false
}
API Version 2.3
Version 2.3 of PUT Update Payment Link ID adds support for multiple payment reference IDs and a fourth option for additional customer details preference.
Request Parameters (v2.3)
Field Name | Data Type | Mandatory | Field Length | Description |
---|---|---|---|---|
merchantId | string | No | N/A | Merchant identifier that owns the payment link. |
title | string | No | N/A | User-friendly title for the link. |
paymentDescription | string | No | N/A | Long-form description shown to the payer. |
customers | array of objects | No | N/A | Pre-populated customer records (see nested structure below). |
firstName | string | No | N/A | Customer’s first name. |
lastName | string | No | N/A | Customer’s last name. |
string | No | N/A | Customer email address. | |
phone | string | No | N/A | Customer phone number. |
notifyViaSMS | boolean | No | N/A | If true, send SMS notifications. |
notifyViaEmail | boolean | No | N/A | If true, send email notifications. |
createdOn | string | No | N/A | Timestamp the customer record was created. |
accounts | array of objects | No | N/A | Stored payment accounts (card / ACH). |
id | string | No | N/A | Account record ID. |
channelType | string (enum) | No | N/A | ACH, CreditCard, DebitCard, RTP. |
cardNumber | string | No | N/A | Masked card number. |
cardType | string | No | N/A | Card brand (Visa, MC, etc.). |
accountToken | string | No | N/A | Tokenized account value. |
accountNumber | string | No | N/A | Bank account number (masked or full). |
bankName | string | No | N/A | Bank name. |
isCheckingAccount | boolean | No | N/A | True = checking, false = savings. |
isExpired | boolean | No | N/A | True if the account/card is expired. |
createdOn | boolean | No | N/A | When the account was created. |
createdBy | boolean | No | N/A | Who the account was created by. |
modifiedOn | boolean | No | N/A | When the account was modified. |
modifiedBy | boolean | No | N/A | Who the account was modified by. |
address | object | No | N/A | Container for the customer’s mailing / billing address. |
addressLine1 | string | No | N/A | Street address line 1. |
addressLine2 | string | No | N/A | Street address line 2 (apt, suite, unit, etc.). |
city | string | No | N/A | City or locality. |
state | string | No | N/A | State, province, or region. |
country | number | No | N/A | ISO numeric country code. |
postalCode | string | No | N/A | ZIP or postal code. |
timeZone | string | No | N/A | Time-zone abbreviation (e.g., EST, PST). Optional. |
invoiceNumber | string | No | N/A | Invoice number tied to the payment link. |
expireBy | number | No | N/A | Relative expiry time (used with expireOn). |
expireOn | string | No | N/A | Absolute expiry datetime of the link. |
lineItems | array of objects | No | N/A | Itemized products/services. |
lineItemType | string (enum) | No | N/A | External, Product, Service. |
productId | string | No | N/A | Product or SKU code. |
description | string | No | N/A | Description of the line item. |
quantity | number | No | N/A | Quantity of the item. |
rate | number | No | N/A | Unit price of the item. |
shortDescription | string | No | N/A | Brief summary text for the payment link. |
responseType | string (enum) | No | N/A | OnScreen or CallBack. |
callbackParameters | object | No | N/A | Post-payment redirect and callback settings. |
callbackParameters | object | No | N/A | Settings for redirect / API callback after payment completion. |
callbackSuccessUrl | string | No | N/A | URL to redirect the shopper when the payment succeeds. |
callbackFailureUrl | string | No | N/A | URL to redirect the shopper when the payment fails. |
accessKey | string | No | N/A | Public key used to authenticate callback requests. |
secretKey | string | No | N/A | Private key used to sign or verify callback payloads. |
referenceNo | string | No | N/A | Merchant-supplied reference number echoed back in the callback. |
referenceType | string | No | N/A | Type or category of referenceNo provided. |
transactionId | string | No | N/A | The transaction ID returned in the callback payload. |
callbackApiUrl | string | No | N/A | Endpoint on the merchant’s server that receives the callback POST. |
callbackMessage | string | No | N/A | Custom confirmation message to display to the shopper. |
redirectionTime | number | No | N/A | Delay in seconds before redirecting the shopper to callbackSuccessUrl. |
paymentLinkType | string (enum) | No | N/A | NA, PaymentLink, PaymentIntent, TokenLink, Invoice. |
saveForFuture | boolean | No | N/A | If true, save the link for reuse. |
splits | array of objects | No | N/A | Split-payment allocations. |
splits | array of objects | No | N/A | Definitions of how the payment amount is divided among virtual accounts. |
virtualAccount | string | No | N/A | Identifier of the virtual account receiving the split. |
amount | number | No | N/A | Portion of the total payment routed to this virtual account. |
reference | string | No | N/A | Optional reference string for this split allocation. |
accountType | string | No | N/A | Type of the underlying bank account (e.g., Checking, Savings). |
chargeIndicator | boolean | No | N/A | True if commissions or fees are charged to this split. |
quoteKey | string | No | N/A | Premium-finance quote key (if applicable). |
accountNumber | string | No | N/A | Loan or account number for finance payments. |
referenceType | string (enum) | No | N/A | None, QuoteNumber, AccountNumber, PolicyNumber, InvoiceNumber, OtherNumber. |
referenceNumber | string | No | N/A | Reference ID value. |
referenceKey | string | No | N/A | Descriptive tag when referenceType = Other. |
referenceDataList | array of objects | No | N/A | Additional reference identifiers tied to the payment link. |
referenceType | string (enum) | No | N/A | One of: QuoteId, AccountNumber, PolicyNumber, InvoiceNumber, Other. |
referenceNumber | string | No | N/A | The reference value (quote key, account number, etc.). |
referenceKey | string | No | N/A | Descriptive tag when referenceType is Other. |
platformSettlementStatus | string (enum) | No | N/A | NotDefined, Pending, Settled. |
isPayInFull | boolean | No | N/A | True if the link is restricted to pay-in-full only. |
isPremiumFinancier | boolean | No | N/A | True if the payment is related to premium finance. |
pfr | object | No | N/A | Premium-finance remittance information associated with the payment link. |
entity | string | No | N/A | Company or entity receiving the remittance. |
reference | string | No | N/A | Unique reference assigned by the premium-finance entity. |
quote | string | No | N/A | Premium-finance quote ID (quote key) related to the payment. |
accountNumber | string | No | N/A | Loan or account number if the payment applies to an existing account. |
paymentType | string (enum) | No | N/A |
Indicates the nature of the premium-finance payment. Allowed values: NA , DownPayment , InstallmentPayment ,
FeePayment , OtherPayment .
|
pfType | string (enum) | No | N/A | PF or PFLite. |
amount | number | No | N/A | Amount requested by the updated link (overrides previous). |
enablePremiumFinance | boolean | No | N/A | Enable premium-finance workflow for the link. |
expireIn | number | No | N/A | Relative validity period value. |
expireInUnit | string (enum) | No | N/A | Seconds, Minutes, Hours, Days, Weeks, NA. |
settings | object | No | N/A | Visual-and-behaviour preferences applied to the payment form. |
selectedCustomerFields | string | No | N/A | Comma-separated list of customer fields to display / collect (e.g., FirstName,Email ). |
additionalDetailsPreference | string (enum) | No | N/A |
Determines how additional customer details are handled:None , AskShopper , ManualEnter , NoAdditionalDetails , ManualEnterEditNotAllowed .
|
displaySummary | boolean | No | N/A | Show an order-summary panel on the payment page. |
acceptCustomerInfo | boolean | No | N/A | Allow the shopper to enter contact details. |
removeHeader | boolean | No | N/A | Hide the default form header for a minimalist view. |
acceptCard | boolean | No | N/A | If true, enable card-based payment options. |
acceptBankAccount | boolean | No | N/A | If true, enable ACH / bank-account payments. |
saveCustomer | boolean | No | N/A | Offer to save shopper profile for future use. |
saveCustomerAccount | boolean | No | N/A | Offer to save the payment account for future use. |
intent | object | No | N/A | Limits which payment methods are accepted by the link. |
paymentTypes | array of strings (enum) | No | N/A | Allowed values: ACH , CreditCard , DebitCard . |
suppressTechnologyFee | boolean | No | N/A | Suppress the default technology fee. |
overrideTechnologyFee | number | No | N/A | Custom technology-fee amount when suppressed. |
Body Request Example (JSON)
{
"merchantId": "GBaPo83P",
"title": "FirstPayment",
"paymentDescription": "FirstPayment",
"customers": null,
"invoiceNumber": null,
"expireBy": 300,
"expireOn": null,
"lineItems": null,
"shortDescription": "FirstPayment",
"responseType": "CallBack",
"callbackParameters": {
"callbackSuccessUrl": "htttp://yahoo.com",
"callbackFailureUrl": "htttp://yahoo.com",
"accessKey": null,
"secretKey": null,
"referenceNo": null,
"referenceType": null,
"transactionId": null,
"callbackApiUrl": "htttp://yahoo.com",
"callbackMessage": "this is test message",
"redirectionTime": 60
},
"paymentLinkType": "PaymentLink",
"saveForFuture": true,
"splits": null,
"quoteKey": null,
"accountNumber": "123sd",
"referenceType": "PolicyNumber",
"referenceNumber": "pol123",
"referenceKey": null,
"referenceDataList": [
{
"referenceType": "PolicyNumber",
"referenceNumber": "pol123",
"referenceKey": null
}
],
"isPayInFull": false,
"isPremiumFinancier": false,
"pfr": {
"entity": "IPFS",
"reference": "Reference_test",
"quote": "Q_1212",
"accountNumber": "123456789",
"paymentType": "OtherPayment"
},
"pfType": null,
"amount": 100,
"enablePremiumFinance": false,
"expireIn": 300,
"expireInUnit": "Hours",
"settings": {
"selectedCustomerFields": "First Name,Last Name,Email,Phone",
"additionalDetailsPreference": "NoAdditionalDetails",
"displaySummary": true,
"acceptCustomerInfo": true,
"removeHeader": true,
"acceptCard": true,
"acceptBankAccount": true,
"saveCustomer": true,
"saveCustomerAccount": true,
"intent": {
"paymentTypes": [
"ACH",
"CreditCard",
"DebitCard"
]
}
},
"suppressTechnologyFee": true,
"overrideTechnologyFee": 2.3
}
Response Parameters (v2.3)
Body Response Example (JSON)
{
"id": "O78jve8k",
"merchantId": "GBaPo83P",
"title": "FirstPayment",
"paymentLink": "https://link.anddone.com/#/QjxbLdDJ",
"shortLink": "https://link.anddone.com/#/QjxbLdDJ",
"amount": 20,
"paymentDescription": "FirstPayment",
"expireIn": 9,
"expireInUnit": "Days",
"expireOn": "07-17-2021 13:35:00",
"callbackParameters": {
"callbackSuccessUrl": "htttp://yahoo.com",
"callbackFailureUrl": "htttp://yahoo.com",
"accessKey": null,
"secretKey": null,
"referenceNo": null,
"referenceType": null,
"transactionId": null,
"callbackApiUrl": "htttp://yahoo.com",
"callbackMessage": "this is test message",
"redirectionTime": 60
},
"customers": [
{
"firstName": "ExampleFirstName",
"lastName": "ExampleLastName",
"email": "[email protected]",
"phone": "1234567890",
"notifyViaSMS": false,
"notifyViaEmail": true,
"createdOn": "07-08-2021 06:57:47",
"accounts": null,
"address": {
"addressLine1": "7438 Airport Drive",
"addressLine2": "Suite 200",
"city": "Collegeville",
"state": "PA",
"country": 1,
"postalCode": "19426",
"timeZone": null
}
}
],
"lineItems": [],
"payments": [],
"noOfPaymentMade": 0,
"totalPaidAmount": 0,
"linkStatus": "Created",
"invoiceNumber": null,
"createdOn": "07-08-2021 06:57:47",
"createdBy": "REMerchant",
"modifiedOn": "07-08-2021 06:57:47",
"modifiedBy": "REMerchant",
"shortDescription": "FirstPayment",
"responseType": "OnScreen",
"displaySettings": {
"selectedCustomerFields": null,
"additionalDetailsPreference": "ManualEnter",
"displaySummary": true,
"acceptCustomerInfo": true,
"removeHeader": false,
"acceptCard": true,
"acceptBankAccount": false,
"saveCustomer": true,
"saveCustomerAccount": true,
"intent": {
"paymentTypes": [
"ACH",
"CreditCard",
"DebitCard"
]
}
},
"splits": [],
"saveForFuture": null,
"quoteKey": null,
"accountNumber": "3451",
"referenceType": "QuoteId",
"referenceNumber": null,
"referenceKey": null,
"referenceDataList": [
{
"referenceType": "PolicyNumber",
"referenceNumber": "pol123",
"referenceKey": "nul"
}
],
"enablePremiumFinance": false,
"isPremiumFinancier": false,
"pfr": {
"entity": "IPFS",
"reference": "Reference_test",
"quote": "Q_1212",
"accountNumber": "123456789",
"paymentType": "OtherPayment"
},
"paymentLinkType": "PaymentLink",
"suppressTechnologyFee": false,
"overrideTechnologyFee": 23.78,
"isPFLite": false,
"isPayInFull": false
}