Create swipe

This request creates a swipe.

   Click here to learn more about this request

A swipe represents the transactions made with a card to draw on a line of credit account. LoanPro’s architecture requires that a swipe is associated with a card and a line of credit account to ensure that the requested funds are available for a transaction. Swipes are created within Secure Payments, and Secure Payments passes that information to LoanPro to update the line of credit account.

This request creates a Swipe. Note the following when using this request:

Creating a swipe requires a swipe_id. This field is commonly used to list an issuing processor's transaction ID to maintain continuity between their record and LoanPro's. If you'd like to test this request in your own environment by generating a random swipe ID, take a look at our sample script below.

Many fields within this request's payload are important for swipe authorizationthe process of determining whether a swipe should be accepted or not. Check the payload parameter descriptions to see which fields are important for authorization.

Other fields within this request's payload are important for swipe handlingthe process of determining swipe events, statuses, and the handling of funds. Check the payload parameter descriptions to see which fields are important for swipe handling.

Much of the information within this payload is purely informational for the card issuer. This payload is built to simplify the process of mapping values between different parties.

A swipe can be declined by Secure Payments in certain circumstances. When this happens, the swipe's information will not be sent through the card network. Declines from Secure Payments may occur if the card isn't valid; for example, transactions will be denied if they're made via a card with a status of anything other than active.

⚠️

Understanding the response.

As long as the endpoint and headers of the request are correct, then this request will return a 200 response. However, a 200 response does not indicate that the request was successful. The status field returned in the response will indicate whether or not the request was successful. You can find a list of successful statuses and their definition in our Swipes article.

However if a request failed, then the status field will return the following values:

  • 208: Duplicated request
  • 400: Invalid input exception
  • 500: Unexpected exception

🗝️

This request uses a special set of headers.

Here's a breakdown of what they mean:

  • x-user-id : This is an ID associated with your Secure Payments account. You can also locate this value by logging in to your Secure Payments account and navigate to the Profile tab located within the Settings section.
  • x-signature : This header uses the swipe processor token from your account to create an SHA512 hash signature.
  • x-request-id : This is a randomly generated GUID that represents the request to create a swipe.

🚀

Testing this request yourself in a Postman workspace?

We've written a Pre-request Script to help you get this request working in your own workspace:

// Generate and set variables used in the headers and payload of the request:
let uuid = require('uuid');
pm.collectionVariables.set('swipe-id', uuid.v4());

const message = pm.request.body.raw.replace('{{swipe-id}}', pm.collectionVariables.get('swipe-id'))
.replace('{{card-uuid}}', pm.collectionVariables.get('card-uuid'));
var hashHmacSHA512 = CryptoJS.HmacSHA512(message, pm.collectionVariables.get('swipe-processor-token')).toString();
pm.collectionVariables.set('signature', hashHmacSHA512);

Copy the script above and paste it into the Pre-request Script text section of your request.

The script will automatically generate some of the headers you'll need for this request; however, it will require a little bit of work on your end. You'll need to set some collection-level variables that represent card-uuid, swipe-id, and swipe-processor-token to get this script to work.

Please note: the script above generates a randomized swipe-id which is a payload requirement. You can use a different method to generate a swipe-id if desired.


{
    "swipe-id": "e39ed072-3ebd-4e21-bd18-4adf4f67f5e3",
    "card-uuid": "54e7a88f-5c8b-464b-abc5-fe9f20d7a436",
    "amount": 24.97,
    "merchant-name": "Target",
    "merchant-descriptor": "Target #9960",
    "merchant-mcc": 5411,
    "merchant-requested-amount": 24.97,
    "merchant-currency": "USD",
    "merchant-rate": 1.00,
    "merchant-longitude": -111.8560587,
    "merchant-latitude": 40.722187,
    "merchant-postal-code": "84106",
    "merchant-address": "2236 S 1300 E Ste D",
    "merchant-city": "Salt Lake City",
    "merchant-state": "UT",
    "merchant-country": "USA",
    "network-merchant-id": "12sdf12fd",
    "network-risk-score": 1.00,
    "authorization-tolerance": 1.00,
    "transaction-fee-amount": 0.24,
    "ecommerce": "false",
    "card-present?": true,
    "cardholder-verified?": "Yes",
    "cardholder-verification-method": "CVV2",
    "cvv1": "None",
    "cvv2": "Validated",
    "cvv3": "None",
    "arqc": "Validated",
    "pin": "None",
    "offline-pin": "None",
    "3ds": "None",
    "avs-result": "Passed",
    "acq-method": "EMV Terminal",
    "emv-terminal": "True",
    "network": "Visa",
    "network-tx-id": "456df456fd",
    "issuer-decline-reason": "None",
    "issuer-transaction-id": "4455",
    "issuer-decline?": false,
    "authorization-advice?": false,
    "preauthorization?": false,
    "force-clearing?": false,
    "cash-advance?": false,
    "credit-authorization?": false,
    "sma?": false,
    "preferred-date": "2025-07-17",
    "metadata": "Some metadata"
}
{
    "swipe-id": "e39ed072-3ebd-4e21-bd18-4adf4f67f5e3",
    "card-uuid": "54e7a88f-5c8b-464b-abc5-fe9f20d7a436",
    "amount": 24.97
}

