API
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 the external platform.

40 additions in V2, marked New

Everything marked New also works when you send X-Recharge-Version: 2021-11.

#The order object

Attributes

  • idinteger
    The unique numeric identifier for the order.
  • address_idinteger
    The id of the associated Address within Recharge.
  • The billing address at the time the order was created. See Addresses for detailed address information.
    Show child attributesHide child attributes10
    • address1string
      Line one of the billing address.
    • address2string
      Line two of the billing address.
    • citystring
      The city of the billing address.
    • companystring
      The company name of the billing address.
    • 2-letter country code.
    • The first name of the billing address.
    • last_namestring
      The last name of the billing address.
    • phonestring
      The phone number of the billing address.
    • provincestring
      The name of the province or state associated with the billing address.
    • zipstring
      The zip code or postcode of the address.
  • chargeobject
    An object containing parameters of the Charge.
    Show child attributesHide child attributes42 new
    • idinteger
      The id of the charge associated with this order.
    • An object containing external transaction ids associated with this charge, as they appear in external platforms.
      Show child attributesHide child attributes1
      • The ID of the associated transaction in a payment processor system (like Stripe).
    • payment_processor_namestring · nullableNew
      The name of the payment processor used to process the Charge.
    • statusstring · nullableNew
      The status of the Charge associated with the Order.
  • Details of the access method used by the purchase.
    Show child attributesHide child attributes2
    • The IP address of the buyer as detected in Checkout.
    • The user agent detected during Checkout.
  • errorstring · nullableNew
    The error message recorded when the Order could not be submitted to the external e-commerce platform.
  • An object containing the external order names.
    Show child attributesHide child attributes11 new
    • ecommercestring · nullableNew
      The order name as it appears in the external e-commerce platform, for example #1001.
  • includeobjectNew
    An object containing the related resources requested with the include query parameter.
    Only returned when the include query parameter is passed.
    Show child attributesHide child attributes55 new
    • addressobject · nullableNew
      The Address associated with the Order.
      Only returned when include=address is passed.
    • customerobjectNew
      The Customer associated with the Order.
      Only returned when include=customer is passed.
    • metafieldsarrayNew
      The Metafields associated with the Order.
      Only returned when include=metafields is passed.
    • A list of the modifications made to the line items of the Order.
      Only returned when include=order_modifications is passed.
    • The Subscriptions on the Charge associated with the Order.
      Only returned when include=subscriptions is passed.
  • created_atdatetime
    The date when the order was created.
  • currencystring
    The currency of the payment used to create the order.
  • customerobject
    Object that contains information about the Customer.
    Show child attributesHide child attributes4
    • idinteger
      The ID of the associated customer record.
    • emailstring
      The user email.
    • An object containing customer information associated with this charge.
      Show child attributesHide child attributes1
      • ecommercestring
        The customer ID as it appears in the external e-commerce platform.
    • hashstring
      The hash of the Customer associated with the Charge.
  • discountsarray of objects
    An array of Discounts associated with the Order.
    Show child attributesHide child attributes62 new
    • idinteger
      The ID of the Discount.
    • codestring
      The code of the Discount.
    • valuefloat
      The value of the Discount.
    • The type of the value of the Discount.
      Possible values
      percentagefixed_amountshipping
    • application_methodstring · nullableNew
      How the Discount is applied. Returned as null unless automatic discounts are enabled for the store.
      Possible values
      codeautomatic
      The key is always present; it only has a value for stores with automatic discounts enabled.
    • titlestring · nullableNew
      The title of the Discount. Returned as null unless automatic discounts are enabled for the store.
      The key is always present; it only has a value for stores with automatic discounts enabled.
  • The cart token as it appears in an external system.
  • An object containing external order ids.
    Show child attributesHide child attributes1
    • ecommercestring
      The order ID as it appears in the external e-commerce platform.
  • An object containing the external order numbers.
    Show child attributesHide child attributes1
    • ecommercestring
      The product id as it appears in the external e-commerce platform. The external_product_id of the Product record in Recharge, linking a Plan to a Product.
  • is_prepaidboolean
    A boolean representing if this Order is generated from a prepaid purchase.
  • line_itemsarray of objects
    A list of line_item objects.
    Show child attributesHide child attributes237 new
    • The inventory behavior applied to the line_item when the Order is created in the external e-commerce platform.
      Possible values
      bypassdecrement_ignoring_policydecrement_obeying_policy
    • An object containing the ID of the line_item as it appears in the external system.
      Only returned for stores that have external line item IDs enabled on their account.
      Show child attributesHide child attributes11 new
      • ecommercestring · nullableNew
        The ID of the line_item as it appears in the external e-commerce platform.
        Only returned for stores that have external line item IDs enabled on their account.
    • offer_attributesobject · nullableNew
      An object describing the offer that added the line_item to the Order. Returned as null when the line_item was not added by an offer.
      Show child attributesHide child attributes22 new
      • typestring · nullableNew
        The type of the offer, for example free_gift.
      • sourcestring · nullableNew
        The source of the offer.
    • The Subscription or Onetime ID associated with the line_item.
    • An object containing the associated product ID as it appears in the external system.
      Show child attributesHide child attributes1
      • ecommercestring
        The product id as it appears in the external e-commerce platform. The external_product_id of the Product record in Recharge, linking a Plan to a Product.
    • An object containing the associated variant ID as it appears in the external system.
      Show child attributesHide child attributes1
      • ecommercestring
        The variant id as it appears in the external e-commerce platform. The external_variant_id of the Product record in Recharge, linking a Plan to a Product.
    • gramsinteger
      The weight of the item in grams.
    • handlestring
      A unique, human-friendly string for the Product.
    • imagesobject
      An object containing URLs of the Product image.
      Show child attributesHide child attributes4
      • largestring
        The url where a large image file is located.
      • mediumstring
        The url where a medium image file is located.
      • smallstring
        The url where a small image file is located.
      • originalstring
        The url of the original sized product image.
    • The original price of the line_item without discounts or taxes.
    • propertiesarray of objects
      An array of name value pairs of additional line_item attributes.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The value of the property.
    • An indicator of the type of the purchase item.
      Possible values
      subscriptiononetime
    • quantityinteger
      The quantity of the line_item.
    • skustring
      The SKU (stock keeping unit) of the Product associated with the line_item.
    • tax_duestring
      The total tax due associated with the line_item.
    • tax_linesarray of objects
      an array containing tax_line objects associated with this line_item.
      Show child attributesHide child attributes41 new
      • 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.
      • unit_pricestringNew
        The tax amount per unit of the line_item for the listed jurisdiction. Defaults to 0.00 when not available.
    • taxableboolean
      A boolean indicating if the line_item is taxable or non-taxable.
    • The taxable revenue associated with the line_item.
    • titlestring
      The title of the Product of this line_item.
    • The total price of the line_item including tax.
    • The unit price of the line_item.
    • A boolean indicator if tax is included in the price of an item.
    • The name of a variant of the Product of this line_item.
  • notestring
    Notes associated with the Order.
  • order_attributesarray of objects
    An array of name value pairs of note attributes on the Order.
    Show child attributesHide child attributes2
    • namestring
      The name for the attribute.
    • valuestring
      The value for the associated attribute.
  • processed_atdatetime
    The date time that the associated charge was processed at.
  • scheduled_atdatetime
    The date time of when the associated charge is/was scheduled to process.
  • The shipping address where the order will be shipped. See Addresses for detailed Address information.
    Show child attributesHide child attributes10
    • address1string
      Line one of the billing address.
    • address2string
      Line two of the billing address.
    • citystring
      The city of the billing address.
    • companystring
      The company name of the billing address.
    • 2-letter country code.
    • The first name of the billing address.
    • last_namestring
      The last name of the billing address.
    • phonestring
      The phone number of the billing address.
    • provincestring
      The name of the province or state associated with the billing address.
    • zipstring
      The zip code or postcode of the address.
  • shipping_linesarray of objects
    An array of shipping lines associated with the order.
    Show child attributesHide child attributes6
    • codestring
      The code associated with the shipping_line of a Charge.
    • pricestring
      The price of the shipping_line.
    • sourcestring
      The source of the shipping_line.
    • titlestring
      The title of the shipping_line.
    • taxableboolean
      A boolean indicating if the shipping_line is taxable.
    • tax_linesarray of objects
      An array of tax lines associated with the shipping_line.
      Show child attributesHide child attributes3
      • 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.
  • statusstring
    The status of creating the Order.
    Possible values
    queuedsuccesserrorcancelledskippedpending_fraudpending_charge_statusmerged
  • The subtotal price (sum of all line items * their quantity) of the order less discounts.
  • tagsstring
    A comma separated list of tags on the Order.
  • tax_linesarray of objects
    An array of tax lines that apply to the Order.
    Show child attributesHide child attributes3
    • 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.
  • taxableboolean
    A boolean indicator of the taxability of the Order.
  • The total discounted dollar value of the Order.
  • The total cost of duties for the order.
  • The total price of all line items of the Order.
  • The total amount due of the Order.
  • The total dollar amount of refunds associated with the Order.
  • total_taxstring
    The total tax due associated with the Order.
  • The total weight of the order in grams.
  • typestring
    An indicator of the order’s type.
    Possible values
    checkoutrecurring
  • updated_atdatetime
    The date time at which the order was most recently updated.
