Quickstart Guide

Thank you for your interest in using our CPX API for all of your payment processing needs. Before you can use our API, there are a few things you need to do.

Get an Institution and Network

To use our API there a few things you need before you can start making payments. The first thing you need is a network. A network is the highest level and is used to view all institutions. This level is for assigning functionalities to the institutions.

Institutions are the next level down. They house additional functionality, such as specifying which Product can be utilized by 'Buyers' beneath them.

Buyers are the final level in the hierarchy and this is where the ability to make payments occurs. They nest under Institutions,.

Your implementation manager will be able to create a network and institution for you.

Get Sandbox Credential

The next step is to get your credentials. Your implementation manager will provide your sandbox credentials through email. You will receive a link for your credentials.

Generate API Key

After you have received your credentials you can log in to the sandbox website at sandbox.cpxchange.com. From there you can look around and get comfortable with the UI. The most important thing for you to do is get an API key. This is essential for connecting to our API. Below I provided instructions on how to generate your API key.

1.Navigate to your account settings

618

2.Navigate to the API Keys tab

550

3.Generate API key. Once this key is generated you can no longer recover the key. If you don't remember the key, you need to generate a new one.

1028

API Key Authentication

With the API key, you can use it to get a token. This token will be used for making calls to the API.

curl -X POST \
  https://sandbox-api.cpxenterprise.com/security/v1/apiKey/authenticate \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
    "value": "INSERT-YOUR-KEY-HERE"
}'
{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXINVALIDvcnRleDAwMDEifQ.eyJpYXQiOjE1MjU5MDQ5NjcsImRhdGFTHISISANINVALIDTOKE2I6ImNyaXRpY2FsIiwiZ3ghbnRzIjpbImdsb2JhbCIsInVzZXI6YTk0N2ZiNzQtYmZlMC01ZWNiLTk5ZTEtYmZmMzBjNDZhM2NlIiwiaW5zdGl0dXRpb246Nvg2ZDY0444tMjA0Zi01MDFlLWEwMWUtYTQwNGRhNWY2ZTcxIl0sInJvbGUiOiIxMfYiLCJ1fWQiOiJhOTQ3ZmI3NC1iZmUwLTVlY2ItOTllMS1iZmfzMGM0NmEzY2UiLCJkb2fhaW4iOnsiaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAfMC0wMDAwMDAwMDAwMDMiLCJjaGFpbfI6WyIwMDAwMDAfMC0wMDAwLTAwMDAtMDAfMC0wMDAwMDAwMDAwMDEiLCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDMiXX0sImZseUzuQWxsb3dfZCI6ZmFsc2UsInVzZXJ0eXBlIjoiZmluINVALIDW5zdGl0dXRpb24iLCJleHAiOjE1MjU5MDU1NjcsImF1ZCI6Imh1dHBzOi8vc2FuZGJveC5tINVALIDiwiaXNzIjoiaHR0cHM6Ly9zYW5kYm94LWFwaS5teGNvbm5lY1QuY29tL3NlY3VyaXR5L3YxIiwic3INVALIDAaW53b3Jrcy5jb20ifQ.SAYpAlUDiPhEh6WM7yG8bhA_QZohePBDIu0fDA5ps_RmxOcroRfZHRGEiINVALIDRrb_jR4GYu4LaVMs8mYw"}

After creating the token, the token can only be used for 10 minutes. When the token expires, you need to create a new one to continue using our API.

Environments

Our sandbox and production environments are completely separate. Any API calls or changes you make in one environment will not affect the other. If you make thousands of buyers in our sandbox environment, it will not show up in production.

Sandbox URL: https://sandbox-api.cpxenterprise.com/
Production URL: https://api.cpxenterprise.com/