Authorize a transaction in a mobile app

Before you start a sale transaction in mobile app using the mobile transaction API endpoint, make sure you have the following:

API key issued by Xplor Pay.

Mobile JSON Web Token (mobilejwt) returned by the successfulTransactionToken method using the JavaScript SDK integration.

To create a multi-use or durable card token (id)when authorizing a transaction in mobile app:

  1. Add the create-token field with a value of true to the request body when calling the mobile transaction API endpoint to authorize a transaction in mobile app.

{
   "type": "AUTH",
   "amount": "0.00",
   "create-token": "true"
   "software-type": "My Cool Software"
   "software-type-version": "1.0",
     "billing":
    {
      "zip": "85284"
    }
}
  1. Use the POST method to call the rest/v2/mobile/transactions/auth endpoint.

The API returns the following response:

{
    "code": "200",
    "status": "success",
    "exchange-id": "ID-clearent-mobile-jwt-1-e4795490-49d8-4302-b2c6-fc46ea001bc9",
    "links": [
        {
            "rel": "transaction",
            "href": "/rest/v2/transactions?id=118810621",
            "id": "118810621"
        },
        {
            "rel": "token",
            "href": "/rest/v2/tokens/1100000900023211111",
            "id": "1100000900023211111"
        }
    ],
    "payload": {
        "transaction": {
            "amount": "15.55",
            "id": "118810621",
            "created": "2025-05-08 18:56:50.930",
            "type": "SALE",
            "result": "APPROVED",
            "card": "XXXXXXXXXXXX1111",
            "authorization-code": "TAS475",
            "batch-string-id": "63",
            "display-message": "Transaction approved",
            "result-code": "000",
            "exp-date": "1229",
            "software-type": "Sally's Seashell Shore Software",
            "card-type": "VISA",
            "last-four": "1111",
            "merchant-id": "YOUR MID",
            "terminal-id": "10011111",
            "create-token": true
        },
        "payloadType": "transaction"
    }
}

The API response includes links array with the following fields:

Name
Data type
Description

rel

String

Indicates the type of resource the link refers to.

Common values are:

  • transaction

  • token

href

String (URI)

The relative URI to access the card token.

id

String

The unique multi-use or durable card token ID.

See Authorize a transaction endpoint response for more information.

Last updated

Was this helpful?