KIBO OMS DOCUMENTATION

Create Order Authorize

The Create Order Authorize API will reach out to the payment gateway that Kibo OMS is integrated with and create an authorization token for the payment information. That token will then need to be passed through the Create Order request as the “Authorization ID” parameter. Therefore, this call should be made before Create Order or other processing APIs.

Version2.0
Callhttps://integration.shopatron.com/api/v2/createOrder/authorize
Supported FormatsJSON
HTTP MethodPOST
Schemahttps://integration.shopatron.com/api/v2/schema/createOrder/authorize.json

The .json address above can be used to access the schema within Postman. An example use of the Create Order Authorize API follows here — or go directly to the schema or the sample Postman Collection.

Example

The example case creates an API call to authorize a payment that has the following properties:

  • External Cart ID 0123456
  • USD Credit Card payment

This guide will demonstrate how to put together each section of the request to build this order.

Required Parameters

TheseĀ parametersĀ are necessary for the Create Order API to return a successful response:

ParameterTypeDescription
externalCardIDstringThe cart identifier from a third party. The minimum length is 1 and the maximum length is 255.
manufacturerIDintegerA unique identifier for a manufacturer. The minimum value is "1".
catalogIDintegerThe catalog number for the manufacturer. The minimum value is "0".
currencyenumAn International Standards Organization Code for the order’s currency (USD, CAD, etc.).
paymentMethodobjectThe payment method of the order. See the schema for all possible structures.
amountnumberThe payment amount to authorize. The minimum value is "0".
customerobjectThe customer who is purchasing the order.

Optional Parameters

There are a few other optional parameters that can be included if needed:

ParameterTypeDescription
localeenumAn Internet Engineering Task Force code identifying the location and language of the order. The default is "en-US".
testOrderbooleanWhether this should be treated as a test order. The default is "false".
shippingAddressobjectThe address for the order when it is shipped. See the schema for the complete structure.

Customer

These are the possible parameters available to create the Customer object. Only firstName, lastName, email, and phone1 are required.

ParameterTypeDescription
customerIDstringA unique identifier for the customer, usually an integer. The minimum length is 1.
firstNamestringThe first name of the customer. The minimum length is 1 and the maximum length is 300.
lastNamestringThe last name of the customer. The minimum length is 1 and the maximum length is 300.
emailstringThe email address of the customer. The minimum length is 1 and the maximum length is 250.
phone1stringThe phone number of the customer. The minimum length is 1 and the maximum length is 20.
phone2stringThe secondary phone number of the customer. The maximum length is 20.
accountCreatedstringThe date that the customer’s account was created. Supports date-time format.
activeenumWhether a customer’s account is active (ACTIVE), inactive (INACTIVE), or frozen (FROZEN).
customDataarrayThe custom information for the customer.

This example demonstrates the Customer object that will be used in the authorize request.

"customer": {
    "firstName": "John",
    "lastName": "Smith",
    "email": "John.Smith@kibocommerce.com",
    "password": null,
    "phone1": "4691111111",
    "active": null,
    "accountCreated": null
  },

 

Payment Method

The Payment Method must be one of eleven options. This example only shows how to use one option (a standard credit card payment), so see the schema for descriptions of the other ten possibilities such as gift cards, PayPal, and so forth.

"paymentMethod": {
  "billingAddress": {
    "firstName": "John",
    "lastName": "Smith",
    "addressLine1": "111 Example St",
    "phone": "4691111111",
    "city": "San Luis Obispo",
    "state": "CA",
    "postalCode": "93401",
    "countryCode": "US",
    "latitude": null,
    "longitude": null,
    "company": null
  },
  "paymentType": "CC",
  "cardIssuer": "VI",
  "noOperationType": null,
  "cardNumber": "4111111111111111",
  "cardExpiration": "10-2019",
  "cardSecurityCode": "123",
  "payPalToken": null,
  "payPalPayerID": null,
  "paymentMethodToken": null,
  "authToken": null,
  "ccLastFour": null,
  "cardToken": null,
  "creditPlan": null,
  "creditPlanType": null,
  "retailerRef": null,
  "financeCode": null,
  "paymentMethodID": null
},

The Full Request

This is the entire request that will authorize order creation.

{
  "externalCartID": "0123456",
  "manufacturerID": 01010,
  "catalogID": 0,
  "currency": "USD",
  "locale": "en-US",
  "customer": {
    "firstName": "John",
    "lastName": "Smith",
    "email": "John.Smith@kibocommerce.com",
    "password": null,
    "phone1": "4691111111",
    "active": null,
    "accountCreated": null
  },
  "paymentMethod": {
    "billingAddress": {
      "firstName": "John",
      "lastName": "Smith",
      "addressLine1": "111 Example St",
      "phone": "4691111111",
      "city": "San Luis Obispo",
      "state": "CA",
      "postalCode": "93401",
      "countryCode": "US",
      "latitude": null,
      "longitude": null,
      "company": null
    },
    "paymentType": "CC",
    "cardIssuer": "VI",
    "noOperationType": null,
    "cardNumber": "4111111111111111",
    "cardExpiration": "10-2019",
    "cardSecurityCode": "123",
    "payPalToken": null,
    "payPalPayerID": null,
    "paymentMethodToken": null,
    "authToken": null,
    "ccLastFour": null,
    "cardToken": null,
    "creditPlan": null,
    "creditPlanType": null,
    "retailerRef": null,
    "financeCode": null,
    "paymentMethodID": null
  },
  "amount": 2.00,
  "testOrder": true,
  "shippingAddress": {
    "addressID": null,
    "customerID": null,
    "firstName": "Alan",
    "lastName": "Gudiel",
    "addressLine1": "222 Test Example Dr",
    "phone": "97200000000",
    "city": "Petaluma",
    "state": "CA",
    "postalCode": "94954",
    "countryCode": "US",
    "fraudLock": null,
    "active": null,
    "latitude": null,
    "longitude": null,
    "company": null,
    "taxID": null,
    "isBilling": null,
    "isShipping": null
  }
}

 

The response will return the Order ID, Payment Method Token, and Auth Token. The authorization token is what should be used in the Create Order request.


Megan MayfieldOMS Dev: Create Order Authorize