The order object
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "billing_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country_code": "US",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "charge": {
      "id": 97376832,
      "external_transaction_id": {
        "payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
      },
      "payment_processor_name": "stripe",
      "status": "success"
    },
    "client_details": {
      "browser_ip": "192.168.0.1",
      "user_agent": "safari webkit"
    },
    "created_at": "2018-11-08T08:08:09+00:00",
    "currency": "usd",
    "customer": {
      "id": 12354,
      "email": "example@email.com",
      "external_customer_id": {
        "ecommerce": "382028302"
      },
      "hash": "7e706455cbd13e40"
    },
    "discounts": [
      {
        "id": 123456,
        "code": "TESTCODE10",
        "value": "10.00",
        "value_type": "fixed_amount"
      }
    ],
    "error": null,
    "external_cart_token": "aeic8101918fs0f8810",
    "external_order_id": {
      "ecommerce": "123496878536413"
    },
    "external_order_name": {
      "ecommerce": "#125"
    },
    "external_order_number": {
      "ecommerce": "125"
    },
    "hash": "42039120ee0e6cfa5c97805",
    "is_prepaid": false,
    "line_items": [
      {
        "offer_attributes": null,
        "purchase_item_id": 365974856,
        "external_inventory_policy": "decrement_obeying_policy",
        "external_product_id": {
          "ecommerce": "456123789"
        },
        "external_variant_id": {
          "ecommerce": "4569876413"
        },
        "grams": 454,
        "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": "10.00",
        "properties": [
          {
            "name": "grind",
            "value": "drip"
          },
          {
            "name": "size",
            "value": "medium"
          }
        ],
        "purchase_item_type": "subscription",
        "quantity": 4,
        "sku": "TOM0001",
        "tax_due": "3.80",
        "tax_lines": [
          {
            "price": "0.993",
            "rate": "0.0725",
            "unit_price": "0.331",
            "title": "CA State Tax"
          },
          {
            "price": "0.308",
            "rate": "0.0225",
            "unit_price": "0.102",
            "title": "LA County Tax"
          }
        ],
        "taxable": true,
        "taxable_amount": "10.00",
        "title": "Shirt bundle",
        "total_price": "43.80",
        "unit_price": "10.00",
        "unit_price_includes_tax": false,
        "variant_title": "Blue t-shirts"
      }
    ],
    "note": "next order #3   - Subscription Recurring Order",
    "order_attributes": [
      {
        "name": "subscription_cycle_count_min",
        "value": "3"
      }
    ],
    "processed_at": null,
    "scheduled_at": "2022-11-16T00:00:00+00:00",
    "shipping_address": {
      "address1": "1933 Manning",
      "address2": "204",
      "city": "los angeles",
      "company": "bootstrap",
      "country_code": "US",
      "first_name": "mike",
      "last_name": "flynn",
      "phone": "3103103101",
      "province": "California",
      "zip": "90025"
    },
    "shipping_lines": [
      {
        "code": "Standard Shipping",
        "price": "4.90",
        "taxable": true,
        "tax_lines": [
          {
            "price": "0.360",
            "rate": "0.0725",
            "title": "CA State Tax"
          },
          {
            "price": "0.110",
            "rate": "0.0225",
            "title": "LA County Tax"
          }
        ],
        "title": "Standard Shipping"
      }
    ],
    "status": "cancelled",
    "subtotal_price": "40.00",
    "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"
      }
    ],
    "taxable": true,
    "total_discounts": "10.00",
    "total_duties": "0.0",
    "total_line_items_price": "40.00",
    "total_price": "38.22",
    "total_refunds": "0.00",
    "total_tax": "3.32",
    "total_weight_grams": 454,
    "type": "recurring",
    "updated_at": "2020-12-20T13:25:52+00:00"
  }
}

