Purchase - Use a Payment Token

Process a sale with a card token


📘

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/

QorCommerce provides a Secure Vault that will encrypt and store card numbers and return a token you can store with the client and/or a contract to use for future payments.

Card Tokens can be created from card data or track data during a sale or authorize transaction by providing the required card data and store_card == true parameter in the request.

You can also create a card token using the Payment Tokens (tokenization)

To use a card token for a sale, you simply pass the token as a creditcard value in the request using this endpoint.

Parameters

The following parameters are available to process a card token sale.

parameterdescriptionrequired
midthe merchant id assigned by QorCommerce or your merchant service provider (MSP)Yes
toptType Of Payment Transaction - set a value to simply tag and/or route a transaction to a pre-defined provider.No
reference_idA reference id that will be echo'd back in the message response.No
amountthe total amount to processYes
service_chargethe amount of the total sum of this transaction that is made up of the service_chargeNo
creditcardthe card tokenYes
cvvsupply the card validation value of the tokenized card for security purposesYes
currencyThe currency to process. Defaults to USD if no value providedNo
invoiceidthe merchant invoice id associated with the saleNo
orderidunique merchant order numberYes
ipaddressThe IP address of the client or server sending the requestNo
cfirstnamethe customers first nameNo
clastnamethe customers last nameNo
cemailthe customers email addressNo
cphonethe customers phone numberNo
risk_scorerisk score associated to this transaction (*if you are using a risk prevention system)No
metadataa 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 sale using a token. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
  "transaction_data": {   
		"mid": "887728202",
    "amount": "1.5",
    "creditcard": "909055$asoCdcdt",
    "cvv": "999",
    "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"
  }
}

Response Codes

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