Skip to main content

Payment Links

POST Create Payment Link

This API enables merchants to generate a payment link. The returned paymentLink URL can be shared with customers through Email, SMS, or social media. When a customer opens a payment link, they are redirected to a secure, AndDone-hosted payment page.

Webhook Notifications: This API supports webhook notifications for real-time tracking of payment link events. To receive notifications, subscribe to the Payment Link webhook module in the AndDone Merchant Portal. For detailed payload and event information, see Payment Link Webhook Payloads.

API Endpoint
https://api.uat.anddone.com/secure/paymentlinks

This API is used to create a payment link.

API Data Details
URI secure/paymentlinks
Method POST
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

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)

    
    

API Version 2.2

Version 2.2 of POST Create Payment Link 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.
merchantId String true NA The env_merchantId or app-key.
paymentDescription String false NA This is the purpose of the payment. (Purpose of Payment in the merchant portal UI)
amount Number true NA The payment amount. Supports up to two decimal places.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Payment Link transactions. If set to true, the default technology fee configured for the merchant is not assessed on the transaction. If set to false, the default technology fee is assessed on the transaction. This parameter can be used in conjunction with the overrideTechnologyFee parameter to specify a custom technology fee amount.
overrideTechnologyFee Number false NA The overrideTechnologyFee parameter allows merchants to bypass the default technology fee associated with a Payment Link transaction and specify a custom amount. It works in conjunction with the suppressTechnologyFee parameter. To override the default fee: 1.) Set suppressTechnologyFee to TRUE. 2.) Set overrideTechnologyFee to the desired technology fee amount (decimal value).
isPremiumFinancier Boolean false NA Indicates whether the payment is associated with a premium finance agreement.
pfr Object false NA If isPremiumFinancier is True, this object must be included in the request. Contains information related to the premium finance agreement associated with the payment intent.
- entity String false NA The entity or company associated with the premium finance agreement. For example, IPFS.
- reference String false NA A unique reference number for the finance agreement provided by the entity.
- quote Number false NA If the payment is against a premium finance, this field is used to indicate the quote ID (quote key).
- accountNumber Number false NA If the payment is against a loan account, this field indicates the loan account number.
- paymentType Enum true NA Indicates the type of payment: DownPayment, InstallmentPayment, FeePayment, OtherPayment.
expireIn Number true NA Indicates the period of time that the payment link is valid for. Based on expireInUnit.
expireInUnit String true NA The units used to define the expiration period (expireIn) for the payment. Accepted values are: Seconds, Minutes, Hours, Days or Weeks.
referenceDataList Array false NA This array contains the reference identifiers associated with the payment link. ReferenceType, ReferenceKey, and ReferenceNumber are nested parameters under this array.
- referenceType String false NA Indicates the type of reference ID (referenceNumber) associated with the payment. Accepted values are: QuoteNumber, AccountNumber, PolicyNumber, InvoiceNumber, OtherNumber.
- referenceKey String false NA If referenceType is set to OtherNumber, the referenceKey parameter is used to provide a descriptive tag for the reference number.
- referenceNumber String false NA The payment reference ID number or string.
responseType String false NA This parameter sets the payment confirmation page option. Accepted values are: CallBack - A custom confirmation message (callbackMessage) and/or URL redirect (callbackApiUrl) is specified. OnScreen - The default confirmation page/message is displayed.
callbackParameters Object false NA This object contains the parameters for the CallBack responseType option.
- callbackApiUrl String false NA If responseType is set to CallBack, 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 CallBack, 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 ManualEnter or ManualEnterEditNotAllowed (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 String false NA Sets the option for the customer details to be displayed or collected in the payment form. Accepted values are: AskShopper - Customer enters details in the payment form, ManualEnter - Merchant enters the details and the customer has the option to edit them in the payment form, ManualEnterEditNotAllowed - Merchant enters the details and they cannot be edited in the payment form, NoAdditionalDetails - This is the default setting. No additiional customer details are displayed in the payment form.
- selectedCustomerFields String false NA If additionalDetailsPreference is set to AskShopper (Customer enters details) this parameter indicates the information required from the shopper: Accepted values are: First Name, Last Name, Email, Phone Number.
- intent Object true 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": "ABv9G58a",
    "title": "PMTlnk-21125rynx6",
    "paymentDescription": "Premium down payment.",
    "amount": 125.00,
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "Reference_test",
        "quote": "Q_1212",
        "accountNumber": "1234567890",
        "paymentType": "OtherPayment"
    },        
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.50  
    "expireIn": 60,
    "expireInUnit": "Minutes",
    "referenceDataList": [
        {
            "referenceType": "AccountNumber",
            "referenceNumber": "86753023413"
        },
        {
            "referenceType": "OtherNumber",
            "referenceKey": "CustomerNumber",
            "referenceNumber": "CST-54327890321"
        }
    ],
    "responseType": "CallBack",
    "callbackParameters": {
        "callbackApiUrl": "",
        "callbackMessage": "Thank you for your payment!",
        "redirectionTime": ""
    },
    "customers": [
        {
            "firstName": "Bill",
            "lastName": "Billingsly",
            "email": "[email protected]",
            "phone": "5555555555",
            "address": {
                "addressLine1": "57342 Sunset Palms Drive",
                "addressLine2": "Apt. 231",
                "city": "Anchorage",
                "state": "AK",
                "country": 1,
                "postalCode": "11235"
            }
        }],
    "settings": {
        "additionalDetailsPreference": "ManualEnterEditNotAllowed",
        "intent": {
            "PaymentTypes": [
                "ACH",
                "CreditCard",
                "DebitCard"
            ]
        }
    }
}

