Run a sale
An AI skill is available for this guide, get it on the Skills Marketplace (GitHub).
After a customer enters their payment details into Hosted Fields, we tokenize them and return a single-use token. To run a sale, use the single-use token with our API.
The API method that you need to use depends on the payment type that the single-use token represents, for example, card details or bank account details.
Before you begin
Single-use token
Make sure that your integration can handle submissionSuccess events to receive a single-use token when a customer submits their payment details.
Authenticate your requests before making API calls. If your request fails, see Errors.
Integration steps
The method that you need to use to run the sale depends on the customer’s payment type:
- If the single-use token represents card details, go to Run a sale with card details.
- If the single-use token represents ACH or PAD details, go to Run a sale with bank account details.
Run a sale with card details
To run a sale with card details, send a POST request to our Payments endpoint.
Request parameters
Important: The request includes parameters for functions and features that we don’t cover in this guide. These functions and features might require additional integration effort and cost. For more information, contact our Integrations Team at [email protected].
For the paymentMethod object, send values for the following parameters:
- type: Send a value of
singleUseToken. - token: Send the single-use token that you received in the submissionSuccess event.
Request
Example request
Response fields
If your request is successful, our gateway uses the card details to run a sale. The response contains the following fields:
Response
Example response
Run a sale with bank account details
To run a sale with bank account details, send a POST request to our Bank Transfer Payments endpoint.
Request parameters
Important: The request includes parameters for functions and features that we don’t cover in this guide. These functions and features might require additional integration effort and cost. For more information, contact our Integrations Team at [email protected].
For the paymentMethod object, send values for the following parameters:
- type: Send a value of
singleUseToken. - token: Send the single-use token that you received in the submissionSuccess event.
- accountType: Indicate if the bank account is a savings account or a checking account.
- secCode: If the single-use token represents ACH details, indicate how the customer authorized the payment.
Request
Example request
Response fields
If your request is successful, our gateway uses the bank account details to run a sale. The response contains the following fields: