Skip to content

Orders API ​

Manage customer orders including creation, updates, payments, refunds, shipping, and status management.

Base URL: https://your-site.com/wp-json/fluent-cart/v2/orders

Policy: OrderPolicy

All monetary values are in cents (e.g., $10.00 = 1000).


List Orders ​

GET /fluent-cart/v2/orders

Retrieve a paginated list of orders with optional filtering, sorting, and search.

  • Permission: orders/view

Parameters ​

ParameterTypeLocationRequiredDescription
pageintegerqueryNoPage number for pagination
per_pageintegerqueryNoNumber of records per page (default: 10, max: 200)
searchstringqueryNoSearch term. Searches invoice number, customer name/email, and order item titles. Also supports operator syntax (e.g., status = completed, id > 5, id :: 1-10)
sort_bystringqueryNoColumn to sort by (default: id). Must be a fillable column on the Order model
sort_typestringqueryNoSort direction: asc or desc (default: desc)
active_viewstringqueryNoTab filter. One of: on-hold, paid, completed, processing, renewal, subscription, onetime, refunded, partially_refunded, upgraded_to, upgraded_from
filter_typestringqueryNoFilter mode: simple (default) or advanced
advanced_filtersstring (JSON)queryNoJSON-encoded array of advanced filter groups (requires Pro). Supports filtering by order properties, customer properties, transaction properties, license properties, and UTM properties
witharray/stringqueryNoEager-load relations. Supports relation names and {relation}Count for counts
selectarray/stringqueryNoComma-separated list of columns to select
scopesarrayqueryNoModel scopes to apply
include_idsarray/stringqueryNoComma-separated IDs that must always be included in results
limitintegerqueryNoLimit number of records (used with non-paginated queries)
offsetintegerqueryNoOffset for records
user_tzstringqueryNoUser timezone for date filtering (e.g., America/New_York)
payment_statusesarrayqueryNoFilter by payment statuses
order_statusesarrayqueryNoFilter by order statuses
shipping_statusesarrayqueryNoFilter by shipping statuses

Searchable Fields (Operator Syntax) ​

The search parameter supports operator syntax like field = value, field > value, or field :: range:

FieldColumnTypeExamples
ididnumericid = 1, id > 5, id :: 1-10
statusstatusstringstatus = completed
invoicestatusstringInvoice number search
paymentpayment_statusstringpayment = paid, payment = partially_refunded
payment_bypayment_methodstringpayment_by = stripe, payment_by = paypal
customer(custom)customcustomer = john (searches name and email)
license(custom)customlicense = ff-78d47b3fed89bda25cdc5b60d0298d60 (Pro only)

Response ​

json
{
  "orders": {
    "current_page": 1,
    "data": [
      {
        "id": 1,
        "uuid": "abc123-def456",
        "invoice_no": "INV-001",
        "status": "completed",
        "payment_status": "paid",
        "payment_method": "stripe",
        "type": "payment",
        "fulfillment_type": "digital",
        "currency": "USD",
        "subtotal": 5000,
        "total_amount": 5000,
        "total_paid": 5000,
        "total_refund": 0,
        "shipping_total": 0,
        "tax_total": 0,
        "manual_discount_total": 0,
        "coupon_discount_total": 0,
        "customer_id": 1,
        "customer": { ... },
        "created_at": "2025-01-15 10:30:00",
        "updated_at": "2025-01-15 10:35:00"
      }
    ],
    "per_page": 10,
    "total": 100,
    "last_page": 10
  }
}

Example ​

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/orders?page=1&per_page=10&sort_by=id&sort_type=desc" \
  -u "username:app_password"

Calculate Shipping ​

POST /fluent-cart/v2/orders/calculate-shipping

Calculate shipping charges for order items with a specific shipping method.

  • Permission: orders/create or orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
order_itemsarraybodyYesArray of order items, each with id (variation ID) and quantity
shipping_idintegerbodyYesID of the shipping method to calculate charges for

Response ​

