Skip to main content

Secure Payments

POST Create Secure Payment Request

The Secure Payments API enables merchants to integrate AndDone payment processing functionality into their existing applications. Using the API, merchants can directly submit two types of payment transactions:

  • Payment Intent - This type of payment transaction is used when a payment intent has been generated for multi-step transactions. Payment Intent type transactions require a payment intent token. See Using Payment Intents for more information.
  • Open Payment - An open payment is a single-step payment transaction that does not require a payment intent. See Using Open Payments for more information.

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

API Versioning

  • Version 2.1 Comprises the base functionality for creating a secure payment request.
  • Version 2.2: Adds the ability for merchants to suppress the AndDone technology fee on payment transactions.
  • Version 2.3: The channelType parameter is optional for transactions using a tokenized payment method. This method also includes an optional processMethod parameter.
API Endpoint
https://api.uat.anddone.com/secure/payments
API Data Details
URI secure/payments
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 Secure Payment Request 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
token String false NA The paymentToken returned by the payment intent request. It associates the secure payment transaction with the payment intent. This token can be used only once. This value is required for PaymentIntent type requests.
type String true NA Indicates the type of payment transaction. Accepted values are PaymentIntent, OpenPayment, AnytimePayment, PaymentLink.
paymentReference String false NA The unique merchant-provided transaction ID. This value is required for OpenPayment transactions.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Open Payment, Payment Intent, and 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 does not apply to Anytime Payment transactions. 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 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.
transactionCode String true NA This code is always set to 'Web'.
billingContact Object false NA Billing Contact Information
phone number false NA The phone number for the billing contact.
companyName string false NA The name of the billing contact company.
department string false NA The department of the billing contact.
fax string false NA The fax number of the billing contact.
alternatePhone string false NA The alternate phone number of the billing contact.
mobile string false NA The mobile number of the billing contact.
email string false NA The email address of the billing contact.
url string false NA The web address associated with the billing contact.
name Object false NA NA
title String false NA Word or phrase preceeding the contacts name (e.g., Mr., Mrs., Ms.)
firstName String false NA First name
middleName String false NA Middle name
lastName String false NA Last name
address Object false NA NA
addressLine1 String false NA Address line 1 (e.g., street, PO Box, or company name)
addressLine2 String false NA Address line 2 (e.g., apartment, suite, unit, or building)
city String false NA City
state String false NA State
country Number false NA Country
postalCode String false NA Postal Code
timeZone String false NA Time Zone
phoneCountryCode String false NA The country-specific numerical prefix for the phone number.
channelType String true NA Indicates the method of payment used for the transaction. Accepted Values are CreditCard, DebitCard, or ACH
tenderInfo Object true NA This object contains the details about the customer's payment account.
bankName String false NA Bank Name (ACH)
accountNumber String false NA Account Number (ACH)
routingNumber String false NA Routing Number (ACH)
accountType String false NA Account type - Checking or Savings (ACH)
checkNumber String false NA Check Number (ACH)
accountHolderName String false NA Account Holder Name (ACH)
nameOnCheck String false NA Name on Check (ACH)
cardHolderName String false NA Card Holder Name (Credit/Debit)
cardType String false NA The card brand - e.g., Visa, Mastercard, Discover, etc. (Credit/Debit)
cardNumber String false NA Card Number (Credit/Debit)
cardExpiry String false NA Card expiration month and year - MMYY (Credit/Debit)
cvv String false NA Card Verification Code - CVC (Credit/Debit)
cvDataStatus String false NA cVDataStatus (Credit/Debit)
removeDiscounting Boolean false NA Boolean value indicating if discounting is to be removed or not. If set to false, the Technology Fee is added to the payment amount. If set to true, the Technology Fee is NOT added to the transaction.
amount Number false NA The amount (USD) to be paid. Supports up to two decimal places. Example: A payment for ten dollars and fifty cents is represented as 10.50.
createAccountToken Boolean false NA Boolean value indicating whether the payment method is to be tokenized. This is set to true when the customer has opted to save their payment information for future use.
accountToken String false NA In transactions using a tokenized payment method, this is the token representing the customer’s account information.
remarks String false NA
additionalFields Object false NA Additonal Information
policyNumber String false NA Policy Number
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 false NA The name of the virtual account.
amount Number false 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.
accountType String false NA The type of the bank account represented by the virtual account (e.g., Checking, Savings).
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)