#Retrieve an order

GET/orders/{id}
Retrieve one Order using the Recharge order_id.
Scoperead_orders

Query parameters

  • includestringNew
    A comma-separated list of related resources to return in the include object of the Order. Each value other than metafields requires the matching read scope on the token: read_customers for address and customer, read_subscriptions for subscriptions, read_orders for order_modifications.
    Possible values
    addresscustomermetafieldsorder_modificationssubscriptions
GET/orders/{id}
curl 'https://api.rechargeapps.com/orders/70071255' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "order": {
    "id": 210987092,
    "address_id": 42171447,
    "billing_address": {
      "address1": "601 SW Washing St.",
      "address2": "",
      "city": "Portland",
      "company": "Fake Company Billing",
      "country_code": "US",
      "first_name": "Fake Billing First",
      "last_name": "Fake Billing Last",
      "phone": "888-888-8888",
      "province": "Oregon",
      "zip": "97205"
    },
    "charge": {
      "id": 272382456,
      "external_transaction_id": {
        "payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
      },
      "payment_processor_name": "stripe",
      "status": "success"
    },
    "client_details": {
      "browser_ip": "192.168.0.1",
      "user_agent": "safari webkit"
    },
    "created_at": "2020-12-17T18:50:25+00:00",
    "currency": "usd",
    "customer": {
      "id": 37657002,
      "email": "test@test.com",
      "external_customer_id": {
        "ecommerce": "382028302"
      },
      "hash": "7e706455cbd13e40"
    },
    "discounts": [
      {
        "id": 12345,
        "code": "TESTCODE10",
        "value": 10,
        "value_type": "fixed_amount"
      }
    ],
    "error": null,
    "external_cart_token": "aeic8101918fs0f8810",
    "external_order_id": {
      "ecommerce": "27117383938"
    },
    "external_order_name": {
      "ecommerce": "#1938"
    },
    "external_order_number": {
      "ecommerce": "1938"
    },
    "is_prepaid": false,
    "line_items": [
      {
        "offer_attributes": null,
        "purchase_item_id": 63898947,
        "external_inventory_policy": "decrement_obeying_policy",
        "external_product_id": {
          "ecommerce": "4381728735283"
        },
        "external_variant_id": {
          "ecommerce": "999999999999"
        },
        "grams": 454,
        "images": {
          "large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
          "medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
          "original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
          "small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
        },
        "original_price": "10.00",
        "properties": [
          {
            "name": "Color",
            "value": "Blue"
          }
        ],
        "purchase_item_type": "subscription",
        "quantity": 1,
        "sku": "TOM0001",
        "tax_lines": [
          {
            "price": "0.993",
            "rate": "0.0725",
            "title": "CA State Tax",
            "unit_price": "0.331"
          },
          {
            "price": "0.308",
            "rate": "0.0225",
            "title": "LA County Tax",
            "unit_price": "0.102"
          }
        ],
        "taxable": true,
        "taxable_amount": "10.00",
        "tax_due": "1.30",
        "title": "Shirt bundle",
        "total_price": "11.30",
        "unit_price": "10.00",
        "unit_price_includes_tax": false,
        "variant_title": "Blue t-shirts"
      }
    ],
    "note": "next order in sequence 3",
    "order_attributes": [
      {
        "name": "subscription_cycle_count_min",
        "value": "3"
      }
    ],
    "processed_at": "2020-12-17T18:50:27+00:00",
    "scheduled_at": "2020-12-17T18:50:27+00:00",
    "shipping_address": {
      "address1": "1030 Barnum Ave",
      "address2": "Suite 101",
      "city": "Stratford",
      "company": "Fake Company",
      "country_code": "US",
      "first_name": "Fake First",
      "last_name": "Fake Last",
      "phone": "999-999-9999",
      "province": "Connecticut",
      "zip": "06614"
    },
    "shipping_lines": [
      {
        "code": "Standard",
        "price": "4.90",
        "taxable": true,
        "tax_lines": [
          {
            "price": "0.355",
            "rate": "0.0725",
            "title": "CA State Tax"
          },
          {
            "price": "0.110",
            "rate": "0.0225",
            "title": "Los Angeles County Tax"
          }
        ],
        "title": "Standard"
      }
    ],
    "status": "success",
    "subtotal_price": "10.00",
    "tags": "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"
      }
    ],
    "taxable": true,
    "total_discounts": "10.00",
    "total_duties": "0.0",
    "total_line_items_price": "10.00",
    "total_price": "14.90",
    "total_refunds": "0.00",
    "total_tax": "10.00",
    "total_weight_grams": 454,
    "type": "recurring",
    "updated_at": "2020-12-17T18:50:27+00:00"
  }
}

