Skip to main content

Payment Links

PUT Update Payment Link Details

This method enables you to update the details of an existing payment link.

The PUT Update Payment Link Details method enables you to update the details of an existing payment link.

Note: 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.

API Versions:

  • Version 2.1: allows the merchant to specify a single payment reference ID.
  • Version 2.2: allows the merchant to specify multiple payment reference IDs.
API Endpoint
https://api.uat.anddone.com/secure/paymentlinks/{PaymentLinkId}

This API is used update the details of an existing payment link.

API Data Details
URI secure/paymentlinks/details/{PaymentLinkId}
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)
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

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 (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.
email String false NA Customer's contact Email address.
phone String false NA Customer's contact phone number.
settings Object false NA
additionalDetailsPreference Number false NA Sets the option for the customer details to be displayed or collected in the payment form. Accepted values are 1 - customer enters details, 2 - Merchant enters details, 3 - No additional details.
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
}