Response Parameters (v2.2)

Body Response Example (JSON)

    
   {
    "id": "adJnoG9d",
    "merchantId": "ABv9G58a",
    "title": "PMTlnk-21125rynx6",
    "paymentLink": "https://link.dev.anddone.com/#/adJnoG9d",
    "shortLink": "https://link.dev.anddone.com/#/adJnoG9d",
    "amount": 125.00,
    "paymentDescription": "Premium down payment.",
    "expireIn": 60,
    "expireInUnit": "Minutes",
    "expireOn": "01-19-2024 16:07:46",
    "applyPaymentAdjustments": null,
    "enablePartialPayment": false,
    "enableMultiplePayment": false,
    "customers": [
        {
            "firstName": "Bill",
            "lastName": "Billingsly",
            "email": "[email protected]",
            "phone": "5555555555",
            "notifyViaSMS": false,
            "notifyViaEmail": false,
            "createdOn": "01-19-2024 15:07:46",
            "accounts": null,
            "billingAddress": {
                "addressLine1": "57342",
                "addressLine2": "Sunset Palms",
                "city": "Anchorage",
                "state": "AK",
                "country": 1,
                "postalCode": "11235",
                "timeZone": null
            }
        }
    ],
    "lineItems": [],
    "payments": [],
    "noOfPaymentMade": 0,
    "totalPaidAmount": 0.0,
    "enableProtection": false,
    "protectionMode": null,
    "displayReceipt": null,
    "linkStatus": "Enabled",
    "invoiceNumber": null,
    "createdOn": "01-19-2024 15:07:47",
    "createdBy": "UserAzhar",
    "modifiedOn": "01-19-2024 15:07:47",
    "modifiedBy": "UserAzhar",
    "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": "ManualEnterEditNotAllowed",
        "displaySummary": false,
        "acceptCustomerInfo": false,
        "removeHeader": false,
        "acceptCard": false,
        "acceptBankAccount": false,
        "saveCustomer": false,
        "saveCustomerAccount": false,
        "intent": {
            "paymentTypes": [
                "ACH",
                "CreditCard"
            ]
        }
    },
    "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": "CustomerNumber"
        }
    ],
    "enablePremiumFinance": false,
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.5,
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "Reference_test",
        "quote": "Q_1212",
        "accountNumber": "1234567890",
        "paymentType": "OtherPayment"
    }      
}
    

API Version 2.3

