Skip to main content

Finish cart flow and send SMS link

POST 

/api/v1/sdk/cart/store/:storeId/finish

This endpoint finalizes the cart and sends a secure checkout link to the customer's verified phone number via SMS.

Authentication: Requires customer authentication (JWT token with verified phone). Optional API key for additional store validation.

Behavior:

  • Validates cart has items and all items are available
    • Generates secure checkout URL
    • Sends SMS with checkout link to customer's phone
    • Returns the checkout URL for reference
    • Cart is locked during checkout process

Use Cases:

  • Completing assisted checkout flows
    • Sending payment links to customers
    • POS checkout initiation
    • Phone-based checkout workflows

Important Notes:

  • Customer must have a verified phone number
    • Cart must not be empty
    • All cart items must be in stock and available
    • SMS is sent immediately upon successful call
    • Checkout link expires after a set period (check store settings)

Error Scenarios:

  • 404 NOT FOUND - Store or cart not found (Error code: STORE_NOT_FOUND or CART_NOT_FOUND)
    • 400 BAD REQUEST - Empty cart, unverified phone, or items unavailable (Error code: EMPTY_CART, PHONE_NOT_VERIFIED, or ITEMS_UNAVAILABLE)
    • 401 UNAUTHORIZED - Customer not authenticated (Error code: UNAUTHORIZED)
    • 403 FORBIDDEN - API key doesn't have access to this store (Error code: NO_STORE_ACCESS)

Request​

Responses​

Checkout link sent successfully - returns the checkout URL