Integrating with the API


Endpoint Information:

Flow On The Customer's Device

Flow On The Merchant's Device (in-store only)

API Details


What do I need in order to finish this step?

You would need to provide a Private API key provided by ChargeAfter for this step to work.

The ChargeAfter's omnichannel API as described should be invoked on the serverside (Server to Server).

The call should include:

  • Customer information (required)
  • Cart information (only for the checkout flow)


curl \
    -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer private-api-key' \
    -d '{
    channel: "call_center", //"in_store", "e_commerce"
    flow: "apply", // or "checkout"
    storeId: "", // Optional store id
    posType: "", // Optional POS type: "GenericConsumerDevice", "GenericMerchantDevice", "SelfServiceTerminal"
    posId: "", // Optional POS identifier
    consumerDetails: { 
        firstName: "John", 
        lastName: "Doe",
        email: "[email protected]",  
        mobilePhoneNumber: "2124445555", 
        merchantConsumerId: "merchant-internal-consumer-id",
        shippingAddress: {
            line1: "3 My Street",
            line2: "My Building, 4th floor",
            city: "New York",
            zipCode: "10019",
            state: "NY"
        billingAddress: {
            line1: "3 My Street",
            line2: "My Building, 4th floor",
            city: "New York",
            zipCode: "10019",
            state: "NY"
    createCharge: false, // Optional, if true will create a Charge on approval
    sendUsing: "email", // send an email (from ChargeAfter domain) with a link to launch the experience
      // "redirectUrl" - return a link to launch the experience (Merchant is responsible to send)
      // "scriptUrl" - return a script the opens the experience (to be directly loaded into the browser)
    // Required if flow == "checkout"
    cartDetails: {
        items: [
                name: "Awesome Product",
                price: 1999.0,
                sku: "AWSMPRDCT",
                quantity: 2,
                leasable: true,
                productCategory: "Product category",
                warranty: {
                    name: "Awesome Warranty",
                    price: 100.0,
                    sku: "AWSMWRNTY"
        discounts: [
                name: "Birthday discount",
                amount: 20
//If no discount amount then should not be added to the cartDetails.
        taxAmount: 199.0,
        shippingAmount: 19.0,
        totalAmount: 4296.0
    merchantOrderId: "", // Optional field for merchant use,
    correlationId: "", // Optional id. is reflected in responses and postbacks 
    requestedLoanAmount: 300, // optional field to suggest a desired loan amount
    tags: {}, // Optional key-value object. Each tag has a name and optional primitive value.
      // Tags are reflected in responses and postbacks, used in rules and analytics
    finalPostbackURL: "", // Required for checkout flow, optional for apply
    dataUpdatePostbackURL: "", // Optional
    postbackAuthKey: "<UUID>", // A bearer authentication key that will be passed in postback calls
    redirectOnSuccessURL: "", // merchant page to show if financing was approved
    redirectOnFailureURL: "", // merchant page to show if financing was declined

The Consumer Details Object
The Cart Details Object

Details on the Postback URLs can be found in the next sections.


	success: "true",
  tags: {}, // as specified in the request
  correlationId: "", // as specified in the request
  statusTrackingId: "<UUID>"