Quickstart
Getting started
Start the flow
Link a merchant account
Add a product to a cart
Call Sync Cart to add a product to a cart using the product.external_id
. To be notified when a product is successfully added to a cart and to receive cart information, listen to the SYNC_CART_SUCCEEDED
webhook.
Additionally, should a user choose to update their delivery address or the fulfillment preference for a given product after initially adding a product to the cart, call Sync Cart again with a new delivery_location
or fulfillment.id
to sync the cart with the user’s preferences and receive fresh information regarding the cart, including the price.total
.
Checkout
Call Checkout to checkout a cart. To be notified when a checkout process is successful, listen to the CHECKOUT_SUCCEEDED
webhook, which will include an array of transactions by Id
created by the checkout.
Get order confirmation details
When you receive the CHECKOUT_SUCCEEDED
webhook, call Get Transaction By Id for each transaction you receive (using the transaction.id
) to retrieve transaction information and subsequently enrich an order confirmation.
Handle disconnected merchant accounts
If for example a user changes their password to a merchant account, the connection.status
in Get Merchant Accounts will be returned as disconnected
and you will not be able to make any successful requests to Sync Cart or Checkout until the user’s merchant account is reconnected. In this case, you’ll want to display a UX in your app to allow users to reconnect their account. For example, you may choose to display a button that says “Reconnect” or similarly allow the user to invoke the SDK to reconnect their account.