json
{
  "message": "Shipping updated",
  "shipping_charge": 500,
  "order_items": {
    "1": {
      "id": 1,
      "quantity": 2,
      "shipping_charge": 500,
      "unit_price": 2500,
      "other_info": {},
      "discount_total": 0,
      "fulfillment_type": "physical"
    }
  }
}

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/calculate-shipping" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "order_items": [{"id": 1, "quantity": 2}],
    "shipping_id": 5
  }'

Create Order ​

POST /fluent-cart/v2/orders

Create a new order manually from the admin panel.

  • Permission: orders/create
  • Request Class: OrderRequest

Parameters ​

ParameterTypeLocationRequiredDescription
customer_idintegerbodyYesID of the customer placing the order
order_itemsarraybodyYesArray of order items (see Order Items below)
statusstringbodyNoOrder status (max 50 chars)
invoice_nostringbodyNoInvoice number (max 100 chars)
fulfillment_typestringbodyNoFulfillment type (max 50 chars)
typestringbodyNoOrder type (max 50 chars)
payment_methodstringbodyNoPayment method key (max 50 chars)
payment_method_titlestringbodyNoPayment method display title (max 50 chars)
payment_statusstringbodyNoPayment status (max 50 chars)
currencystringbodyNoCurrency code, e.g., USD (max 10 chars)
subtotalnumericbodyNoOrder subtotal in cents
discount_taxnumericbodyNoDiscount tax amount in cents
manual_discount_totalnumericbodyNoManual discount total in cents
coupon_discount_totalnumericbodyNoCoupon discount total in cents
shipping_taxnumericbodyNoShipping tax in cents
shipping_totalnumericbodyNoShipping total in cents
tax_totalnumericbodyNoTax total in cents
total_amountnumericbodyNoTotal order amount in cents
ratenumericbodyNoExchange rate
notestringbodyNoOrder note (max 5000 chars)
uuidstringbodyNoOrder UUID (max 100 chars)
ip_addressstringbodyNoCustomer IP address (max 100 chars)
completed_atstringbodyNoCompletion timestamp (max 100 chars)
refunded_atstringbodyNoRefund timestamp (max 100 chars)
user_tzstringbodyNoUser timezone (max 50 chars)
discountobjectbodyNoManual discount details
shippingarraybodyNoShipping method details
applied_couponarraybodyNoApplied coupon details
triggerstringbodyNoTrigger source

Order Items Object ​

FieldTypeRequiredDescription
idintegerNoOrder item ID (for updates)
order_idintegerNoParent order ID
post_idintegerNoWordPress post ID of the product
variation_idintegerNoProduct variation ID
object_idintegerNoObject reference ID
fulfillment_typestringNodigital or physical
payment_typestringNoPayment type (max 100 chars), e.g., subscription
quantityintegerNoItem quantity (min: 1)
post_titlestringNoProduct title (max 255 chars)
titlestringNoItem title (max 255 chars)
pricenumericNoItem price in cents
unit_pricenumericNoUnit price in cents
shipping_chargenumericNoShipping charge in cents
item_costnumericNoItem cost in cents
item_totalnumericNoItem total in cents
tax_amountnumericNoTax amount in cents
discount_totalnumericNoDiscount total in cents
totalnumericNoTotal in cents
line_totalnumericNoLine total in cents
cart_indexintegerNoCart position index
ratenumericNoExchange rate
line_metaarrayNoLine item metadata
other_infoarrayNoAdditional item information

Discount Object ​

FieldTypeRequiredDescription
typestringNoDiscount type (max 100 chars)
valuenumericNoDiscount value
labelstringNoDiscount label (max 100 chars)
reasonstringNoDiscount reason (max 100 chars)
actionstringNoDiscount action (max 100 chars)

Shipping Object (array) ​

FieldTypeRequiredDescription
typestringNoShipping type (max 100 chars)
rate_namestringNoShipping rate name (max 100 chars)
custom_pricenumericNoCustom shipping price in cents

Applied Coupon Object (array) ​

