Overview

PEX is a commercial prepaid card that helps your company control employee spending. You can issue cards, add funds to cards, and apply spend controls (including restricting specific merchant categories) through our Admin portal which includes 24/7 access to your PEX account as well as mobile support.

The PEX platform is also available through a complete set of JSON-based APIs which can be used to duplicate every feature available in our Admin portal, and to support a few features that aren’t. The PEX platform can be used to power any proprietary expense management or business payment application to create a seamless payment experience for your users.

The PEX APIs are organized into 8 work groups:

BUSINESS

All functions related to managing your company set up on the PEX platform.APIs are available within this group to:

Create, retrieve details on, edit or delete a Business Administrator

Retrieve and edit your company profile

Add Groups

Add Spend Rulesets

Create, retrieve and cancel ACH funding requests

DETAILS

All functions related to working with service and account details.APIs are available within this group to:

Retrieve card account details

Retrieve all transactions for your company or for a single card account

Ping the PEX server and return the API version

CARD

All functions related to managing a card.APIs are available within this group to:

Create, activate, retrieve, fund and close a card account

Change the status of a card (Block or Unblock)

Create, retrieve and delete card funding rules

Retrieve and edit card spending rules

Create a PIN

Adjust the available card balance to zero

BULK

All functions related to managing a card.APIs are available within this group to:

Create, activate, retrieve, fund and close a card account

Change status of a card (Block or Unblock)

Create, retrieve and delete card funding rules

Retrieve and edit card spending rules

Create a PIN

Adjust the available card balance to zero

GROUP

All functions related to creating, assigning cardholders to or removing cardholders from groups

NOTE

All functions related to adding, changing or removing notes from a transaction.

TOKEN

All functions related to managing the tokens that are required for API access.APIs are available within this group to:

Generate a new access token

Retrieve details on an existing token

Renew a token

SPENDING RULESET

All functions related to managing the spending rulesets.APIs are available within this group to:

Create a new spending ruleset

Retrieve details on an existing spending ruleset

Delete an existing spending ruleset

Sign up for PEX API

PEX offers a collection of APIs to help build integrations for a variety of use cases, including Card Funding and Reporting. Customers are provided with a sandbox environment to familiarize themselves with the PEX API system. The sandbox environment offers the opportunity to explore all API calls before enacting production APIs.

Authentication

Establishing the Business Account

After your company completes the PEX enrollment process and service agreement acknowledgement, PEX will set up a business account. The business account is used to store funds that will later be assigned to card accounts and used as payment for company expenses.

Working with Card Accounts

Response Codes

PEX uses conventional HTTPS response codes to indicate the success or failure of a request. In general, 200-level codes indicate success, 400-level codes indicate an error that resulted from your input, and 500-level codes are typically related to a PEX internal issue, and should be reported to us.
Errors specific to a call are included on the documentation page. Global errors can occur with most calls and they are listed below:

- 400: The request is invalid

- 401: Password has changed

- 401: Token expired or does not exist

- 401: Missing authorization header

- 401: Bad authorization scheme

- 401: Invalid appId

- 403: Must be admin user

- 403: Business is not open

- 403: User is not active

- 403: Invalid Card Account ID

- 409: Conflict

- 429: Usage limits exceeded

- 500: System error

- 502: Bad Gateway; please retry after 2 mins

If 400: Invalid Input is received, further helpful information about the error is provided in the response.

Rate Limit

In order to assure consistent, reliable service for all of our customers, all API users are subject to an overall limit of 120 calls per minute. Certain APIs have individual limits:

GET/Details/TransactionDetails

1 hit per minute

GET/Details/AccountDetails

10 hits per hour

GET/Details/AllCardholderTransactions

10 hits per hour

POST/Bulk/Zero

2 hits per day

POST/Card/Zero/{Id}

1 hit per 4 mins for same card account

POST/Business/OneTimeTransfer

2 hits per hour

POST/Token

2 hits per day

DELETE/Token

2 hits per day

Note:

For POST/Card/Zero/{Id} end point, system will allow only 1 hit per 4 mins for same card account.

If you exceed any API limits, you will receive error 429: Usage Limits Exceeded. Please contact
your API support manager for work-arounds and help if you are receiving error responses related to Usage Limits Exceeded.

Backword Compatible Changes

We strive to avoid making any changes that would break our API calls, but we do make changes over time that may result in changes to the data that you pull from PEX.

We consider the following changes to be backwards compatible:

Adding new API endpoints

Adding new data elements to existing response schemas

Adding new webhooks

Changing the length or content of any API identifier

Help

For additional assistance, please email apisupport@pexcard.com or use the forums available in your developer account.