# Transaction API

## Overview <a href="#overview" id="overview"></a>

The Sola API enables developers to process payments using the Sola gateway. Systems integrating with the Sola API can submit API calls using various commands. The API supports many payment methods, including credit cards, ACH, EBT, and gift cards.

To begin building your API integration,[ create an account](https://solapayments.com/devsdk/) for a Sola sandbox — our secure testing environment that mimics the production environment. After signing up, you’ll be able to create user credentials for the Sola Merchant Portal. Once you log in to the Portal, you’ll be able to generate an API key from the Settings menu. [Watch our Key Management video](https://www.youtube.com/watch?v=2t0p7LYgtkA\&list=PLJOVea6Z4X_AQIcDmeAXOcQGZalOWkLxi\&index=12) or follow the instructions below to obtain a key. <br>

### How to Generate Sola Keys

1. Sign in to the Sola Merchant Portal.
2. Select "Account Settings" from the navigation bar.
3. Select "Keys" from the sub-menu.
4. Click "Create a Key" in the top-right corner.
5. Choose the desired key type (API or iFields), description (software, etc.), and permissions.
6. Click "Create and View" and copy your key.&#x20;

{% hint style="warning" %}
It is critical to copy your key and save it in a secure location, as you won’t be able to obtain the key again.
{% endhint %}

### iFields and Transaction API

We recommend using iFields in conjunction with the Transaction API for added security. Sola iFields is an iFrames solution that keeps sensitive card data away from merchant servers while granting you complete control over form layout and design. [Click here](https://docs.solapayments.com/products/ifields) to learn more about iFields.

The Sola iFields solution utilizes iFrames in which the user enters their credit card and/or ACH information and then uses JavaScript to generate SUTs (single-use tokens) for processing. These features allow the website to remain secure and out-of-scope for PCI compliance while allowing the developer to customize the page layout and design fully.

### Cross-Origin Resource Sharing (CORS) Restrictions <a href="#cross-origin-resource-sharing-cors-restrictions" id="cross-origin-resource-sharing-cors-restrictions"></a>

\
This API has Cross-Origin Resource Sharing (CORS) restrictions in place to enhance security. Requests made directly from a web browser client (e.g., JavaScript running in the browser) will be blocked.

**Allowed Origins**\
This API only accepts requests from server-side origins. Ensure that your requests originate from a server to successfully interact with the API.

### Endpoints <a href="#endpoints" id="endpoints"></a>

The endpoint section defines the details for accessing and interacting with the Sola transaction API.

#### Health Check <a href="#health-check" id="health-check"></a>

**Method:** Always use `GET` for health checks.\
**Protocol**: Secure communication is enforced using `https://`\
**Environment**: Specifies the targeted environment for the check, such as `x1`, `x2`, or `b1.` The primary environment is `x1`, with `x2` and `b1` available as backups.

**Domain**: The base URL is always `cardknox.com`\
**Paths:** The endpoint path for health checks is `/status`

| **Method** | **Protocol** | **Environment**                                   | **Domain**   | **Path** | **Example URL**                  |
| ---------- | ------------ | ------------------------------------------------- | ------------ | -------- | -------------------------------- |
| GET        | https        | <p>x1 (primary)<br>x2 (backup)<br>b1 (backup)</p> | cardknox.com | status   | <https://x1.cardknox.com/status> |

#### Transactions <a href="#transactions" id="transactions"></a>

**Method:** Always use `POST` for transaction requests.\
**Protocol**: Secure communication is enforced using `https://`\
**Environment**: The primary environment is `x1`, with `x2` and `b1` available as backups.\
**Domain**: The base URL is always `cardknox.com`\
**Paths/Formats**: Various paths are supported based on data format requirements:

* `/gatewayform` for form data
* `/gatewayjson` for JSON data
* `/gatewayxml` for XML data

| **Method** | **Protocol** | **Environment**                                   | **Domain**   | **Path**                                        | **Example URL**                       |
| ---------- | ------------ | ------------------------------------------------- | ------------ | ----------------------------------------------- | ------------------------------------- |
| POST       | https        | <p>x1 (primary)<br>x2 (backup)<br>b1 (backup)</p> | cardknox.com | <p>gatewayform<br>gatewayjson<br>gatewayxml</p> | <https://x1.cardknox.com/gatewayjson> |

{% hint style="info" %}
**x1** is the primary environment, with **x2** and **b1** as backups. The **x2** and **b1** environments have all resources necessary to operate independently of the other primary location.
{% endhint %}

## Transaction Types <a href="#request-method" id="request-method"></a>

The endpoints can be found in the following child pages by navigating to the appropriate page:

* [Credit Card](https://docs.solapayments.com/api/transaction/credit-card)
* [Check (ACH)](https://docs.solapayments.com/api/transaction/check-ach)
* [EBT](https://docs.solapayments.com/api/transaction/ebt)
* [Gift Card](https://docs.solapayments.com/api/transaction/gift-card)
* [Fraud](https://docs.solapayments.com/api/transaction/fraud)

**Transactions**

| Transaction Type                                                             | Transaction (Link)                                                       | xCommand         |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ---------------- |
| [Credit Card](https://docs.solapayments.com/api/transaction/credit-card)     | [Sale](https://docs.solapayments.com/api/credit-card#sale)               | cc:sale          |
|                                                                              | [AuthOnly](https://docs.solapayments.com/api/credit-card#authonly)       | cc:authonly      |
|                                                                              | [Capture](https://docs.solapayments.com/api/credit-card#capture)         | cc:capture       |
|                                                                              | [Adjust](https://docs.solapayments.com/api/credit-card#adjust)           | cc:adjust        |
|                                                                              | [Save](https://docs.solapayments.com/api/credit-card#save)               | cc:save          |
|                                                                              | [AVS Only](https://docs.solapayments.com/api/credit-card#avsonly)        | cc:avsonly       |
|                                                                              | [PostAuth](https://docs.solapayments.com/api/credit-card#postauth)       | cc:postauth      |
|                                                                              | [Credit](https://docs.solapayments.com/api/credit-card#credit)           | cc:credit        |
|                                                                              | [Refund](https://docs.solapayments.com/api/credit-card#refund)           | cc:refund        |
|                                                                              | [VoidRefund](https://docs.solapayments.com/api/credit-card#voidrefund)   | cc:voidrefund    |
|                                                                              | [VoidRelease](https://docs.solapayments.com/api/credit-card#voidrelease) | cc:voidrelease   |
|                                                                              | [Void](https://docs.solapayments.com/api/credit-card#void)               | cc:void          |
| [Check (ACH)](https://docs.solapayments.com/api/transaction/check-ach)       | [Sale](https://docs.solapayments.com/api/check-ach#sale)                 | check:sale       |
|                                                                              | [Credit](https://docs.solapayments.com/api/check-ach#credit)             | check:credit     |
|                                                                              | [Save](https://docs.solapayments.com/api/check-ach#save)                 | check:save       |
|                                                                              | [Void](https://docs.solapayments.com/api/check-ach#void)                 | check:void       |
|                                                                              | [Refund](https://docs.solapayments.com/api/check-ach#refund)             | check:refund     |
| [Check (ACH-Q)](https://docs.solapayments.com/api/check-ach#achq)            | [VoidRefund](https://docs.solapayments.com/api/check-ach#voidrefund)     | check:voidrefund |
| [EBT Food Stamp](https://docs.solapayments.com/api/ebt#ebt-food-stamp)       | [Sale](https://docs.solapayments.com/api/ebt#sale)                       | ebtfs:sale       |
|                                                                              | [Credit](https://docs.solapayments.com/api/ebt#credit)                   | ebtfs:credit     |
|                                                                              | [Balance](https://docs.solapayments.com/api/ebt#balance)                 | ebtfs:balance    |
|                                                                              | [Voucher](https://docs.solapayments.com/api/ebt#voucher)                 | ebtfs:voucher    |
| [EBT Cash Benefits](https://docs.solapayments.com/api/ebt#ebt-cash-benefits) | [Sale](https://docs.solapayments.com/api/ebt#sale-1)                     | ebtcb:sale       |
|                                                                              | [Cash](https://docs.solapayments.com/api/ebt#cash)                       | ebtcb:cash       |
|                                                                              | [Balance](https://docs.solapayments.com/api/ebt#balance-1)               | ebtcb:balance    |
| [EBT Wic (eWic)](https://docs.solapayments.com/api/ebt#ebt-wic-ewic)         | [Sale](https://docs.solapayments.com/api/ebt#sale-2)                     | ebtw:sale        |
|                                                                              | [Balance](https://docs.solapayments.com/api/ebt#balance-2)               | ebtw:balance     |
|                                                                              | [Void](https://docs.solapayments.com/api/ebt#void)                       | ebtw:void        |
| [Gift Card](https://docs.solapayments.com/api/gift-card#issue)               | [Issue](https://docs.solapayments.com/api/gift-card#issue)               | gift:issue       |
|                                                                              | [Redeem](https://docs.solapayments.com/api/gift-card#redeem)             | gift:redeem      |
|                                                                              | [Balance](https://docs.solapayments.com/api/gift-card#balance)           | gift:balance     |
|                                                                              | [Activate](https://docs.solapayments.com/api/gift-card#activate)         | gift:activate    |
|                                                                              | [Deactivate](https://docs.solapayments.com/api/gift-card#deactivate)     | gift:deactivate  |
| [Fraud](https://docs.solapayments.com/api/transaction/fraud)                 | [Fraud Submit](https://docs.solapayments.com/api/fraud#fraud-submit)     | fraud:submit     |

## Questions <a href="#credit-card" id="credit-card"></a>

Can't find what you're looking for? Please contact <support@solapayments.com>.
