Skip to main content
The simplest checkout flow possible: Go from cart to completed order in a single API call. Perfect for merchants who want to maximize conversion with minimal friction.

Why 1-Step Checkout?

Traditional checkout flows require multiple steps:
  1. Create cart → 2. Add items → 3. Set shipping → 4. Calculate tax → 5. Process payment → 6. Complete order
With Firmly’s place-order API, you can do all of this in one single API call.

Benefits

Higher Conversion

Reduce checkout abandonment with fewer steps

Faster Integration

Implement in hours, not weeks

Less Complexity

One endpoint to maintain instead of six

How It Works

The place-order API combines cart creation, item addition, shipping calculation, and payment processing into a single atomic operation:
Real-Time Updates: The place-order API supports Server-Sent Events (SSE) for real-time order processing updates. Perfect for showing progress indicators during checkout.

Quick Implementation

1

Collect Customer Information

Gather items, shipping address, and credit card details in your checkout form
2

Encrypt Credit Card

Use Firmly’s public key to JWE-encrypt card details for secure transmission
3

Call place-order API

Submit everything in one API call and handle the response

Credit Card Encryption

Security First: Never send raw credit card data to any API. Always encrypt card details using JWE (JSON Web Encryption) with Firmly’s public key.
The credit card data must be encrypted as a JWE token containing:

Complete Example

Here’s a full implementation of 1-step checkout:

Important Security Notes

Critical Security Requirements:
  1. Never store card data - Card details should only exist in memory during encryption
  2. Always use HTTPS - All API calls must be over secure connections
  3. PCI Compliance - Ensure your implementation follows PCI DSS guidelines
  4. Server-side encryption - Never expose encryption logic to client-side JavaScript
  5. Validate SSL certificates - Ensure you’re connecting to genuine Firmly endpoints

Real-Time Features with SSE

Server-Sent Events Support: Both place-order endpoints (v1 and v2) support SSE for real-time order status updates. This enables you to show live progress during checkout processing.

Using SSE for Live Updates

SSE Event Types

  • order_processing: Order is being validated and processed
  • payment_processing: Payment is being authorized
  • order_completed: Order successfully placed with order details
  • error: Processing failed with error details

When to Use 1-Step Checkout

  • Single vendor stores
  • Standard shipping only
  • High-volume, low-complexity products
  • Mobile-first experiences

Error Handling

The place-order API provides detailed error responses:
Common error scenarios:
  • InvalidAddress: Address validation failed
  • InsufficientStock: Product not available
  • PaymentFailed: Card declined or invalid
  • InvalidVariant: Product SKU not found
  • InvalidCard: Card encryption or validation failed

Next Steps

API Reference

Complete place-order API documentation

Payment Encryption

Learn about secure payment handling

Simple Cart Guide

Alternative multi-step approach

Testing Guide

Set up test environment

Support

Need help implementing 1-step checkout?