FieldTypeRequiredDescription
idintegerNoApplied coupon record ID
order_idintegerNoOrder ID
coupon_idintegerYesCoupon ID (min: 1)
codestringYesCoupon code (max 100 chars)
amountnumericNoCoupon amount
discounted_amountnumericYesDiscounted amount in cents
discountnumericNoDiscount value
stackableintegerYesWhether coupon is stackable (0 or 1)
priorityintegerNoCoupon priority
max_usesintegerNoMaximum uses
use_countintegerNoCurrent use count
max_per_customerintegerNoMax uses per customer (min: 1)
min_purchase_amountnumericNoMinimum purchase amount in cents
max_discount_amountnumericNoMaximum discount amount in cents
notesstringNoCoupon notes (max 100 chars)

Response ​

json
{
  "message": "Order created successfully!",
  "order_id": 42,
  "uuid": "abc123-def456-ghi789"
}

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 1,
    "order_items": [
      {
        "post_id": 10,
        "variation_id": 5,
        "object_id": 5,
        "quantity": 1,
        "unit_price": 2500,
        "price": 2500,
        "item_total": 2500,
        "total": 2500,
        "line_total": 2500,
        "title": "Pro License"
      }
    ],
    "subtotal": 2500,
    "total_amount": 2500,
    "payment_method": "offline_payment"
  }'

Bulk Actions ​

POST /fluent-cart/v2/orders/do-bulk-action

Perform bulk actions on multiple orders at once.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
actionstringbodyYesBulk action to perform. One of: delete_orders, change_shipping_status, change_order_status, capture_payments, change_payment_status
order_idsarraybodyYesArray of order IDs to act upon
new_statusstringbodyConditionalNew status value. Required for change_shipping_status, change_order_status, and change_payment_status actions
manage_stockstringbodyNoWhether to manage stock on status change (true/false)

Supported Actions ​

ActionDescriptionValid new_status Values
delete_ordersDelete selected orders and related dataN/A
change_shipping_statusUpdate shipping statusValid shipping statuses (e.g., shipped, delivered)
change_order_statusUpdate order statuscompleted, processing, on-hold, canceled
capture_paymentsCapture authorized paymentsN/A
change_payment_statusUpdate payment statusValid transaction statuses

Response ​

json
{
  "message": "Order Status has been changed for the selected orders"
}

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/do-bulk-action" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "change_order_status",
    "order_ids": [1, 2, 3],
    "new_status": "processing"
  }'

Mark Order as Paid ​

POST /fluent-cart/v2/orders/{order}/mark-as-paid

Mark a pending order as paid, creating or updating the transaction record.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
payment_methodstringbodyNoPayment method used (e.g., offline_payment, stripe)
vendor_charge_idstringbodyNoExternal payment reference/charge ID
transaction_typestringbodyNoTransaction type identifier
mark_paid_notestringbodyNoNote to attach to the order

Response ​

json
{
  "message": "Order has been marked as paid"
}

Error Responses ​

StatusMessage
423Order has already been paid
423Unable to mark paid for canceled order

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/mark-as-paid" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_method": "offline_payment",
    "vendor_charge_id": "CHK-12345",
    "mark_paid_note": "Payment received via bank transfer"
  }'

Generate Missing Licenses ​

POST /fluent-cart/v2/orders/{order}/generate-missing-licenses

Generate any missing license keys for an order's items (requires Pro with licensing module).

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID

Error Responses ​

StatusMessage
404Order not found
400No missing licenses found!

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/generate-missing-licenses" \
  -u "username:app_password"

Get Order Details ​

GET /fluent-cart/v2/orders/{order_id}

Retrieve detailed information about a specific order, including items, transactions, addresses, subscriptions, and activities.

  • Permission: orders/view

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID

Response ​

json
{
  "order": {
    "id": 42,
    "uuid": "abc123-def456",
    "invoice_no": "INV-042",
    "status": "completed",
    "payment_status": "paid",
    "payment_method": "stripe",
    "type": "payment",
    "fulfillment_type": "digital",
    "currency": "USD",
    "subtotal": 5000,
    "total_amount": 5000,
    "total_paid": 5000,
    "total_refund": 0,
    "shipping_total": 0,
    "tax_total": 0,
    "manual_discount_total": 0,
    "coupon_discount_total": 0,
    "customer_id": 1,
    "customer": { ... },
    "order_items": [ ... ],
    "transactions": [ ... ],
    "billing_address": { ... },
    "shipping_address": { ... },
    "subscriptions": [ ... ],
    "activities": [ ... ],
    "labels": [ ... ],
    "applied_coupons": [ ... ],
    "children": [ ... ],
    "parent_order": null,
    "order_operation": { ... },
    "receipt_url": "https://example.com/receipt/?order_hash=abc123",
    "custom_checkout_url": "https://example.com/checkout/?payment_hash=...",
    "has_missing_licenses": false,
    "created_at": "2025-01-15 10:30:00",
    "updated_at": "2025-01-15 10:35:00"
  },
  "discount_meta": { ... },
  "shipping_meta": { ... },
  "order_settings": {},
  "selected_labels": [1, 2],
  "tax_id": null
}

