Integrating with the API

👍

Endpoint Information:

https://api-sandbox.ca-dev.co/v2/omnichannel/send-link

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)

Request

curl https://api-sandbox.ca-dev.co/v2/omnichannel/send-link \
    -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer private-api-key' \
    -d '{
   
    channel: "call_center", //"in_store"
    flow: "apply", // or "checkout"
    
    // only required for in-store use-case
    idVerificationEvidence: {
      idType: "driversLicense", // or: "federal", "state issued"
      idExpiry: "1994-11-05",
      cardIssuer: "JP Morgan",
      cardExpiry: "01/31"
    },
      
    // Required if runFlowOnCustomersDevice is true 
    consumerDetails: { 
        firstName: "John", 
        lastName: "Doe",
        email: "[email protected]", // required if runFlowOnCustomersDevice is true 
        mobilePhoneNumber: "2124445555",// required if runFlowOnCustomersDevice is true 
        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"
        }
    },
    // Required if runFlowOnCustomersDevice is true
    sendUsing: "email"
    
    // 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
    
    finalPostbackURL: "https://yourFinalPostBackURL.com", // Required for checkout flow, optional for apply
    dataUpdatePostbackURL: "https://yourDataUpdatePostBackURL.com", // Optional
    postbackAuthKey: "<UUID>" // A bearer authentication key that will be passed in postback calls
}

The Consumer Details Object
The Cart Details Object

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

Response:

{
    success: "true",
    statusTrackingId: "<UUID>"
}

Did this page help you?