formatting orders from native mobile apps

Mobile App Orders

The request payload below outlines how a mobile App order should be structured.

Formatting Mobile App Orders

For orders that originate from a native mobile app, the connectionInformation object OMITS the forterTokenCookie field and instead populates the forterMobileUID field with a unique identifier and optional fields like:

  • mobileAppVersion
  • mobileOSType
  • mobileDeviceBrand
  • mobileDeviceModel
    are also populated

The orderType field should be populated with an enum of "MOBILE", "iOS", or "ANDROID" depending on the type of mobile app.

📘

Mobile App vs Mobile Web Orders

Mobile Web orders or mobile App orders that use a webview at checkout should still populate the orderType as "WEB" and populate the forterTokenCookie field instead of the forterMobileUID field in the request.

Sample Request Body

{
  "orderId": "B12261933767",
  "orderType": "IOS",
  "authorizationStep": "PRE_AUTHORIZATION",
  "timeSentToForter": 1672177899353,
  "checkoutTime": 1672177899151,
  "connectionInformation": {
    "customerIP": "38.23.217.48",
    "userAgent": "demoApparelApp/22.37.7 (prod; 2211222839; iOS 16.1.2; iPhone14,2)",
    "forterTokenCookie": null,
    "forterMobileUID": "10EG-891C-4725-BC45-45B3EDF95315",
    "mobileAppVersion": "22.37.7",
    "mobileOSType": "iOS",
    "mobileDeviceBrand": "Apple",
    "mobileDeviceModel": "iPhone14,2"
  },
  "totalAmount": {
    "amountLocalCurrency": "120.73",
    "currency": "USD"
  },
  "cartItems": [
    {
      "basicItemData": {
        "name": "generic shoe",
        "quantity": 1,
        "type": "TANGIBLE",
        "price": {
          "amountLocalCurrency": "110.00",
          "currency": "USD"
        }
      }
    }
  ],
  "payment": [
    {
      "billingDetails": {
        "personalDetails": {
          "firstName": "John",
          "lastName": "Smith",
          "email": "[email protected]"
        },
        "address": {
          "address1": "92 Montgomery ln",
          "city": "Nashville",
          "country": "US",
          "zip": "37081",
          "region": "TN"
        },
        "phone": [
          {
            "phone": "2126129007"
          }
        ]
      },
      "tokenizedCard": {
        "lastFourDigits": "1111",
        "bin": "4111111",
        "cardBrand": "VISA",
        "cardType": "CREDIT",
        "countryOfIssuance": "US",
        "nameOnCard": "John Smith",
        "expirationMonth": "09",
        "expirationYear": "2025"
      },
      "amount": {
        "amountLocalCurrency": "120.73",
        "currency": "USD"
      },
    }
  ],
  "primaryDeliveryDetails": {
    "deliveryType": "PHYSICAL",
    "deliveryMethod": "Standard",
    "deliveryPrice": {
      "amountLocalCurrency": "0.00",
      "currency": "USD"
    },
    "expectedDeliveryDate": "2023-01-12",
  },
  "primaryRecipient": {
    "personalDetails": {
      "firstName": "John",
      "lastName": "Smith",
      "email": "[email protected]"
    },
    "address": {
      "address1": "92 Montgomery ln",
      "city": "Nashville",
      "country": "US",
      "zip": "37081",
      "region": "TN"
    },
    "phone": [
      {
        "phone": "2126129007"
      }
    ]
  },
  "accountOwner": {
    "firstName": "John",
    "lastName": "Smith",
    "email": "[email protected]",
    "accountId": "abc-86a7-83ebdd57ad5c",
    "created": 1652926635460
  },
  "customerAccountData": {
    "personalDetails": {
      "firstName": "John",
      "lastName": "Smith",
      "email": "[email protected]"
    }
  }
}