#Clone an order

POST/orders/{id}/clone
You may add additional Orders onto a success Charge if it has existing prepaid Orders by cloning an existing Order.
Scopewrite_orders
Only orders with a status of success or queued can be cloned. The cloned Order is created as a queued prepaid order.

Query parameters

  • force_updatebooleanNew
    By default the Charge used for the clone must have a status of success. Pass true to also allow a Charge with a status of refunded, partially_refunded or cancelled.

Body parameters

  • scheduled_atdatetimeRequired
    Date in future when this order will be sent.
  • charge_idintegerNew
    The ID of the Charge the cloned Order is associated with. Defaults to the Charge of the original Order.
  • typestringNew
    Limits the items copied to the cloned Order. Pass subscriptions to copy only subscription items or onetimes to copy only one-time items. When omitted, all items are copied.
    Possible values
    subscriptionsonetimes
POST/orders/{id}/clone
curl -X POST 'https://api.rechargeapps.com/orders/70071255/clone' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "scheduled_at": "2022-11-16"
}'
Response
{
  "order": {
    "id": 210987092,
    "address_id": 42171447,
    "billing_address": {
      "address1": "601 SW Washing St.",
      "address2": "",
      "city": "Portland",
      "company": "Fake Company Billing",
      "country_code": "US",
      "first_name": "Fake Billing First",
      "last_name": "Fake Billing Last",
      "phone": "888-888-8888",
      "province": "Oregon",
      "zip": "97205"
    },
    "charge": {
      "id": 272382456,
      "external_transaction_id": {
        "payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
      },
      "payment_processor_name": "stripe",
      "status": "success"
    },
    "client_details": {
      "browser_ip": "192.168.0.1",
      "user_agent": "safari webkit"
    },
    "created_at": "2020-12-17T18:50:25+00:00",
    "currency": "usd",
    "customer": {
      "id": 37657002,
      "email": "test@test.com",
      "external_customer_id": {
        "ecommerce": "382028302"
      },
      "hash": "7e706455cbd13e40"
    },
    "discounts": [
      {
        "id": 12345,
        "code": "TESTCODE10",
        "value": 10,
        "value_type": "fixed_amount"
      }
    ],
    "error": null,
    "external_cart_token": "aeic8101918fs0f8810",
    "external_order_id": {
      "ecommerce": "27117383938"
    },
    "external_order_name": {
      "ecommerce": "#1938"
    },
    "external_order_number": {
      "ecommerce": "1938"
    },
    "is_prepaid": false,
    "line_items": [
      {
        "offer_attributes": null,
        "purchase_item_id": 63898947,
        "external_inventory_policy": "decrement_obeying_policy",
        "external_product_id": {
          "ecommerce": "4381728735283"
        },
        "external_variant_id": {
          "ecommerce": "999999999999"
        },
        "grams": 454,
        "images": {
          "large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
          "medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
          "original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
          "small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
        },
        "original_price": "10.00",
        "properties": [
          {
            "name": "Color",
            "value": "Blue"
          }
        ],
        "purchase_item_type": "subscription",
        "quantity": 1,
        "sku": "TOM0001",
        "tax_lines": [
          {
            "price": "0.993",
            "rate": "0.0725",
            "title": "CA State Tax",
            "unit_price": "0.331"
          },
          {
            "price": "0.308",
            "rate": "0.0225",
            "title": "LA County Tax",
            "unit_price": "0.102"
          }
        ],
        "taxable": true,
        "taxable_amount": "10.00",
        "tax_due": "1.30",
        "title": "Shirt bundle",
        "total_price": "11.30",
        "unit_price": "10.00",
        "unit_price_includes_tax": false,
        "variant_title": "Blue t-shirts"
      }
    ],
    "note": "next order in sequence 3",
    "order_attributes": [
      {
        "name": "subscription_cycle_count_min",
        "value": "3"
      }
    ],
    "processed_at": "2020-12-17T18:50:27+00:00",
    "scheduled_at": "2020-12-17T18:50:27+00:00",
    "shipping_address": {
      "address1": "1030 Barnum Ave",
      "address2": "Suite 101",
      "city": "Stratford",
      "company": "Fake Company",
      "country_code": "US",
      "first_name": "Fake First",
      "last_name": "Fake Last",
      "phone": "999-999-9999",
      "province": "Connecticut",
      "zip": "06614"
    },
    "shipping_lines": [
      {
        "code": "Standard",
        "price": "4.90",
        "taxable": true,
        "tax_lines": [
          {
            "price": "0.355",
            "rate": "0.0725",
            "title": "CA State Tax"
          },
          {
            "price": "0.110",
            "rate": "0.0225",
            "title": "Los Angeles County Tax"
          }
        ],
        "title": "Standard"
      }
    ],
    "status": "success",
    "subtotal_price": "10.00",
    "tags": "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"
      }
    ],
    "taxable": true,
    "total_discounts": "10.00",
    "total_duties": "0.0",
    "total_line_items_price": "10.00",
    "total_price": "14.90",
    "total_refunds": "0.00",
    "total_tax": "10.00",
    "total_weight_grams": 454,
    "type": "recurring",
    "updated_at": "2020-12-17T18:50:27+00:00"
  }
}