Request Parameters (v2.3)

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.
merchantId String true NA The env_merchantId or app-key.
paymentDescription String true NA This is the purpose of the payment. (Purpose of Payment in the merchant portal UI)
amount Number true NA The payment amount. Supports up to two decimal places.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Payment Link transactions. If set to true, the default technology fee configured for the merchant is not assessed on the transaction. If set to false, the default technology fee is assessed on the transaction. This parameter can be used in conjunction with the overrideTechnologyFee parameter to specify a custom technology fee amount.
overrideTechnologyFee Number false NA The overrideTechnologyFee parameter allows merchants to bypass the default technology fee associated with a Payment Link transaction and specify a custom amount. It works in conjunction with the suppressTechnologyFee parameter. To override the default fee: 1.) Set suppressTechnologyFee to TRUE. 2.) Set overrideTechnologyFee to the desired technology fee amount (decimal value).
isPremiumFinancier Boolean false NA Indicates whether the payment is associated with a premium finance agreement.
pfr Object false NA If isPremiumFinancier is True, this object must be included in the request. Contains information related to the premium finance agreement associated with the payment intent.
- entity String false NA The entity or company associated with the premium finance agreement. For example, IPFS.
- reference String false NA A unique reference number for the finance agreement provided by the entity.
- quote Number false NA If the payment is against a premium finance, this field is used to indicate the quote ID (quote key).
- accountNumber Number false NA If the payment is against a loan account, this field indicates the loan account number.
- paymentType Enum false NA Indicates the type of payment: DownPayment, InstallmentPayment, FeePayment, OtherPayment.
expireIn Number true NA Indicates the period of time that the payment link is valid for. Based on expireInUnit.
expireInUnit Number true NA The units used to define the expiration period (expireIn) for the payment. Accepted values are: Seconds, Minutes, Hours, Days or Weeks.
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 String true NA Indicates the type of reference ID (referenceNumber) associated with the payment. Accepted values are: QuoteNumber, AccountNumber, PolicyNumber, InvoiceNumber, OtherNumber.
- referenceKey String false NA If referenceType is set to OtherNumber, 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 String false NA This parameter sets the payment confirmation page option. Accepted values are: CallBack - A custom confirmation message (callbackMessage) and/or URL redirect (callbackApiUrl) is specified. OnScreen - The default confirmation page/message is displayed.
callbackParameters Object false NA This object contains the parameters for CallBack responseType option.
- callbackApiUrl String false NA If responseType is set to CallBack, 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 CallBack, 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 ManualEnter or ManualEnterNotAllowed (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.
- companyName String false NA Optional. Customer's company name. Available when additionalDetailsPreference = 1, 2, or 4.
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: AskShopper - Customer enters details in the payment form, ManualEnter - Merchant enters the details and the customer has the option to edit them in the payment form, ManualEnterEditNotAllowed - Merchant enters the details and they cannot be edited in the payment form, NoAdditionalDetails - This is the default setting. No additiional customer details are displayed in the payment form.
- selectedCustomerFields String false NA If additionalDetailsPreference is set to AskShopper (Customer enters details) this parameter indicates the information required from the shopper. Accepted values are: First Name, Last Name, Email, Phone Number.
- intent Object true 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": "GBaPo83P",
  "title": "FirstPayment",
  "amount": 20,
  "paymentDescription": "FirstPayment",
  "customers": null,
  "invoiceNumber": null,
  "expireBy": 300,
  "expireIn": 9,
  "expireInUnit": "Days",
  "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
  },
  "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"
      ]
    }
  },
  "paymentLinkType": "PaymentLink",
  "saveForFuture": true,
  "splits": null,
  "quoteKey": null,
  "accountNumber": "123sd",
  "referenceType": "PolicyNumber",
  "referenceNumber": "pol123",
  "referenceKey": null,
  "referenceDataList": [
    {
      "referenceType": "PolicyNumber",
      "referenceNumber": "pol123",
      "referenceKey": null
    }
  ],
  "enablePremiumFinance": false,
  "suppressTechnologyFee": false,
  "overrideTechnologyFee": null,
  "isPayInFull": false,
  "isPremiumFinancier": false,
  "pfr": {
    "entity": "IPFS",
    "reference": "Reference_test",
    "quote": "Q_1212",
    "accountNumber": "123456789",
    "paymentType": "OtherPayment"
  },
  "pfType": null
}

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",
      "companyName": "ExampleCompany",
      "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
}