Example ​

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/orders/42" \
  -u "username:app_password"

Update Order ​

POST /fluent-cart/v2/orders/{order_id}

Update an existing order's details, items, discounts, shipping, and coupons. Subscription orders cannot be edited.

  • Permission: orders/manage
  • Request Class: OrderRequest

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID
customer_idintegerbodyYesCustomer ID
order_itemsarraybodyYesUpdated array of order items (same structure as Create Order)
statusstringbodyNoOrder status (cannot be set to completed)
payment_statusstringbodyNoPayment status
subtotalnumericbodyNoUpdated subtotal in cents
total_amountnumericbodyNoUpdated total amount in cents
total_paidnumericbodyNoTotal amount already paid in cents
shipping_totalnumericbodyNoUpdated shipping total in cents
tax_totalnumericbodyNoUpdated tax total in cents
manual_discount_totalnumericbodyNoManual discount in cents
coupon_discount_totalnumericbodyNoCoupon discount in cents
discountobjectbodyNoDiscount details (see Create Order)
shippingarraybodyNoShipping details (see Create Order)
applied_couponarraybodyNoApplied coupon details (see Create Order)
deletedItemsarraybodyNoArray of order item IDs to remove
couponCalculationarraybodyNoCoupon calculation details

All other fields from OrderRequest are also accepted (see Create Order).

Error Responses ​

StatusMessage
400Subscription Order cannot be edited
400Completed status can not be updated

Response ​

json
{
  "message": "Order updated successfully",
  "order": { ... }
}

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 1,
    "order_items": [
      {
        "id": 10,
        "order_id": 42,
        "quantity": 2,
        "unit_price": 2500,
        "line_total": 5000
      }
    ],
    "subtotal": 5000,
    "total_amount": 5000
  }'

Update Order Address ID ​

POST /fluent-cart/v2/orders/{order_id}/update-address-id

Assign an existing customer address to an order's billing or shipping address.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID
address_idintegerbodyYesCustomer address ID to assign
address_typestringbodyNoAddress type: billing (default) or shipping

Response ​

json
{
  "message": "Address updated successfully"
}

Error Responses ​

StatusMessage
404Order not found

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/update-address-id" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "address_id": 5,
    "address_type": "billing"
  }'

Refund Order ​

POST /fluent-cart/v2/orders/{order_id}/refund

Process a full or partial refund for an order. Supports both gateway refunds and manual refunds, with optional subscription cancellation.

  • Permission: orders/can_refund

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID
refund_infoobjectbodyYesRefund details object
refund_info.transaction_idintegerbodyYesID of the transaction to refund
refund_info.amountnumericbodyYesRefund amount in decimal format (e.g., 10.00 not cents). Will be converted to cents internally
refund_info.cancelSubscriptionstringbodyNoSet to "true" to cancel associated subscription

Response ​

json
{
  "fluent_cart_refund": {
    "status": "success",
    "message": "Refund processed on FluentCart."
  },
  "gateway_refund": {
    "status": "success",
    "message": "Refund processed on Stripe"
  },
  "subscription_cancel": {
    "status": "success",
    "message": "Subscription cancelled successfully"
  }
}

Error Responses ​

StatusMessage
400Order can not be refunded
422Transaction ID is required
422Refund amount is required

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/refund" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "refund_info": {
      "transaction_id": 15,
      "amount": 25.00,
      "cancelSubscription": "true"
    }
  }'

Change Customer ​

POST /fluent-cart/v2/orders/{order_id}/change-customer

