Transaction Examples

Sale

Transactions requests to Clearent’s EMV cloud are similar to transaction requests to our standard Clearent API. The difference is that no card data is sent to Clearent’s EMV cloud API; the credit card terminal will prompt the user for the card when it receives a transaction request from the Clearent EMV cloud.

For JSON requests/response use Content-Type and Accept header of application/json
For XML requests/response use Content-Type and Accept header of application/xml

Headers:

          api-key: [your api key]
          Content-Type: application/json
          Accept: application/json

Make a POST request to Clearent EMV Cloud API:

          https://gateway-sb.clearent.net/rest/v2/terminal/transactions

Body (JSON or XML):

JSON

XML

Response:

JSON

XML

Sale with Create Token

You can run a sale request to your terminal and get a card token back that can be stored on your side and used for future transacations.

Headers:

          api-key: [your api key]
          Content-Type: application/json
          Accept: application/json

Make a POST request to Clearent EMV Cloud API:

          https://gateway-sb.clearent.net/rest/v2/terminal/transactions

Body (JSON or XML):

JSON

XML

Response:

JSON

XML

Declined Sale Transaction

If the transaction is declined you will receive a declined response. All Clearent responses include an exchange-id response field that can be used to troubleshoot issues.

Response:

JSON

XML

Using the Clearent Transaction API endpoint:

          https://gateway-sb.clearent.net/rest/v2/transactions

You can use the id from the sale response to

  • query transaction information
  • perform refunds
  • perform voids

You can use the token from the sale with create token response to

  • perform future sale requests with the token
  • perform unmatched refunds with the token