#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.

Only queued prepaid orders can be delayed, and every prepaid item in the Order must share the same charge and shipping interval. The Order and all later queued orders of the same Charge move forward by one shipping interval, as does the next queued Charge. No request body is required.
POST/orders/{id}/delay
curl -X POST 'https://api.rechargeapps.com/orders/70071255/delay' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "order": {
    "id": 70071255,
    "address_id": 4029306,
    "created_at": "2022-02-04T23:19:52+00:00",
    "currency": "usd",
    "discounts": [],
    "error": null,
    "external_cart_token": null,
    "external_order_name": {
      "ecommerce": null
    },
    "is_prepaid": true,
    "line_items": [
      {
        "offer_attributes": null,
        "purchase_item_id": 63898947,
        "external_inventory_policy": "decrement_obeying_policy",
        "external_product_id": {
          "ecommerce": "4381728735283"
        },
        "external_variant_id": {
          "ecommerce": "999999999999"
        },
        "grams": 454,
        "images": {
          "large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
          "medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
          "original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
          "small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
        },
        "original_price": "10.00",
        "properties": [
          {
            "name": "Color",
            "value": "Blue"
          }
        ],
        "purchase_item_type": "subscription",
        "quantity": 1,
        "sku": "TOM0001",
        "tax_lines": [
          {
            "price": "0.993",
            "rate": "0.0725",
            "title": "CA State Tax",
            "unit_price": "0.331"
          },
          {
            "price": "0.308",
            "rate": "0.0225",
            "title": "LA County Tax",
            "unit_price": "0.102"
          }
        ],
        "taxable": true,
        "taxable_amount": "10.00",
        "tax_due": "1.30",
        "title": "Shirt bundle",
        "total_price": "11.30",
        "unit_price": "10.00",
        "unit_price_includes_tax": false,
        "variant_title": "Blue t-shirts"
      }
    ],
    "note": null,
    "order_attributes": [],
    "processed_at": null,
    "scheduled_at": "2023-02-07T05:00:00+00:00",
    "shipping_lines": [
      {
        "code": "Standard",
        "price": "4.90",
        "taxable": true,
        "tax_lines": [
          {
            "price": "0.355",
            "rate": "0.0725",
            "title": "CA State Tax"
          },
          {
            "price": "0.110",
            "rate": "0.0225",
            "title": "Los Angeles County Tax"
          }
        ],
        "title": "Standard"
      }
    ],
    "status": "queued",
    "subtotal_price": "10.00",
    "tags": "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"
      }
    ],
    "taxable": true,
    "total_discounts": "0.00",
    "total_duties": "0.0",
    "total_line_items_price": "10.00",
    "total_price": "14.90",
    "total_refunds": "0.00",
    "total_tax": "10.00",
    "total_weight_grams": 454,
    "type": "recurring",
    "updated_at": "2023-01-05T22:11:46+00:00"
  }
}

