Skip to main content
The Place Orders pattern creates direct-fulfillment orders through the V3 orders API. A single POST /v3/orders call creates an order that Snappy fulfills and ships to the recipient — no two-step gift/claim flow required.

Prerequisites

  • API key with orders:create scope
  • A configured billing method under the ordering account
  • accountId, billingMethodId, and variantId ready

Physical vs digital variants

The shipping address requirement depends on the variant type:
  • Physical variants (variant.shippingRequired: true) — physical merchandise, apparel, experiences. Require the full shipping address: address1, city, provinceCode, postalCode, and countryCode. address2 is optional.
  • Digital variants (variant.shippingRequired: false) — gift cards, e-vouchers, and other card-based rewards. Require only countryCode, used for pricing and localization. No street/city/postal fields needed since there’s no physical delivery.
Snappy validates the address at runtime against the variant’s shippingRequired value — if you send only countryCode for a physical variant, the request is rejected.

Pre-flight: validate the address

For physical variants, run the recipient’s address through Snappy’s validation endpoint before placing the order. This catches undeliverable addresses before the order is created.
JavaScript
For address autocomplete as the user types, use GET /v3/orders/addresses/autocomplete?filter[address]=...&filter[country]=US.
Skip address validation for digital variants — there’s no physical address to validate. countryCode alone is sufficient.

Place the order

The account is scoped via header, not body:
JavaScript
Python

Idempotency

The idempotencyKey (top-level field, 1–120 chars) makes retries safe. Sending the same key twice returns the original order — no duplicate, no double charge. Derive from stable identifiers:
JavaScript
Reuse the same key on all retry attempts for the same order.

Cancel an order

Orders can only be canceled before fulfillment begins. Check status on the order before attempting cancellation.

Bulk placement

For placing multiple orders (e.g., a batch send), use bounded concurrency to stay within rate limits:
JavaScript

Swag orders

Swag orders use the same POST /v3/orders endpoint but require:
  • Snappy-Account-Id header (same as standard orders)
  • A variantId from a swag product (fetched with filter[catalog]=swag)
Swag variants are always physical, so send the full shipping address.

Failure table

Last modified on July 30, 2026