Reassign an order to a different existing customer. Updates all connected orders (parent/child/renewals), subscriptions, and customer statistics.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID
customer_idintegerbodyYesNew customer ID to assign

Response ​

json
{
  "message": "Customer changed successfully"
}

Error Responses ​

StatusMessage
423Customer id is required

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/change-customer" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 15
  }'

Create and Change Customer ​

POST /fluent-cart/v2/orders/{order_id}/create-and-change-customer

Create a new customer and immediately assign them to the order. Combines customer creation with order reassignment.

  • Permission: orders/manage
  • Request Class: CustomerRequest

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID
first_namestringbodyConditionalCustomer first name (max 255 chars). Required if full name mode is disabled
last_namestringbodyNoCustomer last name (max 255 chars)
full_namestringbodyConditionalCustomer full name (max 255 chars). Required if full name mode is enabled
emailstringbodyYesCustomer email address (max 255 chars, must be unique)
citystringbodyNoCustomer city
user_idintegerbodyNoWordPress user ID to link
statusstringbodyNoCustomer status
countrystringbodyNoCustomer country
statestringbodyNoCustomer state
postcodestringbodyNoCustomer postal code
notesstringbodyNoCustomer notes

Response ​

json
{
  "message": "Customer changed successfully"
}

Error Responses ​

StatusMessage
422Email is required
422Email already exists
422First Name is required
400Failed to attach customer

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/create-and-change-customer" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]"
  }'

Delete Order ​

DELETE /fluent-cart/v2/orders/{order_id}

Permanently delete an order and all associated data (transactions, items, meta, addresses, coupons, cart data, download permissions, labels). For subscription orders, also deletes all child renewal orders and subscriptions.

  • Permission: orders/delete

Parameters ​

ParameterTypeLocationRequiredDescription
order_idintegerpathYesOrder ID to delete

Response ​

json
{
  "message": "Order 42 deleted successfully",
  "data": {
    "order_id": 42,
    "invoice_no": "INV-042",
    "status": "success"
  },
  "errors": []
}

Error Responses ​

StatusMessage
404Order not found
400(Various reasons why order cannot be deleted)

Example ​

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/orders/42" \
  -u "username:app_password"

Update Statuses ​

PUT /fluent-cart/v2/orders/{order}/statuses

Update the order status or shipping status for an order.

  • Permission: orders/manage_statuses

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
actionstringbodyYesStatus change type: change_order_status or change_shipping_status
statusesobjectbodyYesStatus values object
statuses.order_statusstringbodyConditionalNew order status. Required when action is change_order_status. One of: completed, processing, on-hold, canceled
statuses.shipping_statusstringbodyConditionalNew shipping status. Required when action is change_shipping_status
manage_stockstring/booleanbodyNoWhether to adjust stock levels on status change

Response ​

json
{
  "message": "Status has been updated",
  "data": { ... }
}

Error Responses ​

StatusMessage
400Order already has the same status
400You cannot change the order status once it has been canceled

Example ​

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/orders/42/statuses" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "change_order_status",
    "statuses": {
      "order_status": "processing"
    },
    "manage_stock": true
  }'

Get Order Transactions ​

GET /fluent-cart/v2/orders/{order}/transactions

Retrieve all transactions for an order. This endpoint returns the full order details (same as Get Order Details), which includes the transactions relation.

  • Permission: orders/view

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID

Response ​

Same response structure as Get Order Details, with the order.transactions array populated.

Example ​

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/orders/42/transactions" \
  -u "username:app_password"

Accept Dispute ​

POST /fluent-cart/v2/orders/{order}/transactions/{transaction_id}/accept-dispute/

Accept a payment dispute (chargeback) for a specific transaction.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
transaction_idintegerpathYesTransaction ID with the dispute
dispute_notestringbodyNoNote about the dispute acceptance

Response ​

json
{
  "message": "Dispute accepted!"
}

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/transactions/15/accept-dispute/" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "dispute_note": "Customer provided valid reason for dispute"
  }'

Get Single Transaction ​

GET /fluent-cart/v2/orders/{id}/transactions/{transaction_id}

Retrieve details of a specific transaction within an order. This endpoint returns the full order details (same as Get Order Details).

  • Permission: orders/view

