Process a Payment
Payments API Overview
This guide provides a detailed overview of sending transactions to our Payments API. Depending on the nature of your business, you may want to collect more or less data about your customer during a transaction. Your Integration Delivery lead will advise on how best to construct your API calls based on your business use case.
Requirements:
Before we can complete a transaction using the Payments API, you must have:
- Payment Token generated using Runner.js or the tokenization tool within Run Merchant.
- Payment API Credentials including the
access_token
andrefresh_token
. These can be generated in Run Merchant or provided by your Integration Delivery Lead.
Usage
- Use the
api_key
andrefresh_token
to request a fresh API key from/api_keys/refresh
.
Every api_key
has an expiration of 1 hour. Every refresh_token
has an expiration of 30 days.
- Collect data using Runner.js for payment account tokenization and additional customer information to be sent with the API call.
- Construct and send your API call to the Payments API using your
access_token
in the header. For this example, we are calling the/charge
endpoint.
- Store relevant data from the response payload in your database for reporting within your application. The
trans_id
can be used to retrieve a transaction’s full detail from the Reporting API. Below is an abbreviated sample of key response data:
For additional endpoints and examples, jump to the Payments API Reference.