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.
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.
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) |
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 transactions. If set to true, no technology fee is assessed on the transaction. If set to false, the technology fee is assessed on the transaction. |
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",
"expireIn": "30000",
"suppressTechnologyFee": true,
"intent": {
"paymentTypes": [
"CreditCard",
"DebitCard",
"ACH"
]
},
"saveForFuture": true,
"quoteKey": "2111109",
"accountNumber": "CAB-2012322"
}
Response Parameters (v2.2)
Body Response Example (JSON)
{
"suppressTechnologyFee": true,
"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"
]
}
}