Skip to main content

Payments

Exact's Payments API supports a robust set of payment methods credit, debit, ACH, token, and wallets as well as all required transaction types Purchase, Authorization, Capture, Refund, and Void.

Both 1-pass and 2-pass transaction flows are fully supported. With 1-pass, payment transactions are processed for authorization and capture in a single request, also known as a Purchase. With 2-pass transactions, the Authorization and Capture are separate requests.

The 2-pass method is most common in eCommerce businesses where the authorization is made when the customer checks out, while the shipment (delivery of goods/services) comes on a subsequent date, at which point a capture request is submitted. 2-pass is also common in restaurant, lodging, auto rental, and other businesses where a hold on funds is necessary prior to calculating the final payment amount.

Requests to create new payments are submitted as POST requests to the /payments path.

1-pass Payment (Purchase) This is the default payment type created.

Request: 1-Pass Payment
POST /payments
{
"amount": 100,
"paymentMethod": {
"creditCard": {
"cardholder": "Bob Jones",
"number": "4111111111111111",
"expiryMonth": "02",
"expiryYear": "2026",
"cvd": "123",
"cvdIndicator": 1
}
}
}

Once a payment has been created, a paymentId will be returned in the response which can then be used for capture, refunds or voids.

Response: 1-Pass Payment
{
"id": "64aca3d5c79c5e590217a157",
"paymentId": "64aca3d5c79c5e590217a157",
...
"type": "payment",
"status": "completed",
"approved": true,
"captured": true,
"authorization": "ET152984",
"amount": 100,
"sentToBank": true,
...
"bankResponse": {
"code": "AA",
"message": "Approved Transaction"
},
"paymentMethodDetails": {
"cardBrand": "visa",
"cardholder": "Bob Jones",
"last4": "1111",
"expiryMonth": 2,
"expiryYear": 2026,
"cvdCheck": {
"code": "I",
"description": "CVV2 code is invalid or empty"
}
},
...
}

2-pass Payment (PreAuth, or Authorization) In this example, we will submit an authorization for $10.00 (note that all API amounts are always in cents).

In order to prevent the capture, you just need to send "capture": false in the request body.

Request: 2-Pass Initial Authorization
POST /payments
{
"capture": false,
"amount": 1000,
"paymentMethod": {
"creditCard": {
"cardholder": "Bob Jones",
"number": "4111111111111111",
"expiryMonth": "02",
"expiryYear": "2026",
"cvd": "123",
"cvdIndicator": 1
}
}
}
Response: 2-Pass Initial Authorization
{
"paymentId": "64aca46bc79c5e590217a15e",
"type": "payment",
"status": "completed",
"approved": true,
"captured": false,
"authorization": "ET174928",
"amount": 1000,
...
}

We have now performed the authorization, so we can capture an amount against that authorization.