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.

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 Versioning:

  • 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.
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 true NA This is the purpose of the payment. (Purpose of Payment in the merchant portal UI)
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.
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 true NA The entity or company associated with the premium finance agreement. For example, IPFS.
- reference String true 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. 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.
- email 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": "ABv9G58a",
    "title": "PMTlnk-21125rynx6",
    "paymentDescription": "Premium down payment.",
    "amount": 125,
    "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": "2",
            "referenceNumber": "86753023413"
        },
        {
            "referenceType": "5",
            "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": "4",
        "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.0,
    "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"
    }      
}