Skip to main content
Kibo supports many payment types, which shoppers can use to provide payments for their orders. This guide is designed to assist in building the payloads to support creating these payments. Every payment is described by a BillingInfo object. The paymentType field selects the kind of payment, and a type-specific sub-object (such as card, check, or purchaseOrder) carries the details for that type. For where these objects appear in a request and the actions you can perform against a payment, see Payment Actions and the Commerce/OMS API Developer Guide.

Supported Payment Types

The paymentType field accepts one of the following string values. Values are case-sensitive and must be sent exactly as shown.
paymentType valueDescription
CreditCardCredit or debit card payment, typically tokenized by a payment gateway.
CheckCheck by mail.
StoreCreditStore credit or loyalty credit applied to the order.
PaypalExpressPayPal Express checkout, using a redirect flow.
PurchaseOrderB2B purchase order drawn against a customer credit limit.
GiftCardGift card processed through a payment gateway.
TokenTokenized payment from a digital wallet or third-party provider (for example, Apple Pay).
Each payment type must also be enabled and assigned to a gateway for the site before it can be used. See Payment Types for the admin configuration steps.

The BillingInfo Wrapper

BillingInfo is the outer object that wraps every payment. The fields below apply to all payment types; the type-specific sub-objects are described in the sections that follow.
FieldTypeDescription
paymentTypestringOne of the supported payment type values. Required.
paymentWorkflowstringThe workflow that processes the payment. Use "Mozu" for the default Kibo gateway flow; other built-in values include "VisaCheckout" and "PayPalExpress". A custom payment extension supplies its own workflow name.
billingContactobjectThe billing name, address, and contact details. See billingContact.
isSameBillingShippingAddressbooleanIndicates that the billing and shipping addresses are the same.
isRecurringbooleanIndicates that the payment is used in recurring transactions, such as subscription payments.
cardobjectCard details. Present only when paymentType is CreditCard. See CreditCard.
checkobjectCheck details. Present only when paymentType is Check. See Check.
tokenobjectToken details. Present only when paymentType is Token. See Token.
purchaseOrderobjectPurchase order details. Present only when paymentType is PurchaseOrder. See PurchaseOrder.
storeCreditCodestringThe store credit code to apply. Used when paymentType is StoreCredit. See StoreCredit.
storeCreditTypestringThe type of store credit applied. Used with StoreCredit.
customCreditTypestringThe name of a custom stored credit type, when applicable.
externalTransactionIdstringA transaction ID from a third-party payment source, such as Visa Checkout or Amazon Pay.
dataobjectCustom data passed through from payment providers.
Raw card numbers are never sent to Kibo. Card payments reference a tokenized card ID returned by the payment gateway. See CreditCard for details.

The billingContact Object

billingContact carries the payer’s name and billing address. It is shared by all payment types.
{
  "firstName": "Jane",
  "lastNameOrSurname": "Shopper",
  "email": "jane.shopper@example.com",
  "companyOrOrganization": "Example Co.",
  "phoneNumbers": {
    "home": "555-0100",
    "mobile": "555-0101",
    "work": "555-0102"
  },
  "address": {
    "address1": "123 Market Street",
    "address2": "Suite 400",
    "cityOrTown": "Austin",
    "stateOrProvince": "TX",
    "postalOrZipCode": "78701",
    "countryCode": "US",
    "addressType": "Commercial"
  }
}

Per-Type Request Formats

Each section below shows the type-specific sub-object schema and a complete BillingInfo example payload. The billingContact is abbreviated as { ... } in the examples; populate it as shown in The billingContact Object.

CreditCard

Card payments use the card sub-object. The card is tokenized by the payment gateway, so paymentServiceCardId holds the gateway card token rather than a raw card number.
FieldTypeDescription
paymentOrCardTypestringCard type, such as Visa, MasterCard, AmericanExpress, or Discover.
paymentServiceCardIdstringThe tokenized card ID returned by the payment gateway.
nameOnCardstringCardholder’s name as it appears on the card.
cardNumberPartOrMaskstringThe visible portion of the card number, for example the last four digits.
binstringThe card’s bank identification number (the leading digits).
expireMonthintegerMonth the card expires.
expireYearintegerYear the card expires.
isTokenizedbooleantrue when the card has been tokenized by an external provider.
isCardInfoSavedbooleantrue when the card is stored in the customer’s account.
ccLastFourstringLast four digits of the card. Used only for OMS-only tenants.
{
  "paymentType": "CreditCard",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... },
  "card": {
    "paymentOrCardType": "Visa",
    "paymentServiceCardId": "f3a9c2e84b7d4e1a9c0f5b6d7e8a1234",
    "nameOnCard": "Jane Shopper",
    "cardNumberPartOrMask": "1111",
    "bin": "411111",
    "expireMonth": 12,
    "expireYear": 2030,
    "isTokenized": true,
    "isCardInfoSaved": false,
    "ccLastFour": "1111"
  }
}

Check