{
    "PaymentReference": "PMT-543216827",
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.50,
    "type": "OpenPayment",
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },
    "tenderInfo": {
        "amount": 278,
        "cardHolderName": "John Doe",
        "cardType": "VISA",
        "cardNumber": "XXXX 5000 0000 0008",
        "cardExpiry": "0330",
        "cvv": "737",        
        "cvDataStatus": "AV",
        "removeDiscounting": false
    },
    "transactionCode": "Web",
    "channelType": "CreditCard",
    "billingcontact": {
        "phone": "8003213388",
        "name": {
            "firstname": "John",
            "lastname": "Doe"
        },
        "address": {
            "addressLine1": "30",
            "addressLine2": "Memorial Drive",
            "city": "Avon ",
            "state": "NY",
            "country": 1,
            "postalCode": "12701"
        }
    }
}

Response Parameters (v2.2)

Body Response Example (JSON)

{
    "suppressTechnologyFee": true,
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },
    "transactionId": "7a3a7eda-e647-4a60-9586-12582f31fcbb",
    "transactionCode": "WEB",
    "transactionOrigin": "WebForm",
    "refundOrigin": 0,
    "billingContact": {
        "name": {
            "title": null,
            "firstName": "John",
            "middleName": null,
            "lastName": "Doe"
        },
        "companyName": null,
        "department": null,
        "fax": null,
        "phone": "8003213388",
        "alternatePhone": null,
        "mobile": null,
        "email": null,
        "url": null,
        "address": {
            "addressLine1": "30",
            "addressLine2": "Memorial Drive",
            "city": "Avon ",
            "state": "NY",
            "country": 1,
            "postalCode": "12701",
            "timeZone": null
        }
    },
    "referenceTransactionId": null,
    "transactionDate": "04-01-2024 14:38:55",
    "merchantId": "nZ8gAqvo",
    "ipAddress": "162.158.174.118",
    "operationType": "Sale",
    "channelType": "CreditCard",
    "processMethod": "CardNotPresent",
    "paymentType": "OpenPayment",
    "paymentCategory": "MerchantPayment",
    "processorName": "Adyen",
    "tenderInfo": {
        "bankName": null,
        "routingNumber": null,
        "rawMICRLine": null,
        "accountType": null,
        "checkType": null,
        "checkNumber": null,
        "nameOnCheck": null,
        "accountHolderName": null,
        "accountCategory": null,
        "cardHolderName": "John Doe",
        "cardType": "VISA",
        "maskCardNumber": "****0008",
        "binNumber": "4151 5",
        "cardExpiry": "0330",
        "captureAmount": 283.0,
        "amount": 278.0,
        "tipAmount": 0.0,
        "convenienceAmount": 0.0,
        "taxAmount": 0.0,
        "taxAfterDiscount": false,
        "taxPercent": 0.0,
        "adjustmentPercentValue": 0.0,
        "adjustmentFixedValue": 5.0,
        "adjustmentAmount": 10.50,
        "adjustmentDisplayName": "Technology Fee",
        "adjustmentDescriptorMessage": "AndDone applies a technology fee on all electronic payments.",
        "paymentAdjustmentType": "ConvenienceFee",
        "preAuthCode": null,
        "maskAccount": null,
        "accountToken": null,
        "accountTokenMessage": null,
        "createAccountToken": false,
        "discountType": "Fixed",
        "discountPercent": 0.0,
        "discountAmount": 0.0,
        "commissionType": "Percentage",
        "commissionValue": 0.0,
        "currency": null,
        "fullAccountNumber": null
    },
    "referenceCustomerId": null,
    "customerAccountId": null,
    "invoiceNo": null,
    "referenceNo": "PMT-543216827",
    "remarks": null,
    "terminalId": "VT000356",
    "transactionStatus": "Authorized",
    "previousTransactionStatus": "Posted",
    "transactionResult": {
        "success": true,
        "processorAuthCode": "Authorised",
        "traceNumber": "CDPFXJX8N4992P65",
        "reasonCode": null,
        "reasonMessage": null,
        "additionResultData": null,
        "additionResultData2": "{\"additionalData\":{\"PaymentMethod\":\"visa\",\"NetworkTxReference\":\"729701738322760\",\"CardBin\":\"415150\",\"CardSummary\":\"0008\",\"CardHolderName\":\"John Doe\",\"ExpiryDate\":\"3/2030\",\"RealtimeAccountUpdaterStatus\":null,\"Recurring.RecurringDetailReference\":null,\"Recurring.ShopperReference\":null},\"PspReference\":\"CDPFXJX8N4992P65\",\"RefusalReason\":null,\"ResultCode\":\"Authorised\",\"RefusalReasonCode\":null,\"amount\":{\"Currency\":\"USD\",\"Value\":28300},\"MerchantReference\":\"PMT-543216827\"}",
        "verificationStatus": true,
        "verification1Code": null,
        "verification2Code": null,
        "errorCode": null,
        "errorMessage": null,
        "merchantReference": "PMT-543216827"
    },
    "invoiceId": null,
    "additionalFields": null,
    "settlementDate": null,
    "issuer": "FIRST PEOPLES COMMUNITY FEDERAL CREDIT UNION",
    "merchantName": null,
    "merchantDBAName": "SnehalRefund",
    "splits": null,
    "paymentDescription": null,
    "refundTransactions": null,
    "totalRefundAmount": 0.0,
    "remainingAmount": 0.0,
    "chargebackReason": null,
    "chargebackReasonCode": null,
    "chargebackDateTime": "",
    "subTotalAmount": 0.0
}