Results

Returns a status, swipe object, and card object after a successful swipe creation. If a swipe status is declined, it will include a reason. A 200 response can be an error with a status and error_v2 object indicating the type of error (e.g. invalid card-uuid or invalid x-user-id).

Body Params
string
required

The unique identifier of a swipe. If desired, the ID from an issuing processor can be used here. For testing purposes, you can generate a random swipe ID via the script listed above.
> This field is important for swipe authorization.

string
required

The unique identifier of the card used to initiate the swipe.
> This field is important for swipe authorization.

float
required

The dollar amount of the swipe.
> This field is important for swipe authorization.

string

The name of the merchant.
> This field is important for swipe authorization.

string

The descriptor of the merchant. This is typically the name of the merchant and an additional piece of information such as a location number, phone number, zip code, etc.
> This field is important for swipe authorization.

int32

The Merchant Category Code (MCC). This is a four-digit ID that represents the business category in which the merchant falls.
> This field is important for swipe authorization.

float

The amount requested by the merchant. This value may differ from the swipe amount.
> This field is important for swipe authorization.

string

The currency of the transaction, as requested by the merchant.
> This field is important for swipe authorization.

float

A fee charged to the merchant for processing a transaction in the form of a percentage.
> This field is important for swipe authorization.

float

The longitudinal location of the merchant.
> This field is important for swipe authorization.

float

The latitudinal location of the merchant.
> This field is important for swipe authorization.

string

The zip or postal code in which the merchant is located.
> This field is important for swipe authorization.

string

The street address of the merchant.
> This field is important for swipe authorization.

string

The city in which the merchant is located.
> This field is important for swipe authorization.

string

The state in which the merchant is located. This field requires a two-letter state abbreviation.
> This field is important for swipe authorization.

string

The country in which the merchant is located.
> This field is important for swipe authorization.

string

Merchant IDs are often passed through with a transaction. This field is used to capture that information.

float

A score assigned to the transaction that rates the riskiness of a transaction.

float

Used to track upcharge amounts that are added to the transaction.

float

The dollar amount of the transaction fee charged on the swipe.

string

Determines whether the transaction was categorized as e-commerce.

string

Determines whether the card was present physically during the swipe.

string

Determines whether the cardholder was verified during the swipe.

string

The method in which the cardholder was verified during the swipe.

string

Displays whether CCV1 was the chosen method of cardholder verification.

string

Displays whether CCV2 was the chosen method of cardholder verification.

string

Displays whether CCV3 was the chosen method of cardholder verification.

string

The Authorization Request Cryptogram (ARQC) of the transaction. This value is informational, and it is generated before reaching Secure Payments.

string

Displays whether a PIN was the chosen method of cardholder verification.

string

Displays whether an offline PIN was the chosen method of cardholder verification.

string

Displays whether 3D Secure was the chosen method of cardholder verification.

string

The result of the Address Verification Service (AVS) used on the swipe.

string

The acquisition method of the transaction. This is information regarding how the swipe was made.

string

Displays whether the swipe was initiated at a Europay, MasterCard, and Visa (EMV) terminal.

string

The card network that was used to initiate the swipe.

string

The ID that's assigned to the transaction by the network.

string

The reason, if applicable, for declining the transaction as made by the issuer.

string

The ID that's assigned to the transaction by the issuer.

boolean

Determines whether the issuer declined the transaction.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether authorization advice was provided with the transaction.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether the transaction received pre-authorization.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether the merchant forced the clearing of the transaction.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether the transaction was a cash advance.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether the transaction included a return. This event occurs when goods are returned to the merchant and a separate transaction is made to send funds back to the borrower.
> This field is important for swipe handling, and it will affect the status and handling of funds.

boolean

Determines whether Single Message Authorization (SMA) was used on the transaction.
> This field is important for swipe handling, and it will affect the status and handling of funds.

string

Metadata regarding the swipe.

date

Allows you to select a preferred date on which the transaction applies to an associated line of credit account. See Using preferred application dates for more information.
> Formatted as YYYY-MM-DD

string

The ID of the settlement institution.

string

The ID of the acquiring institution.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain