API
GuidesGet API token
You’re viewing the reference for API version 2021-01.See the latest version, 2021-11 →
Core Resources

Orders

An order is created after a charge is successfully processed. The order contains all the same json data as the charge. In case of a prepaid order creation, the order will be queued for a particular date and submitted on that date to shopify.
How Orders relate to other resources

#The order object

These fields are deprecated, however they will not be removed from this API version.
product_title is deprecated. Use title instead.
shipping_date is deprecated. Use scheduled_at instead.
shopify_id is deprecated. Use shopify_order_id instead.
address_is_active is deprecated. Please ignore, not an applicable field.

Attributes

  • idinteger
    The unique numeric identifier for the order.
  • The billing address at the time the order was created. See addresses for detailed address information.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • currencystring
    The currency of the payment used to create the order.
  • customerobject
    Object that contains information about the customer.
    Show child attributesHide child attributes5
    • Indicates whether the Customer gives consent for marketing communications.
    • emailstring
      The email address of the customer.
    • The customer’s first name.
    • last_namestring
      The customer’s last name.
    • Whether the customer should receive a Welcome email notification.
  • emailstring
    The email address of the customer.
  • errorstring
    String describing the reason for the error state.
  • The first name of the customer.
  • is_prepaidboolean
    The order that has been paid for a pre-determined number of months. 0=No, 1=Yes.
  • last_namestring
    The last name of the customer.
  • line_itemsarray of objects
    A list of line item objects, each one containing information about an item in the order.
    Show child attributesHide child attributes14
    • The inventory behavior policy, according to the store-level setting within Recharge. This parameter is read-only and cannot be changed, other than at the store settings level.
    • graminteger
      Weight in grams of the item.
    • imagesobject
      Images of the product.
      Show child attributesHide child attributes2
      • keystring
        The key for an image associated to the product.
        Possible values
        largemediumoriginalsmall
      • valuestring
        The value of the property
    • The original price of the item without discounts or taxes.
    • pricestring
      The price of the item.
    • The title of the product.
    • quantityinteger
      The number of products that were purchased.
    • The unique numeric identifier for the Shopify product in the fulfillment.
    • The id of the Shopify product variant.
    • tax_linesarray of objects
      An array of tax lines that apply to the LineItem.
      Show child attributesHide child attributes4
      • pricestring
        The total tax associated with the listed jurisdiction.
      • ratestring
        The tax rate associated with the listed jurisdiction.
      • titlestring
        The title/name of the taxing jurisdiction.
      • The tax associated with a single unit attributed to the listed jurisdiction.
    • titlestring
      The title of the product.
    • The title of the product variant.
    • skustring
      A unique identifier of the item in the fulfillment.
    • propertiesarray of objects
      An array of Property objects containing customer information for an item that has been added to the checkout.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The url reference for the image (CDN or other).
  • The type of payment the processor has chosen.
  • The date when the order was submitted.
  • scheduled_atdatetime
    The date when the order will be shipped.
  • The shipping address where the order will be shipped. See [addresses](/addresses) for detailed address information.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • Unique cart token generated by Shopify when an item is added to the cart.
  • Unique numeric identifier within Shopify for the customer.
  • Unique numeric identifier within Shopify for the order.
  • The unique order number within Shopify.
  • statusstring
    The status of creating the order within Shopify.
  • The unique alphanumeric identifier of the transaction.
  • The sum of all of the prices of the items in the order with taxes and discounts included (must be positive).
  • The total cost of duties for the order.
  • typestring
    Shows if order was made thorough checkout or if it’s a recurring charge. Inputs: “CHECKOUT” or “RECURRING”.
  • address_idinteger
    The id of the customer shipping address that this order is tied to.
  • Tells if address is currently active. 0=No, 1=Yes.
    Deprecated. Not an applicable field.
  • charge_idinteger
    The unique numeric identifier of the charge.
  • created_atdatetime
    The date when the order was created.
  • The unique numeric identifier of the customer.
  • The date when the order will be processed.
    Use scheduled_at instead.
  • Unique numeric identifier within Shopify for the order.
    Deprecated, use shopify_order_id instead.
  • updated_atdatetime
    The date when the order was last updated.
The order object
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "created_at": "2018-11-08T08:08:09",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "error": "",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "external_inventory_policy": "decrement_obeying_policy",
        "images": {
          "large": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_large.jpeg",
          "medium": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_medium.jpeg",
          "original": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2.jpeg",
          "small": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_small.jpeg"
        },
        "original_price": "17.00",
        "price": "17.00",
        "product_title": "Milk",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          },
          {
            "name": "size",
            "value": "medium"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "tax_lines": [
          {
            "price": "0.950",
            "rate": 0.0725,
            "title": "CA State Tax"
          },
          {
            "price": "0.335",
            "rate": 0.0225,
            "title": "Los Angeles  County Tax"
          }
        ],
        "title": "Milk",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "shopifyCartToken_littledata:45af6dbe140d8dc1a9b7821ae256cfff GAClientId:1215763073.1492751771 -  next order #3   - Subscription Recurring Order",
    "note_attributes": [],
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2022-11-16T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [
      {
        "code": "Standard Shipping",
        "price": 0,
        "title": "Standard Shipping"
      }
    ],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "CANCELLED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 18144,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-12-20T13:25:52"
  }
}

#Retrieve an order

GET/orders/{id}
Retrieve one order using the Recharge order id.
Scoperead_orders
GET/orders/{id}
curl 'https://api.rechargeapps.com/orders/70071255' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "created_at": "2018-11-08T08:08:09",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "error": "",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "images": {
          "large": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_large.jpeg",
          "medium": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_medium.jpeg",
          "original": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2.jpeg",
          "small": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_small.jpeg"
        },
        "original_price": "17.00",
        "price": "17.00",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          },
          {
            "name": "size",
            "value": "medium"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "shopifyCartToken_littledata:45af6dbe140d8dc1a9b7821ae256cfff GAClientId:1215763073.1492751771 -  next order #3   - Subscription Recurring Order",
    "note_attributes": [],
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2022-11-16T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [
      {
        "code": "Standard Shipping",
        "price": 0,
        "title": "Standard Shipping"
      }
    ],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "CANCELLED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 18144,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-12-20T13:25:52"
  }
}

#Update an order

PUT/orders/{id}
Updating existing order is now available for pre-paid subscriptions.
Scopewrite_orders

Body parameters

  • The key values you would like to update:

    address1 optional
    province required
    address2 optional
    city optional
    company optional
    country optional
    first_name optional
    last_name optional
    phone optional
    zip optional
  • The key values you would like to update:

    address1 optional
    province required
    address2 optional
    city optional
    company optional
    country optional
    first_name optional
    last_name optional
    phone optional
    zip optional
  • customerobject
    The key values related with customer you would like to update:

    first_name optional
    last_name required
    email optional
PUT/orders/{id}
curl -X PUT 'https://api.rechargeapps.com/orders/70071255' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "billing_address": {
    "city": "Los Angeles",
    "first_name": "mike",
    "last_name": "flynn",
    "zip": "90025"
  }
}'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "created_at": "2018-11-08T08:08:09",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "error": "",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "external_inventory_policy": "decrement_obeying_policy",
        "images": {
          "large": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_large.jpeg",
          "medium": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_medium.jpeg",
          "original": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2.jpeg",
          "small": "https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_small.jpeg"
        },
        "original_price": "17.00",
        "price": "17.00",
        "product_title": "Milk",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          },
          {
            "name": "size",
            "value": "medium"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "tax_lines": [
          {
            "price": "0.950",
            "rate": 0.0725,
            "title": "CA State Tax"
          },
          {
            "price": "0.335",
            "rate": 0.0225,
            "title": "Los Angeles  County Tax"
          }
        ],
        "title": "Milk",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "shopifyCartToken_littledata:45af6dbe140d8dc1a9b7821ae256cfff GAClientId:1215763073.1492751771 -  next order #3   - Subscription Recurring Order",
    "note_attributes": [],
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2022-11-16T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [
      {
        "code": "Standard Shipping",
        "price": 0,
        "title": "Standard Shipping"
      }
    ],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "CANCELLED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 18144,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-12-20T13:25:52"
  }
}

#Delete an order

DELETE/orders/{id}
You can delete a scheduled order.
Scopewrite_orders
DELETE/orders/{id}
curl -X DELETE 'https://api.rechargeapps.com/orders/70071255' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{}

#List orders

GET/orders
Returns a list of orders.

## HTTP request examples

GET /orders
GET /orders?customer_id=123
GET /orders?address_id=4587216
GET /orders?charge_id=45678542
GET /orders?created_at_min=2016-05-18&created_at_max=2016-06-18
Scoperead_orders

Query parameters

  • Filter orders by address.
    GET /orders/?address_id=123 will return all orders for the given address_id
  • charge_idstring
    Filter orders by charge.
    GET /orders/?charge_id=123 will return all orders for the given charge_id
  • Show orders created before the given date.
  • Show orders created after the given date.
  • Filter orders by customer.
    GET /orders/?customer_id=123 will return all orders for the given customer_id
  • idsstring
    Filter orders by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
  • limitstring
    The number of results. Default is 50, maximum is 250.
    Default 50Maximum 250
  • pagestringDeprecated
    The page to show. Default is 1.
    Default 1
    Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, use cursor pagination.
  • Show orders scheduled before the given date.
  • Show orders scheduled after the given date.
  • The date when the order will be processed and sent to Shopify.
    Deprecated, use scheduled_at instead.
  • Filter orders by shopify_order_id.
  • Filter orders with/without shopify_order_id (external_order_id). Default value is null
  • statusstring
    Filter orders by status. Available status: “SUCCESS”, “QUEUED”, “ERROR”, “REFUNDED”, “SKIPPED”.
  • Filter orders by subscriptions.
    GET /orders/?subscription_id=123 will return all orders for the given subscription_id
  • Show orders updated before the given date.
  • Show orders updated after the given date.
GET/orders
curl 'https://api.rechargeapps.com/orders?limit=3' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "orders": [
    {
      "id": 70071255,
      "address_id": 4029306,
      "address_is_active": 1,
      "billing_address": {
        "address1": "1933 Manning",
        "address2": "204",
        "city": "los angeles",
        "company": "bootstrap",
        "country": "United States",
        "first_name": "mike",
        "last_name": "flynn",
        "phone": "3103103101",
        "province": "California",
        "zip": "90025"
      },
      "charge_id": 97376832,
      "charge_status": "SUCCESS",
      "created_at": "2018-11-08T08:08:09",
      "currency": "USD",
      "customer": {
        "accepts_marketing": true,
        "email": "examlpe@email.com",
        "first_name": "mike",
        "last_name": "flynn",
        "phone": null,
        "send_email_welcome": false,
        "verified_email": true
      },
      "customer_id": 4203912,
      "discount_codes": [],
      "email": "examlpe@email.com",
      "first_name": "mike",
      "hash": "42039120ee0e6cfa5c97805",
      "is_prepaid": 1,
      "last_name": "flynn",
      "line_items": [
        {
          "grams": 0,
          "images": {
            "large": "https://cdn.shopify.com/.../Sumatra_Coffee_large.png",
            "medium": "https://cdn.shopify.com/.../Sumatra_Coffee__medium.png",
            "original": "https://cdn.shopify.com/.../Sumatra_Coffee_.png",
            "small": "https://cdn.shopify.com/.../Sumatra_Coffee__small.png"
          },
          "original_price": "0.00",
          "price": "0.00",
          "product_title": "Sumatra Coffee Dark",
          "properties": [
            {
              "name": "grind",
              "value": "drip"
            }
          ],
          "quantity": 4,
          "shopify_product_id": 1255183683,
          "shopify_variant_id": 32720763846,
          "sku": "MILK-1",
          "subscription_id": 26375706,
          "title": "Sumatra Coffee Dark",
          "variant_title": "Milk - a / b"
        }
      ],
      "note": "shopifyCartToken_littledata:45af6dbe140d8dc1a9b7821ae256cfff GAClientId:1215763073.1492751771 -  next order #3   - Subscription Recurring Order",
      "note_attributes": null,
      "payment_processor": "stripe",
      "processed_at": null,
      "scheduled_at": "2022-11-16T00:00:00",
      "shipped_date": null,
      "shipping_address": {
        "address1": "1933 Manning",
        "address2": "204",
        "city": "los angeles",
        "company": "bootstrap",
        "country": "United States",
        "first_name": "mike",
        "last_name": "flynn",
        "phone": "3103103101",
        "province": "California",
        "zip": "90025"
      },
      "shipping_date": "2022-11-16T00:00:00",
      "shipping_lines": [],
      "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
      "shopify_customer_id": "6454896021",
      "shopify_id": null,
      "shopify_order_id": null,
      "shopify_order_number": null,
      "status": "QUEUED",
      "subtotal_price": 0,
      "tags": "Prepaid, Subscription, Subscription Recurring Order",
      "tax_lines": [
        {
          "price": "0.950",
          "rate": 0.0725,
          "title": "CA State Tax"
        },
        {
          "price": "0.335",
          "rate": 0.0225,
          "title": "Los Angeles  County Tax"
        }
      ],
      "total_discounts": 0,
      "total_duties": 0,
      "total_line_items_price": 0,
      "total_price": 0,
      "total_refunds": null,
      "total_tax": 0,
      "total_weight": 0,
      "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
      "type": "RECURRING",
      "updated_at": "2018-11-09T10:07:52"
    }
  ]
}