API Version 2.3

In Version 2.3 of POST Create Secure Payment Request the channelType parameter is optional for transactions using a tokenized payment method, as this value is automatically determined. This version also includes an optional processMethodparameter.

Request Parameters (v2.3)

Field Name Data Type Mandatory Field Length Description
token String false NA The paymentToken returned by the payment intent request. It associates the secure payment transaction with the payment intent. This token can be used only once. This value is required for PaymentIntent type requests.
type String true NA Indicates the type of payment transaction. Accepted values are PaymentIntent, OpenPayment, AnytimePayment, PaymentLink.
paymentReference String false NA The unique merchant-provided transaction ID. This value is required for OpenPayment transactions.
suppressTechnologyFee Boolean false NA This parameter enables authorized merchants to suppress the AndDone technology fee on Open Payment, Payment Intent, and 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 does not apply to Anytime Payment transactions. 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 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.
transactionCode String true NA This code is always set to 'Web'.
billingContact Object false NA Billing Contact Information
phone number false NA The phone number for the billing contact.
companyName string false NA The name of the billing contact company.
department string false NA The department of the billing contact.
fax string false NA The fax number of the billing contact.
alternatePhone string false NA The alternate phone number of the billing contact.
mobile string false NA The mobile number of the billing contact.
email string false NA The email address of the billing contact.
url string false NA The web address associated with the billing contact.
name Object false NA NA
title String false NA Word or phrase preceeding the contacts name (e.g., Mr., Mrs., Ms.)
firstName String false NA First name
middleName String false NA Middle name
lastName String false NA Last name
address Object false NA NA
addressLine1 String false NA Address line 1 (e.g., street, PO Box, or company name)
addressLine2 String false NA Address line 2 (e.g., apartment, suite, unit, or building)
city String false NA City
state String false NA State
country Number false NA Country
postalCode String false NA Postal Code
timeZone String false NA Time Zone
phoneCountryCode String false NA The country-specific numerical prefix for the phone number.
channelType String true NA Indicates the method of payment used for the transaction. Accepted Values are CreditCard, DebitCard, or ACH. For transactions using an accountToken in place of actual card or ACH account information, this parameter is optional.
processMethod String false NA Specifies how the payment should be processed. Accepted values: NotDefined, ACH, or CardNotPresent.
tenderInfo Object true NA This object contains the details about the customer's payment account.
bankName String false NA Bank Name (ACH)
accountNumber String false NA Account Number (ACH)
routingNumber String false NA Routing Number (ACH)
accountType String false NA Account type - Checking or Savings (ACH)
checkNumber String false NA Check Number (ACH)
accountHolderName String false NA Account Holder Name (ACH)
nameOnCheck String false NA Name on Check (ACH)
cardHolderName String false NA Card Holder Name (Credit/Debit)
cardType String false NA The card brand - e.g., Visa, Mastercard, Discover, etc. (Credit/Debit)
cardNumber String false NA Card Number (Credit/Debit)
cardExpiry String true NA Card expiration month and year - MMYY (Credit/Debit)
cvv String false NA Card Verification Code - CVC (Credit/Debit)
cvDataStatus String false NA cVDataStatus (Credit/Debit)
removeDiscounting Boolean false NA Boolean value indicating if discounting is to be removed or not. If set to false, the Technology Fee is added to the payment amount. If set to true, the Technology Fee is NOT added to the transaction.
amount Number false NA The amount (USD) to be paid. Supports up to two decimal places. Example: A payment for ten dollars and fifty cents is represented as 10.50.
createAccountToken Boolean false NA Boolean value indicating whether the payment method is to be tokenized. This is set to true when the customer has opted to save their payment information for future use.
accountToken String false NA The token representing the customer’s account information. If the transaction uses a tokenized payment method, this value is passed in place of the actual card or checking account information.
remarks String false NA
additionalFields Object false NA Additonal Information
policyNumber String false NA Policy Number
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 false NA The name of the virtual account.
amount Number false 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.
accountType String false NA The type of the bank account represented by the virtual account (e.g., Checking, Savings).
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)