#Update an order

PUT/orders/{id}
Updating existing Order using the order_id.
Scopewrite_orders
Only queued and error orders can be updated; on a success order only external_order_id and external_order_number can be set. When line_items is passed it replaces all line items of the Order, and each item must include quantity, external_product_id and external_variant_id. Passing status as cancelled cancels a queued order.

Body parameters

  • Billing address details.
    Show child attributesHide child attributes10
    • address1string
      Line one of the billing address.
    • address2string
      Line two of the billing address.
    • citystring
      The city of the billing address.
    • companystring
      The company name of the billing address.
    • 2-letter country code.
    • The first name of the billing address.
    • last_namestring
      The last name of the billing address.
    • phonestring
      The phone number of the billing address.
    • provincestring
      The name of the province or state associated with the billing address.
    • zipstring
      The zip code or postcode of the address.
  • customerobject
    The key values related with customer.
    Show child attributesHide child attributes1
    • emailstring
      The user email.
  • line_itemsarray of objects
    Line item properties can be updated on Prepaid Queued Orders. To change Queued Charges you must change the parent subscription(s) or address.
    Important: When updating line_items, you must provide the entire json block that was in line_items before, as the data provided overrides the entire block and only new parameters will remain.
    Show child attributesHide child attributes10
    • The Subscription or Onetime ID associated with the line_item. By default this value is ignored and the line_item is linked to the active Subscription on the same Address that has the same external variant ID.
    • external_product_idobjectRequired
      An object containing the associated product ID as it appears in the external system.
      Show child attributesHide child attributes1
      • ecommercestring
        The product id as it appears in the external e-commerce platform. The external_product_id of the Product record in Recharge, linking a Plan to a Product.
    • external_variant_idobjectRequired
      An object containing the associated variant ID as it appears in the external system.
      Show child attributesHide child attributes1
      • ecommercestring
        The variant id as it appears in the external e-commerce platform. The external_variant_id of the Product record in Recharge, linking a Plan to a Product.
    • gramsinteger
      The weight of the item in grams.
    • propertiesarray of objects
      An array of name value pairs of additional line_item attributes.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The value of the property.
    • quantityintegerRequired
      The quantity of the line_item.
    • skustring
      The SKU (stock keeping unit) of the Product associated with the line_item.
    • titlestring
      The title of the Product of this line_item.
    • The unit price of the line_item.
    • The name of a variant of the Product of this line_item.
  • An object containing external order ids.
    Show child attributesHide child attributes1
    • ecommercestring
      The order ID as it appears in the external e-commerce platform.
  • scheduled_atdatetime
    The date when the order will be shipped.
  • Shipping address details.
    Show child attributesHide child attributes10
    • address1string
      Line one of the billing address.
    • address2string
      Line two of the billing address.
    • citystring
      The city of the billing address.
    • companystring
      The company name of the billing address.
    • 2-letter country code.
    • The first name of the billing address.
    • last_namestring
      The last name of the billing address.
    • phonestring
      The phone number of the billing address.
    • provincestring
      The name of the province or state associated with the billing address.
    • zipstring
      The zip code or postcode of the address.
  • statusstring
    The status of the order
    Possible values
    cancelled
  • An object containing the external order numbers.
    Show child attributesHide child attributes11 new
    • ecommercestringNew
      The order number as it appears in the external e-commerce platform.
  • order_attributesarray of objectsNew
    An array of name value pairs of note attributes on the Order. Replaces the existing attributes.
    Show child attributesHide child attributes22 new
    • namestringNew
      The name for the attribute.
    • valuestringNew
      The value for the associated attribute.