Parameters ​

ParameterTypeLocationRequiredDescription
idintegerpathYesOrder ID
transaction_idintegerpathYesTransaction ID

Response ​

Same response structure as Get Order Details.

Example ​

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/orders/42/transactions/15" \
  -u "username:app_password"

Update Order Address ​

PUT /fluent-cart/v2/orders/{order}/address/{id}

Update an existing order address (billing or shipping) with new address data.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
idintegerpathYesOrder address ID
order_idintegerbodyYesOrder ID (must match the path parameter)
namestringbodyNoFull name
first_namestringbodyNoFirst name
last_namestringbodyNoLast name
full_namestringbodyNoFull name
address_1stringbodyNoAddress line 1
address_2stringbodyNoAddress line 2
citystringbodyNoCity
statestringbodyNoState/province
postcodestringbodyNoPostal/ZIP code
countrystringbodyNoCountry code

Response ​

json
{
  "message": "Address updated successfully"
}

Error Responses ​

StatusMessage
404The address information does not match

Example ​

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/orders/42/address/5" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": 42,
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "123 Main St",
    "city": "New York",
    "state": "NY",
    "postcode": "10001",
    "country": "US"
  }'

Update Transaction Status ​

PUT /fluent-cart/v2/orders/{order}/transactions/{transaction}/status

Update the payment status of a specific transaction and sync the order's payment status accordingly.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
transactionintegerpathYesTransaction ID
statusstringbodyYesNew transaction status (e.g., succeeded, pending, refunded, failed)

Response ​

json
{
  "transaction": {
    "id": 15,
    "order_id": 42,
    "status": "succeeded",
    "total": 5000,
    "payment_method": "stripe",
    ...
  },
  "message": "Payment status has been successfully updated"
}

Error Responses ​

StatusMessage
400Transaction already has the same status
400The selected transaction does not match with the provided order

Example ​

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/orders/42/transactions/15/status" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "succeeded"
  }'

Create Custom Order Item ​

POST /fluent-cart/v2/orders/{order}/create-custom

Add a custom product/item to an existing order.

  • Permission: orders/create

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID
productobjectbodyYesProduct data to add as a custom item

Response ​

Returns the result of processing the custom item addition.

Error Responses ​

StatusMessage
423(Error message from processing)

Example ​

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/orders/42/create-custom" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "product": {
      "title": "Custom Service",
      "price": 1500,
      "quantity": 1
    }
  }'

Get Shipping Methods ​

GET /fluent-cart/v2/orders/shipping_methods

Retrieve available shipping methods, optionally filtered by country and state. Returns methods applicable to the specified location and all other enabled methods separately.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
country_codestringqueryNoCountry code to filter applicable shipping methods (e.g., US, GB)
statestringqueryNoState/province code for more specific filtering
order_itemsarrayqueryNoArray of order items (each with id and quantity) to calculate shipping charges

Response ​

json
{
  "shipping_methods": [
    {
      "id": 1,
      "title": "Standard Shipping",
      "is_enabled": "1",
      "shipping_charge": 500,
      ...
    }
  ],
  "other_shipping_methods": [
    {
      "id": 2,
      "title": "International Shipping",
      "is_enabled": "1",
      "shipping_charge": 1500,
      ...
    }
  ]
}

When country_code is empty, shipping_methods will be an empty array and all enabled methods appear in other_shipping_methods.

Example ​

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/orders/shipping_methods?country_code=US&state=CA" \
  -u "username:app_password"

Sync Order Statuses ​

PUT /fluent-cart/v2/orders/{order}/sync-statuses

Synchronize the order's status and payment status based on the latest transaction data. Useful for resolving status mismatches.

  • Permission: orders/manage

Parameters ​

ParameterTypeLocationRequiredDescription
orderintegerpathYesOrder ID

Response ​

json
{
  "message": "Order statuses synced successfully",
  "order": { ... },
  "payment_status": "paid",
  "status": "processing"
}

Error Responses ​

StatusMessage
404No transaction found for this order

Example ​

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/orders/42/sync-statuses" \
  -u "username:app_password"

FluentCart developer documentation