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_tokenandrefresh_token. These can be generated in Run Merchant or provided by your Integration Delivery Lead.
Usage
- Use the
api_keyandrefresh_tokento 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_tokenin the header. For this example, we are calling the/chargeendpoint.
- Store relevant data from the response payload in your database for reporting within your application. The
trans_idcan 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.