PUT/orders/{id}
curl -X PUT 'https://api.rechargeapps.com/orders/70071255' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Version: v2' \
  -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": 210987092,
    "address_id": 42171447,
    "billing_address": {
      "address1": "601 SW Washing St.",
      "address2": "",
      "city": "Portland",
      "company": "Fake Company Billing",
      "country_code": "US",
      "first_name": "Fake Billing First",
      "last_name": "Fake Billing Last",
      "phone": "888-888-8888",
      "province": "Oregon",
      "zip": "97205"
    },
    "charge": {
      "id": 272382456,
      "external_transaction_id": {
        "payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
      },
      "payment_processor_name": "stripe",
      "status": "success"
    },
    "client_details": {
      "browser_ip": "192.168.0.1",
      "user_agent": "safari webkit"
    },
    "created_at": "2020-12-17T18:50:25+00:00",
    "currency": "usd",
    "customer": {
      "id": 37657002,
      "email": "test@test.com",
      "external_customer_id": {
        "ecommerce": "382028302"
      },
      "hash": "7e706455cbd13e40"
    },
    "discounts": [
      {
        "id": 12345,
        "code": "TESTCODE10",
        "value": 10,
        "value_type": "fixed_amount"
      }
    ],
    "error": null,
    "external_cart_token": "aeic8101918fs0f8810",
    "external_order_id": {
      "ecommerce": "27117383938"
    },
    "external_order_name": {
      "ecommerce": "#1938"
    },
    "external_order_number": {
      "ecommerce": "1938"
    },
    "is_prepaid": false,
    "line_items": [
      {
        "offer_attributes": null,
        "purchase_item_id": 63898947,
        "external_inventory_policy": "decrement_obeying_policy",
        "external_product_id": {
          "ecommerce": "4381728735283"
        },
        "external_variant_id": {
          "ecommerce": "999999999999"
        },
        "grams": 454,
        "images": {
          "large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
          "medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
          "original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
          "small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
        },
        "original_price": "10.00",
        "properties": [
          {
            "name": "Color",
            "value": "Blue"
          }
        ],
        "purchase_item_type": "subscription",
        "quantity": 1,
        "sku": "TOM0001",
        "tax_lines": [
          {
            "price": "0.725",
            "rate": "0.0725",
            "title": "CA State Tax",
            "unit_price": "0.331"
          },
          {
            "price": "0.225",
            "rate": "0.0225",
            "title": "LA County Tax",
            "unit_price": "0.102"
          }
        ],
        "taxable": true,
        "taxable_amount": "10.00",
        "tax_due": "0.95",
        "title": "Shirt bundle",
        "total_price": "10.95",
        "unit_price": "10.00",
        "unit_price_includes_tax": false,
        "variant_title": "Blue t-shirts"
      }
    ],
    "note": "next order in sequence 3",
    "order_attributes": [
      {
        "name": "subscription_cycle_count_min",
        "value": "3"
      }
    ],
    "processed_at": "2020-12-17T18:50:27+00:00",
    "scheduled_at": "2020-12-17T18:50:27+00:00",
    "shipping_address": {
      "address1": "1030 Barnum Ave",
      "address2": "Suite 101",
      "city": "Stratford",
      "company": "Fake Company",
      "country_code": "US",
      "first_name": "Fake First",
      "last_name": "Fake Last",
      "phone": "999-999-9999",
      "province": "Connecticut",
      "zip": "06614"
    },
    "shipping_lines": [
      {
        "code": "Standard",
        "price": "4.90",
        "taxable": true,
        "tax_lines": [
          {
            "price": "0.355",
            "rate": "0.0725",
            "title": "CA State Tax"
          },
          {
            "price": "0.110",
            "rate": "0.0225",
            "title": "Los Angeles County Tax"
          }
        ],
        "title": "Standard"
      }
    ],
    "status": "success",
    "subtotal_price": "10.00",
    "tags": "Subscription, Subscription Recurring Order",
    "tax_lines": [
      {
        "price": "0.355",
        "rate": "0.0725",
        "title": "CA State Tax"
      },
      {
        "price": "0.110",
        "rate": "0.0225",
        "title": "Los Angeles  County Tax"
      }
    ],
    "taxable": true,
    "total_discounts": "10.00",
    "total_line_items_price": "10.00",
    "total_price": "5.37",
    "total_refunds": "0.00",
    "total_tax": "0.47",
    "total_weight_grams": 454,
    "type": "recurring",
    "updated_at": "2020-12-17T18:50:27+00:00"
  }
}

#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-Version: v2' \
  -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