#Count orders

GET/orders/count
Retrieve a count of all orders.

## HTTP request examples

GET /orders/count
GET /orders/count
GET /orders/count?address_id=123123
GET /orders/count?charge_id=123123
GET /orders/count?created_at_min=2015-01-01&created_at_max=2019-02-02
GET /orders/count?customer_id=123123
GET /orders/count?scheduled_at_min=2016-01-01&scheduled_at_max=2019-02-02
GET /orders/count?shopify_customer_id=123123123
GET /orders/count?subscription_id=123123
GET /orders/count?status=queued
Scoperead_orders

Query parameters

  • Filter orders by address.
    GET /orders/?address_id=123 will return all orders for the given address_id
  • charge_idstring
    Filter orders by charge.
    GET /orders/?charge_id=123 will return all orders for the given charge_id
  • Show orders created before the given date.
  • Show orders created after the given date.
  • Filter orders by customer.
    GET /orders/?customer_id=123 will return all orders for the given customer_id
  • Show orders scheduled before the given date.
  • Show orders scheduled after the given date.
  • Return the count of orders by shopify_customer_id.
  • statusstring
    Filter orders by status. Available status: “SUCCESS”, “QUEUED”, “ERROR”, “REFUNDED”, “SKIPPED”.
  • Filter orders by subscriptions.
    GET /orders/?subscription_id=123 will return all orders for the given subscription_id
  • Show orders updated before the given date.
  • Show orders updated after the given date.

Response attributes

GET/orders/count
curl 'https://api.rechargeapps.com/orders/count' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "count": 38667
}

#Change an order date

POST/orders/{id}/change_date
Modify the shipping date of the order.
Scopewrite_orders

Body parameters

  • scheduled_atdatetimeRequired
    New shipping date in ISO 8601 format.
POST/orders/{id}/change_date
curl -X POST 'https://api.rechargeapps.com/orders/7271806/change_date' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "scheduled_at": "2018-07-01T00:00:00"
}'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "created_at": "2018-11-08T08:08:09",
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "grams": 0,
        "images": {
          "large": "https://cdn.shopify.com/.../Sumatra_Coffee_large.png",
          "medium": "https://cdn.shopify.com/.../Sumatra_Coffee__medium.png",
          "original": "https://cdn.shopify.com/.../Sumatra_Coffee_.png",
          "small": "https://cdn.shopify.com/.../Sumatra_Coffee__small.png"
        },
        "original_price": "0.00",
        "price": "0.00",
        "product_title": "Sumatra Coffee Dark",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "title": "Sumatra Coffee Dark",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "next order #3",
    "note_attributes": null,
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2018-07-01T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "QUEUED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 0,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-06-09T10:07:52"
  }
}

#Change an order variant

PUT/orders/{id}/update_shopify_variant/{remote_variant_id}
Modify the shopify product variant of the order.
Scopewrite_orders

Body parameters

PUT/orders/{id}/update_shopify_variant/{remote_variant_id}
curl -X POST 'https://api.rechargeapps.com/orders/1234/update_shopify_variant/454545' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "new_shopify_variant_id": "32720763846"
}'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "created_at": "2018-11-08T08:08:09",
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "grams": 0,
        "images": {
          "large": "https://cdn.shopify.com/.../Sumatra_Coffee_large.png",
          "medium": "https://cdn.shopify.com/.../Sumatra_Coffee__medium.png",
          "original": "https://cdn.shopify.com/.../Sumatra_Coffee_.png",
          "small": "https://cdn.shopify.com/.../Sumatra_Coffee__small.png"
        },
        "original_price": "0.00",
        "price": "0.00",
        "product_title": "Sumatra Coffee Dark",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "title": "Sumatra Coffee Dark",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "next order #3",
    "note_attributes": null,
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2018-07-01T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "QUEUED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 0,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-06-09T10:07:52"
  }
}

