Lavanda Developer Docs
  • Welcome
  • Quickstart
    • Getting Started
    • Versioning
    • API Explorer
  • Concepts
    • Structure & Terms
    • Auth
    • Webhooks
    • API Paradigms
      • Connections
      • Pagination (Cursors)
      • Client Name Header
  • CRM
    • Leads
    • Contacts
    • Companies
    • Institutions
    • Offers
    • Subjects
  • Bookings
    • Bookings
  • Spaces & Inventory
    • Buildings
    • Unit Types
    • Units
  • Availability
    • Availability
  • Pricing
    • Pricing
    • Product
  • Ecommerce
    • Flow
    • Search
    • Checkout
  • Guest Messaging
    • General
  • Finance & Accounting
    • Invoices
    • Payments
  • Tickets
    • Tickets
    • Tasks
    • Charges
  • Users
    • Queries
      • whoami
    • Mutations
  • Legacy
    • README
    • Auth
    • Create Lead
    • Legacy Azure API
Powered by GitBook
On this page
  1. Ecommerce

Checkout

When placing a booking. It is often required to take some form of upfront payment.

To do this, you can utilise our eCommerce checkout API to create a checkout url to direct the user to, and once they have paid, can be brought back to your purchase flow to complete the booking.

This return will include a payment id, which you can then send along with the creation of the booking, to allocate the payment against it.


mutation {
  ecommerce {
    checkout {
      createCheckout(
        buildingId: ID!, # This is required to ascertain which merchant account
        price {
          amount: Integer
        }
        # The URL to redirect your customer back to after they authenticate
        # or cancel their payment on the payment method’s app or site. 
        returnUrl: string
        # The URL to redirect the customer back to once payment has been taken
        successUrl: string
      ) {
        url
      }  
    }
  }
}
PreviousSearchNextGeneral

Last updated 10 months ago