Running an echeck transaction with the API
Background |
---|
Before starting this tutorial, make sure you understand the following topics from the Quick start section:
Also, contact Integrations Support to ensure your merchant ID and account have access to the proper API endpoint for this task. (You may be asked to provide additional information such as Gateway, TokenEx, or Kount credentials.) |
This topic guides you through the steps for running an echeck transaction directly through the API, such as running a manual payment or a merchant-initiated transaction.
To run a transaction using the API, follow the steps below:
-
In order to run an echeck transaction through the API, you need to have an echeck token. 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.
-
Post payment details, along with the card token, to the Run card transaction endpoint.
You must at least include the saved card token, transaction amount, and the payment type (for properly flagging initial and subsequent transactions).
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 }, "tokenex": { "token": "6ee140a0-05d1-4958-8325-b38a690dbb9d" } }'
The response includes the
id
parameter. 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 about 2 months ago