POST Create Secure Payment Request
The Secure Payments API enables merchants to integrate AndDone payment processing functionality into their existing applications.
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 trasactions. 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.
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 | true | 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 | false | NA | Indicates the type of payment transaction. Accepted values are PaymentIntent, OpenPayment, AnytimePayment, PaymentLink. |
paymentReference | String | true | 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 | 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. |
transactionCode | String | true | NA | This code is always set to 'Web'. |
billingContact | Object | false | NA | Billing Contact Information |
name | Object | NA | NA | NA |
firstName | String | false | NA | First Name |
lastName | String | false | NA | Last Name |
address | Object | NA | 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 |
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 | true | NA | Bank Name (ACH) |
accountNumber | String | true | NA | Account Number (ACH) |
routingNumber | String | true | NA | Routing Number (ACH) |
accountType | String | false | NA | Account type - Checking or Savings (ACH) |
checkNumber | String | false | NA | Check Number (ACH) |
accountHolderName | String | true | NA | Account Holder Name (ACH) |
nameOnCheck | String | false | NA | Name on Check (ACH) |
cardHolderName | String | true | NA | Card Holder Name (Credit/Debit) |
cardType | String | true | NA | The card brand - e.g., Visa, Mastercard, Discover, etc. (Credit/Debit) |
cardNumber | String | true | NA | Card Number (Credit/Debit) |
cardExpiry | String | true | NA | Card expiration month and year - MMYY (Credit/Debit) |
cVData | Number | true | NA | Card Verification Code - CVC (Credit/Debit) |
cVDataStatus | String | true | 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 | true | 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 | true | 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 |
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",
"cvDataStatus": "AV",
"cvData": 737,
"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
}