Shipping physical goods
What Swop needs to sell something that goes in a box, and how shipping is priced.
Shipping is priced from your catalogue
Each physical product carries its own shipping cost, set in the Swop app. When you create a checkout, Swop adds it per line and includes it in fees.totalDueAmount. You never send a shipping amount; like prices, it comes from your catalogue.
"lineItems": [
{
"productId": "66a1b2c3d4e5f6a7b8c9d0e1",
"name": "Swop Classic Card",
"quantity": 1,
"unitAmount": 25,
"totalAmount": 25,
"requiresShipping": true,
"shippingAmount": 5,
"productType": "physical"
}
]The address is required
For any cart with a physical item, send customerInfo with at least:
| Field | Required |
|---|---|
name | Yes |
email | Yes |
address.line1 | Yes |
address.city | Yes |
address.postalCode | Yes |
address.country | Yes |
phone, address.line2, address.state | Recommended |
If something is missing, you get a 400 with a machine-readable code and the list of missing fields, so you can highlight them on your form:
{
"success": false,
"code": "SHIPPING_DETAILS_REQUIRED",
"missing": ["address.line1", "address.postalCode"],
"message": "…"
}After the sale
- You receive
checkout.paidwith the buyer's shipping address. - Ship it and mark it shipped in the Swop app with the carrier and tracking number.
- Your payout for a physical online sale is held in escrow until the buyer confirms delivery (or the waiting period after delivery passes).
GET /orders returns fulfillment.requiresShipping, fulfillment.shippedAt, trackingNumber, carrier and estimatedDeliveryDate so you can track shipping times.