Generate a swipe processer (SwP) token

This token will come in handy later when testing transactions.

Next, generate a swipe processor (SwP) token. This token will be used later when testing transactions, and without it, transactions will fail. Before generating a new token, here are a few things to note about swipe processor tokens:

  1. Swipe processor tokens can only be created via the API.
  2. These tokens are associated with your Secure Payments account, and you can have up to two valid tokens at a time.
  3. Attempting to create a third token will result in an error.
  4. If needed, you can revoke a token.

ℹ️

Why are swipe processor tokens necessary?

These tokens are used to ensure security when authorizing card transactions. When authorizing transactions, your swipe processor token is used to create a HMAC-SHA-512 hash, securing each transaction. This topic is covered in more detail later when authorizing test transactions.

Generate a new token

Send the following request to generate a new token:

curl --request GET \
     --url https://securepayments.loanpro.io/api/v2/swipe-processor/new-secret \
     --header 'Authorization: {token}' \
     --header 'Secret: {secret}' \

A successful response returns the token:

{
  "secret": "ffaaa26ddaf7a4ad313766e56b479d8..."
}

View the API Reference to learn more ↗

Make sure to store this token once it has been generated. It will be referenced later when testing card transactions.