WooCommerce.com Orders and Invoices API

If you purchase extensions, subscriptions, or other products from WooCommerce.com, you can use this REST API to retrieve your own order history and download invoices programmatically. This is useful for automating accounting workflows, syncing purchase records with external systems, or bulk-downloading invoices without logging in to WooCommerce.com.

Note: This API provides read-only access to your purchases on WooCommerce.com. It is not related to the WooCommerce REST API used to manage orders on your own WooCommerce-powered store.

Overview

↑ Back to top

The WooCommerce.com Orders and Invoices API gives you read-only access to your own orders on WooCommerce.com. Use it to automate accounting, sync order data with your systems, or download invoices programmatically.

Prerequisites

↑ Back to top
  1. API access must be enabled on your WooCommerce.com account by an administrator. If you don’t already have access, contact your account manager or WooCommerce.com support to request it.
  2. You need an application password (a special API token) โ€” see Quick Start below.

Quick Start

↑ Back to top

Step 1: Create an Application Password

↑ Back to top
  1. Log in to WooCommerce.com.
  2. Go to Profile and scroll down to the Application Passwords section.
  3. Enter a name for your password (e.g., “Accounting Integration”) and select Create.
  4. Copy the token immediately โ€” it is only displayed once and cannot be retrieved later.

Step 2: Make Your First API Call

↑ Back to top

Replace you@example.com with your WooCommerce.com login email and YOUR_TOKEN with the application password you just created:

curl -u "you@example.com:YOUR_TOKEN" \\
  <https://woocommerce.com/wp-json/wc/v3/orders>

This returns a JSON array of your orders.

Authentication

↑ Back to top

Two authentication methods are supported. Use whichever fits your tooling.

Option A: HTTP Basic Auth

↑ Back to top

Pass your WooCommerce.com login email as the username and your application password as the password:

curl -u "you@example.com:YOUR_TOKEN" \\
  <https://woocommerce.com/wp-json/wc/v3/orders>

Option B: X-API-KEY Header

↑ Back to top

Pass your application password in the X-API-KEY header (no username needed):

curl -H "X-API-KEY: YOUR_TOKEN" \\
  <https://woocommerce.com/wp-json/wc/v3/orders>

TIP: If you use HTTP Basic Auth, the username must match your WooCommerce.com login email or username. Using the wrong username will result in a 401 error.

API Reference

↑ Back to top

List Your Orders

↑ Back to top

GET /wp-json/wc/v3/orders

Returns a paginated list of your orders. The API automatically scopes results to your account โ€” you will only ever see your own orders.

Common query parameters:

ParameterTypeDescription
per_pageintegerNumber of orders per page (default: 10, max: 100)
pageintegerPage number
statusstringFilter by order status (e.g., completed, processing, refunded)
afterstringLimit to orders created after this ISO 8601 date
beforestringLimit to orders created before this ISO 8601 date

Example โ€” get your 5 most recent completed orders:

curl -u "you@example.com:YOUR_TOKEN" \\
  "<https://woocommerce.com/wp-json/wc/v3/orders?status=completed&per_page=5>"

Get a Single Order

↑ Back to top

GET /wp-json/wc/v3/orders/{id}

Returns full details for a specific order. You can only retrieve orders that belong to your account โ€” requesting someone else’s order returns a 403 Forbidden error.

Example:

curl -u "you@example.com:YOUR_TOKEN" \\
  <https://woocommerce.com/wp-json/wc/v3/orders/12345>

Get an Invoice

↑ Back to top

GET /wp-json/wc/v3/orders/{id}/invoice

Returns a URL to download the invoice PDF for a specific order.

Requirements:

  • The order must have a status of completed or refunded
  • Orders with other statuses return a 404 Not Found

Example:

curl -u "you@example.com:YOUR_TOKEN" \\
  <https://woocommerce.com/wp-json/wc/v3/orders/12345/invoice>

Response:

{
  "order_id": 12345,
  "invoice_url": "https://...",
  "type": "redirect"
}

Open the invoice_url in a browser or follow the redirect to download the PDF.

The type field indicates how to access the invoice:

  • redirect โ€” follow the URL to a hosted PDF
  • download_url โ€” direct download link for the PDF

Response Format

↑ Back to top

Order responses follow the standard WooCommerce REST API format. Key fields include:

FieldDescription
idOrder ID
statusOrder status (e.g., completed, processing)
totalOrder total
currencyCurrency code (e.g., USD)
date_createdWhen the order was placed
billingBilling address and contact details
shippingShipping address
line_itemsArray of purchased products with names, quantities, and prices
payment_method_titlePayment method used (e.g., “Credit Card”)
date_paidWhen payment was received

Fields not included in customer responses: internal metadata, customer IP address, customer user agent, and cost-of-goods data. These are omitted for privacy and security.


Important Notes

↑ Back to top
  • API versions โ€” both /wc/v2/ and /wc/v3/ are supported. We recommend using v3.
  • Revoking access โ€” you can revoke an application password at any time from My Account > Application Passwords. This immediately disables that token.
  • Lost token โ€” if you lose your application password, create a new one. Old tokens cannot be retrieved.

Troubleshooting

↑ Back to top
IssueSolution
401 UnauthorizedCheck that your application password is correct and your username matches your WooCommerce.com login email.
403 ForbiddenYour account may not have API access enabled, or you’re trying to access an order that doesn’t belong to you.
404 Not Found on invoiceInvoices are only available for completed or refunded orders.
Token stopped workingYour application password may have been revoked. Create a new one from your account Profile page.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.