#Clone an order

POST/orders/clone_order_on_success_charge/{order_id}/charge/{charge_id}
You may add additional Orders onto a success Charge if it has existing prepaid Orders by cloning an existing Order.
Scopewrite_orders

Body parameters

  • scheduled_atdatetimeRequired
    Date in future when this order will be sent.
POST/orders/clone_order_on_success_charge/{order_id}/charge/{charge_id}
curl -X POST 'https://api.rechargeapps.com/orders/clone_order_on_success_charge/70071255/charge/100714428' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "scheduled_at": "2022-11-16"
}'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "SUCCESS",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "created_at": "2018-11-08T08:08:09",
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "grams": 0,
        "images": {
          "large": "https://cdn.shopify.com/.../Sumatra_Coffee_large.png",
          "medium": "https://cdn.shopify.com/.../Sumatra_Coffee__medium.png",
          "original": "https://cdn.shopify.com/.../Sumatra_Coffee_.png",
          "small": "https://cdn.shopify.com/.../Sumatra_Coffee__small.png"
        },
        "original_price": "0.00",
        "price": "0.00",
        "product_title": "Sumatra Coffee Dark",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "title": "Sumatra Coffee Dark",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "next order #3",
    "note_attributes": null,
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2018-07-01T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2022-11-16T00:00:00",
    "shipping_lines": [],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "QUEUED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 0,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2018-06-09T10:07:52"
  }
}

#Delay an order

POST/orders/{id}/delay
Delay a prepaid Order by one interval
Scopewrite_orders
The id must be for the next queued Order for a prepaid Subscription. The Order will be delayed by one interval, and all subsequent Orders and Charges will be shifted by the same amount.
POST/orders/{id}/delay
curl -X POST 'https://api.rechargeapps.com/orders/70071255/delay' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "address_is_active": 1,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge_id": 97376832,
    "charge_status": "QUEUED",
    "created_at": "2022-02-04T18:19:52",
    "currency": "USD",
    "customer": {
      "accepts_marketing": true,
      "email": "examlpe@email.com",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": null,
      "send_email_welcome": false,
      "verified_email": true
    },
    "customer_id": 4203912,
    "discount_codes": [],
    "email": "examlpe@email.com",
    "first_name": "mike",
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": 1,
    "last_name": "flynn",
    "line_items": [
      {
        "grams": 0,
        "images": {
          "large": "https://cdn.shopify.com/.../Sumatra_Coffee_large.png",
          "medium": "https://cdn.shopify.com/.../Sumatra_Coffee__medium.png",
          "original": "https://cdn.shopify.com/.../Sumatra_Coffee_.png",
          "small": "https://cdn.shopify.com/.../Sumatra_Coffee__small.png"
        },
        "original_price": "0.00",
        "price": "0.00",
        "product_title": "Sumatra Coffee Dark",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          }
        ],
        "quantity": 4,
        "shopify_product_id": 1255183683,
        "shopify_variant_id": 3844924611,
        "sku": "MILK-1",
        "subscription_id": 26375706,
        "title": "Sumatra Coffee Dark",
        "variant_title": "Milk - a / b"
      }
    ],
    "note": "next order #3",
    "note_attributes": null,
    "payment_processor": "stripe",
    "processed_at": null,
    "scheduled_at": "2023-03-07T00:00:00",
    "shipped_date": null,
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country": "United States",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_date": "2023-03-07T00:00:00",
    "shipping_lines": [],
    "shopify_cart_token": "45af6dbe140d8dc1a9b7821ae256cfff",
    "shopify_customer_id": "6454896021",
    "shopify_id": null,
    "shopify_order_id": null,
    "shopify_order_number": null,
    "status": "QUEUED",
    "subtotal_price": 0,
    "tags": "Prepaid, Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.950",
        "rate": 0.0725,
        "title": "CA State Tax"
      },
      {
        "price": "0.335",
        "rate": 0.0225,
        "title": "Los Angeles  County Tax"
      }
    ],
    "total_discounts": 0,
    "total_duties": 0,
    "total_line_items_price": 0,
    "total_price": 0,
    "total_refunds": null,
    "total_tax": 0,
    "total_weight": 0,
    "transaction_id": "ch_1DUDEtJ2zqHvZRd1EQHjapRD",
    "type": "RECURRING",
    "updated_at": "2023-01-17T11:36:08"
  }
}