{
    "PaymentReference": "PMT-543216827",
    "suppressTechnologyFee": true,
    "overrideTechnologyFee": 10.50,
    "type": "OpenPayment",
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },
    "tenderInfo": {
        "amount": 278,
        "accountToken": "X43DFG784JVCR3S2"
        "removeDiscounting": false
    },
    "transactionCode": "Web",
    "billingcontact": {
        "phone": "8003213388",
        "name": {
            "firstname": "John",
            "lastname": "Doe"
        },
        "address": {
            "addressLine1": "30",
            "addressLine2": "Memorial Drive",
            "city": "Avon ",
            "state": "NY",
            "country": 1,
            "postalCode": "12701"
        }
    }
}

Response Parameters (v2.3)

Body Response Example (JSON)

{
    "suppressTechnologyFee": true,
    "isPremiumFinancier": true,
    "pfr": {
        "entity": "IPFS",
        "reference": "H3JNF785NSMC8KIJ",
        "quote": "124839",
        "accountNumber": "2395728304",
        "paymentType": "DownPayment"
    },
    "transactionId": "7a3a7eda-e647-4a60-9586-12582f31fcbb",
    "transactionCode": "WEB",
    "transactionOrigin": "WebForm",
    "refundOrigin": 0,
    "billingContact": {
        "name": {
            "title": null,
            "firstName": "John",
            "middleName": null,
            "lastName": "Doe"
        },
        "companyName": null,
        "department": null,
        "fax": null,
        "phone": "8003213388",
        "alternatePhone": null,
        "mobile": null,
        "email": null,
        "url": null,
        "address": {
            "addressLine1": "30",
            "addressLine2": "Memorial Drive",
            "city": "Avon ",
            "state": "NY",
            "country": 1,
            "postalCode": "12701",
            "timeZone": null
        }
    },
    "referenceTransactionId": null,
    "transactionDate": "04-01-2024 14:38:55",
    "merchantId": "nZ8gAqvo",
    "ipAddress": "162.158.174.118",
    "operationType": "Sale",
    "channelType": "CreditCard",
    "processMethod": "CardNotPresent",
    "paymentType": "OpenPayment",
    "paymentCategory": "MerchantPayment",
    "processorName": "Adyen",
    "tenderInfo": {
        "bankName": null,
        "routingNumber": null,
        "rawMICRLine": null,
        "accountType": null,
        "checkType": null,
        "checkNumber": null,
        "nameOnCheck": null,
        "accountHolderName": null,
        "accountCategory": null,
        "cardHolderName": "John Doe",
        "cardType": "VISA",
        "maskCardNumber": "****0008",
        "binNumber": "4151 5",
        "cardExpiry": "0330",
        "captureAmount": 283.0,
        "amount": 278.0,
        "tipAmount": 0.0,
        "convenienceAmount": 0.0,
        "taxAmount": 0.0,
        "taxAfterDiscount": false,
        "taxPercent": 0.0,
        "adjustmentPercentValue": 0.0,
        "adjustmentFixedValue": 5.0,
        "adjustmentAmount": 10.50,
        "adjustmentDisplayName": "Technology Fee",
        "adjustmentDescriptorMessage": "AndDone applies a technology fee on all electronic payments.",
        "paymentAdjustmentType": "ConvenienceFee",
        "preAuthCode": null,
        "maskAccount": null,
        "accountToken": null,
        "accountTokenMessage": null,
        "createAccountToken": false,
        "discountType": "Fixed",
        "discountPercent": 0.0,
        "discountAmount": 0.0,
        "commissionType": "Percentage",
        "commissionValue": 0.0,
        "currency": null,
        "fullAccountNumber": null
    },
    "referenceCustomerId": null,
    "customerAccountId": null,
    "invoiceNo": null,
    "referenceNo": "PMT-543216827",
    "remarks": null,
    "terminalId": "VT000356",
    "transactionStatus": "Authorized",
    "previousTransactionStatus": "Posted",
    "transactionResult": {
        "success": true,
        "processorAuthCode": "Authorised",
        "traceNumber": "CDPFXJX8N4992P65",
        "reasonCode": null,
        "reasonMessage": null,
        "additionResultData": null,
        "additionResultData2": "{\"additionalData\":{\"PaymentMethod\":\"visa\",\"NetworkTxReference\":\"729701738322760\",\"CardBin\":\"415150\",\"CardSummary\":\"0008\",\"CardHolderName\":\"John Doe\",\"ExpiryDate\":\"3/2030\",\"RealtimeAccountUpdaterStatus\":null,\"Recurring.RecurringDetailReference\":null,\"Recurring.ShopperReference\":null},\"PspReference\":\"CDPFXJX8N4992P65\",\"RefusalReason\":null,\"ResultCode\":\"Authorised\",\"RefusalReasonCode\":null,\"amount\":{\"Currency\":\"USD\",\"Value\":28300},\"MerchantReference\":\"PMT-543216827\"}",
        "verificationStatus": true,
        "verification1Code": null,
        "verification2Code": null,
        "errorCode": null,
        "errorMessage": null,
        "merchantReference": "PMT-543216827"
    },
    "invoiceId": null,
    "additionalFields": null,
    "settlementDate": null,
    "issuer": "FIRST PEOPLES COMMUNITY FEDERAL CREDIT UNION",
    "merchantName": null,
    "merchantDBAName": "SnehalRefund",
    "splits": null,
    "paymentDescription": null,
    "refundTransactions": null,
    "totalRefundAmount": 0.0,
    "remainingAmount": 0.0,
    "chargebackReason": null,
    "chargebackReasonCode": null,
    "chargebackDateTime": "",
    "subTotalAmount": 0.0
}