The response also contains next_cursor and previous_cursor. Requests for a page above 100 return a 422; use cursor pagination instead.

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.
  • cursorstringNew
    The cursor returned in next_cursor or previous_cursor of a previous response. When a cursor is passed, limit is the only other parameter that can be passed with it.
  • Filter orders by the email of the Customer.
  • Filter orders by customer.
    GET /orders/?customer_id=123 will return all orders for the given customer_id
  • Filter orders by external_customer_id.
  • Filter orders by external_order_id.
  • Filter orders by external_order_id. Accepts a comma-separated list of up to 100 values.
  • Filter orders by the order number as it appears in the external e-commerce platform.
  • Filter orders that contain any of the given external product IDs. If passing multiple values, must be comma separated.
  • Filter orders that contain any of the given external variant IDs. If passing multiple values, must be comma separated.
  • idsstring
    Filter orders by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
  • includestringNew
    A comma-separated list of related resources to return in the include object of each Order. Each value other than metafields requires the matching read scope on the token: read_customers for address and customer, read_subscriptions for subscriptions, read_orders for order_modifications.
    Possible values
    addresscustomermetafieldsorder_modificationssubscriptions
  • is_prepaidbooleanNew
    Pass true to return only orders generated from a prepaid purchase. Passing false does not filter the results.
  • limitstring
    The number of results.
    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.
  • processed_at_maxdatetimeNew
    Show orders processed before the given date.
  • processed_at_mindatetimeNew
    Show orders processed after the given date.
  • Show orders scheduled before the given date.
  • Show orders scheduled after the given date.
  • Filter orders with/without external_order_id.
  • sort_bystringNew
    Sort the results. Default is id-desc.
    Possible values
    id-ascid-descupdated_at-ascupdated_at-descprocessed_at-ascprocessed_at-descscheduled_at-ascscheduled_at-desc
  • statusstring
    Filter orders by status.
    Possible values
    cancellederrorpending_charge_statuspending_fraudqueuedskippedsuccess
  • typestring
    Filter orders by type.
    Possible values
    checkoutrecurring
    GET /api/orders/?type=recurring will return all orders for the given type.
  • Filter orders by subscription or onetime.
  • 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-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "next": "next_cursor",
  "previous": "previous_cursor",
  "orders": [
    {
      "id": 210987092,
      "address_id": 42171447,
      "billing_address": {
        "address1": "601 SW Washing St.",
        "address2": "",
        "city": "Portland",
        "company": "Fake Company Billing",
        "country_code": "US",
        "first_name": "Fake Billing First",
        "last_name": "Fake Billing Last",
        "phone": "888-888-8888",
        "province": "Oregon",
        "zip": "97205"
      },
      "charge": {
        "id": 272382456,
        "external_transaction_id": {
          "payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
        },
        "payment_processor_name": "stripe",
        "status": "success"
      },
      "client_details": {
        "browser_ip": "192.168.0.1",
        "user_agent": "safari webkit"
      },
      "created_at": "2020-12-17T18:50:25+00:00",
      "currency": "usd",
      "customer": {
        "id": 37657002,
        "email": "test@test.com",
        "external_customer_id": {
          "ecommerce": "382028302"
        },
        "hash": "7e706455cbd13e40"
      },
      "discounts": [
        {
          "id": 12345,
          "code": "TESTCODE10",
          "value": 10,
          "value_type": "fixed_amount"
        }
      ],
      "error": null,
      "external_cart_token": "aeic8101918fs0f8810",
      "external_order_id": {
        "ecommerce": "27117383938"
      },
      "external_order_name": {
        "ecommerce": "#1938"
      },
      "external_order_number": {
        "ecommerce": "1938"
      },
      "is_prepaid": false,
      "line_items": [
        {
          "offer_attributes": null,
          "purchase_item_id": 63898947,
          "external_inventory_policy": "decrement_obeying_policy",
          "external_product_id": {
            "ecommerce": "4381728735283"
          },
          "external_variant_id": {
            "ecommerce": "999999999999"
          },
          "grams": 454,
          "images": {
            "large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
            "medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
            "original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
            "small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
          },
          "original_price": "10.00",
          "properties": [
            {
              "name": "Color",
              "value": "Blue"
            }
          ],
          "purchase_item_type": "subscription",
          "quantity": 1,
          "sku": "TOM0001",
          "tax_lines": [
            {
              "price": "0.993",
              "rate": "0.0725",
              "title": "CA State Tax",
              "unit_price": "0.331"
            },
            {
              "price": "0.308",
              "rate": "0.0225",
              "title": "LA County Tax",
              "unit_price": "0.102"
            }
          ],
          "taxable": true,
          "taxable_amount": "10.00",
          "tax_due": "1.30",
          "title": "Shirt bundle",
          "total_price": "11.30",
          "unit_price": "10.00",
          "unit_price_includes_tax": false,
          "variant_title": "Blue t-shirts"
        }
      ],
      "note": "next order in sequence 3",
      "order_attributes": [
        {
          "name": "subscription_cycle_count_min",
          "value": "3"
        }
      ],
      "processed_at": "2020-12-17T18:50:27+00:00",
      "scheduled_at": "2020-12-17T18:50:27+00:00",
      "shipping_address": {
        "address1": "1030 Barnum Ave",
        "address2": "Suite 101",
        "city": "Stratford",
        "company": "Fake Company",
        "country_code": "US",
        "first_name": "Fake First",
        "last_name": "Fake Last",
        "phone": "999-999-9999",
        "province": "Connecticut",
        "zip": "06614"
      },
      "shipping_lines": [
        {
          "code": "Standard",
          "price": "4.90",
          "taxable": true,
          "tax_lines": [
            {
              "price": "0.355",
              "rate": "0.0725",
              "title": "CA State Tax"
            },
            {
              "price": "0.110",
              "rate": "0.0225",
              "title": "Los Angeles County Tax"
            }
          ],
          "title": "Standard"
        }
      ],
      "status": "success",
      "subtotal_price": "10.00",
      "tags": "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"
        }
      ],
      "taxable": true,
      "total_discounts": "10.00",
      "total_duties": "0.0",
      "total_line_items_price": "10.00",
      "total_price": "14.90",
      "total_refunds": "0.00",
      "total_tax": "10.00",
      "total_weight_grams": 454,
      "type": "recurring",
      "updated_at": "2020-12-17T18:50:27+00:00"
    }
  ]
}