This document details API use cases and endpoints for Sway. Note that these API endpoints are the same endpoints used by the Sway mobile apps, and are subject to the same authentication, rate limit, and throttling constraints.
API endpoints are subject to change, and developer access for Sway is currently limited. If you are building upon these endpoints, please get in touch – we'd love to discuss your specific use case.
To make authenticated API requests to Sway, you will need to generate a JWT, which you will include in the Authorization header of your API requests:
API Root URL
All endpoints mentioned are relative paths. The API root URL is:
- lineItems: Array
- price: Number
- productVariantId: String (optional)
- quantity: Number
- internalNote: String (optional)
Creating a new order
A common workflow is to create a new order, to request a payment from an end-customer. To accomplish that, follow these steps:
1. Create a draft order (
2. Publish draft order (
You can also optionally add an internal note to orders via the
POST /v1/pv/orders/:orderId/update endpoint.