Check by mail uses the check sub-object.
FieldTypeDescription
checkNumberstringThe check number.
{
  "paymentType": "Check",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... },
  "check": {
    "checkNumber": "10042"
  }
}

StoreCredit

Store credit is applied with the storeCreditCode and storeCreditType fields on BillingInfo directly. There is no nested sub-object.
FieldTypeDescription
storeCreditCodestringThe store credit code to apply to the order.
storeCreditTypestringThe type of store credit, for example StoreCredit.
customCreditTypestringThe name of a custom stored credit type, when applicable.
{
  "paymentType": "StoreCredit",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... },
  "storeCreditCode": "SC-ABC12345",
  "storeCreditType": "StoreCredit",
  "customCreditType": null
}

PurchaseOrder

B2B purchase orders use the purchaseOrder sub-object. The purchase order is authorized against the customer account’s configured credit limit, so the payment method must be enabled on both the site and the individual customer account.
FieldTypeDescription
purchaseOrderNumberstringThe purchase order number.
paymentTermobjectThe selected payment term. Contains code and description.
customFieldsarrayMemo or custom fields. Each entry contains code, label, and value.
{
  "paymentType": "PurchaseOrder",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... },
  "purchaseOrder": {
    "purchaseOrderNumber": "PO-00123",
    "paymentTerm": {
      "code": "net30",
      "description": "Net 30"
    },
    "customFields": [
      {
        "code": "department",
        "label": "Department",
        "value": "Finance"
      }
    ]
  }
}

GiftCard

Gift cards are processed through a payment gateway. The BillingInfo sets paymentType to GiftCard, and the gateway gift card details are supplied through the payment’s gatewayGiftCard object. The gatewayGiftCard object has these fields:
FieldTypeDescription
cardNumberstringThe gift card number.
cardPinstringThe gift card PIN.
amountnumberThe amount to draw from the gift card.
currencyCodestringISO currency code for the transaction.
idstringIdentifier for the gift card record.
{
  "paymentType": "GiftCard",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... }
}
The associated gatewayGiftCard on the payment:
{
  "cardNumber": "6006491234567890",
  "cardPin": "1234",
  "amount": 25.00,
  "currencyCode": "USD"
}
Gift card behavior, including whether refunds and credits are issued to the existing card or a new one, is configured per site. See Gateway Gift Cards.

Token

Digital wallet and third-party tokenized payments (for example, Apple Pay) use the token sub-object.
FieldTypeDescription
paymentServiceTokenIdstringThe token returned by the payment provider.
typestringThe token type or source, for example ApplePay.
{
  "paymentType": "Token",
  "paymentWorkflow": "Mozu",
  "billingContact": { ... },
  "token": {
    "paymentServiceTokenId": "tok_9c0f5b6d7e8a1234",
    "type": "ApplePay"
  }
}
For some third-party sources, the transaction ID is carried on BillingInfo.externalTransactionId (for example, Visa Checkout or Amazon Pay) rather than in the token object.

PaypalExpress

PayPal Express uses a redirect flow rather than a sub-object on BillingInfo. The BillingInfo sets paymentType to PaypalExpress, and the redirect URLs are supplied on the payment action through returnUrl and cancelUrl. The billingContact is typically populated after PayPal redirects the shopper back to your site.
{
  "actionName": "CreatePayment",
  "amount": 99.99,
  "returnUrl": "https://t1000000.sb.usc1.gcp.kibocommerce.com/checkout/paypal/return",
  "cancelUrl": "https://t1000000.sb.usc1.gcp.kibocommerce.com/checkout/paypal/cancel",
  "newBillingInfo": {
    "paymentType": "PaypalExpress",
    "paymentWorkflow": "PayPalExpress"
  }
}

Where BillingInfo Appears in a Request

BillingInfo is submitted in a few different places depending on the operation:
  • Applying a payment to an order or checkout: wrapped in a PaymentAction as newBillingInfo, alongside the actionName and amount. See Payment Actions.
  • Importing a completed order: included on each entry of the order’s payments array and on the order’s billingInfo. See the Commerce/OMS API Developer Guide.
The actionName field on a payment action accepts one of these values: CreatePayment, AuthorizePayment, AuthAndCapture, CapturePayment, CreditPayment, DeclinePayment, RequestCheck, VoidPayment, Rollback, and AcknowledgeError. To create and authorize a new payment from a BillingInfo, use CreatePayment. A minimal payment action that applies a credit card payment looks like this:
{
  "actionName": "CreatePayment",
  "amount": 99.99,
  "currencyCode": "USD",
  "newBillingInfo": {
    "paymentType": "CreditCard",
    "paymentWorkflow": "Mozu",
    "billingContact": { ... },
    "card": {
      "paymentOrCardType": "Visa",
      "paymentServiceCardId": "f3a9c2e84b7d4e1a9c0f5b6d7e8a1234",
      "nameOnCard": "Jane Shopper",
      "cardNumberPartOrMask": "1111",
      "expireMonth": 12,
      "expireYear": 2030,
      "isTokenized": true
    }
  }
}