Purchase - When Swiping a Card (Track Data)

Process a payment with a swiped credit/debit card (requires track data)


📘

Note:

To simplify your development and have consistency across the various Purchase requests - all Purchase API calls can also be reached at the following endpoint with any combination of the required Purchase... parameters :

https://<<test_api_url>>/v3/payment/sale/

Parameters

The following parameters are available to process a swiped credit/debit card using track data.

parameterdescriptionrequired

mid

the Merchant ID (MID) assigned by QorCommerce or your merchant service provider (MSP)

Yes

topt

Type Of Payment Transaction - set a value to simply tag and/or route a transaction to a pre-defined provider.

No

reference_id

A reference id that will be echo'd back in the message response.

No

amount

the total amount to process

Yes

service_charge

the amount of the total sum of this transaction that is made up of the service_charge

No

trackdata

the string returned from the card reader after swipe

Yes

ksnTrack

ksn used to encrypt the track data

Yes if track data is encrypted

currency

The currency to process. Defaults to 'USD' if no value provided

No

invoiceid

the merchant invoice id associated with the sale

No

orderid

unique merchant order tracking number

Yes

ipaddress

The IP address of the client or server sending the request

No

cfirstname

the customer first name

No

clastname

the customer last name

No

cemail

the customer email address

No

cphone

the customer phone number

No

risk_score

risk score associated to this transaction (

*

if you are using a risk prevention system)

No

store_card

if true will store card in the QorCommerce Secure Vault and return a card token

No

metadata

a set of key-value pairs that you can attach to a payment. This can be useful for storing additional information about the payment in a structured format.

No

JSON Example

The following JSON example provides test values to process a swiped card. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
    "mid": "887728202",
    "amount": "1.5",
    "trackdata":"%B5544044490909090^SMITH/JOHN%20A^1904101084730001000000850000000?;5544044490909090=19041010847385000001?",
    "currency": "USD",
    "orderid": "193383",
    "invoiceid": "INV-123332",
    "ipaddress": "0.0.0.0",
    "cfirstname": "Russell",
    "clastname": "Hanneman",
    "cemail": "[email protected]",
    "cphone": "1-344-877-8928",
    "cwebaddress": "example.com",
    "store_card": 0
}

Store Card Option

You can store the credit card information derived from the track data in the QorCommerce Secure Vault by setting the store_card parameter to true. The response will provide a token value representing the credit card that you can associate with your customer and/or a contract to use for payment in place of credit card data when needed.

JSON Example

The following JSON example provides test values to process a swiped card. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
  "transaction_data": {
    "mid": "887728203",
    "amount": "1.5", "trackdata":"%B5544044490909090^SMITH/JOHN%20A^1904101084730001000000850000000?;5544044490909090=19041010847385000001?",
    "currency": "USD",
    "invoiceid": "INV-123332",
    "orderid": "193383",
    "ipaddress": "0.0.0.0",
    "cfirstname": "Russell",
    "clastname": "Hanneman",
    "cemail": "[email protected]",
    "cphone": "1-344-877-8928",
    "cwebaddress": "example.com",
    "store_card": 1
  }
}

Response Codes

Language
Click Try It! to start a request and see the response here!