Skip to main content

Payment Intents

POST Create Payment Intent

A payment intent allows you to collect and confirm information about a payment before capturing the funds from the customer's account.

A payment intent allows you to collect and confirm information about a payment before capturing the funds from the customer's account. The payment intent encapsulates details about the transaction, such as the amount to collect, the supported payment methods, the expiration time for the transaction, and whether the payment method is to be tokenized. The POST Create Payment Intent method returns a payment token that is used to perform subsequent transactions.

Note: To use the tokenization feature (saveForFuture) when creating a payment intent you must be on API version 2.1 or later.

API Versioning

  • Version 2.1 Comprises the base functionality for generating a payment intent and tokenizing payment account.
  • Version 2.2: Adds the ability for merchants to suppress the AndDone technology fee on payment intent transactions.
  • Version 2.3: Adds support for multiple reference IDs and additional customer details preference.
API Endpoint
https://api.uat.anddone.com/secure/paymentintents
API Data Details
URI secure/paymentintents
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 Intent adds the suppressTechnologyFee parameter. This parameter enables merchants to suppress the AndDone technology fee so that it is not assessed on the payment transaction.

Request Parameters (v2.2)

Field Name Data Type Mandatory Field Length Description
title String true NA The payment title (e.g., heading, date, etc.). This must be unique.
shortDescription String false NA A short description of the payment.
paymentDescription String false NA A 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.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Payment Intent 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 intent 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.
invoiceNumber String false NA The merchant invoice number associated with the payment.
expiresIn String false NA This indicates the duration of time in milliseconds for which the payment intent is valid. The subsequent payment request must be submitted within this time period. If the payment request is not submitted within this time period, a new payment intent must be created.
intent Object true NA This object defines the accepted payment types for the transaction.
- paymentTypes Array[string] true NA The accepted payment types for the transaction. Accepted values are: CreditCard, DebitCard, and ACH.
saveForFuture Boolean false NA This value is set to true when the customer's account details are to be tokenized. The customer must opt to save their payment information for future use before this value can be set to true.
accountNumber String false NA This is the IPFS Account number associated with the payment. When this value is populated, it flags the payment as an IPFS installment. Note: accountNumber and quoteKey cannot be populated in the same payment intent.
quoteKey String false NA The IPFS quote number associated with the payment. When this value is populated, it flags the payment as a IPFS down payment. Note: accountNumber and quoteKey cannot be populated in the same payment intent.
splits Array[object] false NA This array comprises the virtual accounts included in a split payment and defines how the payment amount is to be divided among them.
VirtualAccount String true NA The name of the virtual account.
Amount Number true NA The amount (USD) to be paid to the virtual account.
Reference String false NA A merchant-provided reference string that can be used to identify the portion of the split payment allocated to this virtual account.
ChargeIndicator Boolean false NA If commission is applied to the transaction, this value is set to true on the virtual account to which the commission is to be paid. Only one virtual account can have ChargeIndicator set to true.

Body Request Example (JSON)



    "title": "PMNT-231867513",
    "shortDescription": "FirstPayment",
    "paymentDescription": "FirstPayment",
        "amount": 20,
    "invoiceNumber": "2021-000207",
    "expiresIn": "30000",
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.50, 
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },
    "intent": {
        "paymentTypes": [
            "CreditCard",
            "DebitCard",
            "ACH"
        ]
    },
    "saveForFuture": true,
    "quoteKey": "2111109",
    "accountNumber": "CAB-2012322"
}

Response Parameters (v2.2)

Body Response Example (JSON)

{
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.5, 
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },    
    "splits": null,
    "saveForFuture": true,
    "quoteKey": "2111109",
    "accountNumber": "CAB-2012322",
    "enablePremiumFinance": false,
    "paymentToken": "qx7qnByd",
    "title": "PMNT-231867513",
    "amount": 20.0,
    "invoiceNumber": "2021-000207",
    "expireOn": "03-27-2024 09:57:05",
    "shortDescription": "FirstPayment",
    "paymentDescription": "FirstPayment",
    "intent": {
        "paymentTypes": [
            "CreditCard",
            "DebitCard",
            "ACH"
        ]
    }
}

API Version 2.3

Version 2.3 of POST Create Payment Intent adds support for multiple payment reference IDs and additional customer details preference.

Request Parameters (v2.3)

Field Name Data Type Mandatory Field Length Description
title String true NA The payment title (e.g., heading, date, etc.). This must be unique.
shortDescription String false NA A short description of the payment.
paymentDescription String false NA A 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.
referenceDataList Array true NA This array contains the reference identifiers associated with the payment intent. 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.
additionalDetailsPreference Number true NA Sets the option for the customer details to be displayed or collected in the payment 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.
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.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Payment Intent 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 intent 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.
invoiceNumber String false NA The merchant invoice number associated with the payment.
expiresIn String false NA This indicates the duration of time in milliseconds for which the payment intent is valid. The subsequent payment request must be submitted within this time period. If the payment request is not submitted within this time period, a new payment intent must be created.
intent Object true NA This object defines the accepted payment types for the transaction.
- paymentTypes Array[string] true NA The accepted payment types for the transaction. Accepted values are: CreditCard, DebitCard, and ACH.
saveForFuture Boolean false NA This value is set to true when the customer's account details are to be tokenized. The customer must opt to save their payment information for future use before this value can be set to true.
accountNumber String false NA This is the IPFS Account number associated with the payment. When this value is populated, it flags the payment as an IPFS installment. Note: accountNumber and quoteKey cannot be populated in the same payment intent.
quoteKey String false NA The IPFS quote number associated with the payment. When this value is populated, it flags the payment as a IPFS down payment. Note: accountNumber and quoteKey cannot be populated in the same payment intent.
splits Array[object] false NA This array comprises the virtual accounts included in a split payment and defines how the payment amount is to be divided among them.
VirtualAccount String true NA The name of the virtual account.
Amount Number true NA The amount (USD) to be paid to the virtual account.
Reference String false NA A merchant-provided reference string that can be used to identify the portion of the split payment allocated to this virtual account.
ChargeIndicator Boolean false NA If commission is applied to the transaction, this value is set to true on the virtual account to which the commission is to be paid. Only one virtual account can have ChargeIndicator set to true.

Body Request Example (JSON)

{
"title": "PMNT-231867513",
"shortDescription": "FirstPayment",
"paymentDescription": "FirstPayment",
    "amount": 20,
"invoiceNumber": "2021-000207",
"expiresIn": "30000",
"suppressTechnologyFee": true,
"overrideTechnologyFee": 10.50, 
"isPremiumFinancier": true,
"pfr": {
    "entity": "IPFS",
    "reference": "H3JNF785NSMC8KIJ",
    "quote": "124839",
    "accountNumber": "2395728304",
    "paymentType": "DownPayment"
},
"referenceDataList": [
    {
        "referenceType": "2",
        "referenceNumber": "86753023413"
    },
    {
        "referenceType": "5",
        "referenceKey": "CustomerNumber",
        "referenceNumber": "CST-54327890321"
    }
],
"additionalDetailsPreference": 4,
"customers": [
	{
	"firstName": "Jane",
	"lastName": "Doe",
	"email": "[email protected]",
	"phone": "+18765551616",
	}
],
"intent": {
    "paymentTypes": [
        "CreditCard",
        "DebitCard",
        "ACH"
    ]
},
"saveForFuture": true,
"quoteKey": "2111109",
"accountNumber": "CAB-2012322"
}

Response Parameters (v2.3)

Body Response Example (JSON)

{
    "customers": [
        {
            "firstName": "Jane",
            "lastName": "Doe",
            "email": "[email protected]",
            "phone": "18765551616"
        }
    ],
    "additionalDetailsPreference": "ManualEnterEditNotAllowed",
    "customers": [],    
    "selectedCustomerFields": null,
"referenceDataList": [
    {
        "referenceType": "2",
        "referenceNumber": "86753023413"
    },
    {
        "referenceType": "5",
        "referenceKey": "CustomerNumber",
        "referenceNumber": "CST-54327890321"
    }
],
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.5, 
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },    
    "splits": null,
    "saveForFuture": true,
    "quoteKey": "2111109",
    "accountNumber": "CAB-2012322",
    "enablePremiumFinance": false,
    "paymentToken": "qx7qnByd",
    "title": "PMNT-231867513",
    "amount": 20.0,
    "invoiceNumber": "2021-000207",
    "expireOn": "03-27-2024 09:57:05",
    "shortDescription": "FirstPayment",
    "paymentDescription": "FirstPayment",
    "intent": {
        "paymentTypes": [
            "CreditCard",
            "DebitCard",
            "ACH"
        ]
    }
}