Creating an echeck checkout page with your own form
Background |
---|
Before starting this tutorial, make sure you understand the following topics from the Quick start section:
|
Create a checkout page for echeck (ACH) transactions, either by using the Nexio iframe or with your own form.
Please note that e-check transactions cannot be voided or refunded.
-
Save an Echeck Token (Optional)
Before you run an echeck transaction using your own form you may save an echeck token or you may accept the bank information in step 3.
You may save an echeck token with your own form, with the save echeck token iframe, or directly through the API. Echeck tokens can be used to process through any MID on your account. They are not restricted to a specific merchant account or currency.
-
Create a Form on Your Web Page
<html> <form id="myForm"> </form> </html>
-
Collect Payment Information
You may collect some information from the user (such as first and last name, address, etc.) through the form you created in step 2.
Other information may be predefined by your site (such as amount, currency, etc.).The following information is required by Nexio:
- Amount (
data.amount
) - Currency (
data.currency
)
Either of the following is also required:
- Echeck token (
tokenex.token
) This is a previously saved echeck token - Bank account information:
- Account holder name (
bank.accountHolderName
) - Routing number (
bank.routingNumber
) - Account number (
bank.encryptedBankAccountNumber
)
- Account holder name (
See the Run echeck transaction endpoint for a complete list of possible parameters.
- Amount (
-
Send Payment Information to Your Server
-
Post Payment Information to Nexio
Send a
POST
request from your server to the Run echeck transaction endpoint with the payment information.Note
You will be required to authenticate via basic authentication.
curl -X POST https://api.nexiopaysandbox.com/pay/v3/processECheck \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "data": { "amount": 29.99, "currency": "USD" }, "tokenex": { "token": "aafb1033-599a-4392-859e-f98033fc37f5" } }'
-
Create a Receipt for the Customer
Listen for Nexio's response.
Use the response to create a success (such as a receipt) or failure page to the customer.
You may also wish to send a receipt to the customer via email.Additionally, you may want to store the
id
returned in the response as this is the payment ID and you can use it to query the status of the transaction (using the View transaction by payment ID endpoint) within about a minute. You may also want to store thetransactionId
. You can only get this parameter after the transaction runs. You get it in the webhook with thetransactionId
(note that this parameter is not returned for legacy webhooks) or in theid
returned in any of the following endpoints:
Updated 12 days ago