API Reference

An order is a subscriber's request to subscribe to one or more products from a shop.

🔒 Requires read-orders or write-orders and read-customers or write-customers access scope.


The order's object

{
    "id": 5985083031826,
    "name": "1414",
    "email": "[email protected]",
    "phone": "+12025550151",
    "subscriber": {
        "id": "6964807663890",
        "email": "[email protected]",
        "first_name": "cheetos",
        "last_name": "c",
        "phone": "+12025550151",
        "total_spent": 1200,
        "note": "Hello merchant!",
        "addresses": [{
            "first_name": "Cheetos",
            "last_name": "C",
            "email": "[email protected]",
            "phone": "+12025550151",
            "address1": "17718 Sherman Way",
            "address2": null,
            "company": null,
            "city": "Los Angeles",
            "zip": "91335",
            "province": "California",
            "country": "United States"
        }],
        "default_address": {
            "first_name": "Cheetos",
            "last_name": "C",
            "email": "[email protected]",
            "phone": "+12025550151",
            "address1": "17718 Sherman Way",
            "address2": null,
            "company": null,
            "city": "Los Angeles",
            "zip": "91335",
            "province": "California",
            "country": "United States"
        },
        "channel": "ecommerce",
        "meta": [],
        "created_at": "2023-06-05 17:26:16",
        "updated_at": "2024-07-04 14:23:24"
    },
    "cart_token": null,
    "checkout_token": null,
    "line_items": [{
        "id": 15172331045138,
        "price": "2500.00",
        "product_id": 8441674629394,
        "quantity": 1,
        "requires_shipping": true,
        "sku": null,
        "title": "Amorearth Desi Gir Cow A2 Cultured Ghee",
        "variant_id": 45703992639762,
        "variant_title": "250 / Standard",
        "vendor": "Developer-Recurpay",
        "name": "Amorearth Desi Gir Cow A2 Cultured Ghee - 250 / Standard",
        "price_set": {
            "shop_money": {
                "amount": "2500.00",
                "currency_code": "USD"
            },
            "presentment_money": {
                "amount": "2500.00",
                "currency_code": "USD"
            }
        },
        "properties": [{
            "name": "_recurpay_line_id",
            "value": "41"
        }],
        "taxable": true,
        "tax_lines": [{
                "channel_liable": false,
                "price": "150.00",
                "price_set": {
                    "shop_money": {
                        "amount": "150.00",
                        "currency_code": "USD"
                    },
                    "presentment_money": {
                        "amount": "150.00",
                        "currency_code": "USD"
                    }
                },
                "rate": 0.05,
                "title": "California State Tax"
            },
            {
                "channel_liable": false,
                "price": "6.25",
                "price_set": {
                    "shop_money": {
                        "amount": "6.25",
                        "currency_code": "USD"
                    },
                    "presentment_money": {
                        "amount": "6.25",
                        "currency_code": "USD"
                    }
                },
                "rate": 0.00,
                "title": "Los Angeles County Tax"
            },
            {
                "channel_liable": false,
                "price": "56.25",
                "price_set": {
                    "shop_money": {
                        "amount": "56.25",
                        "currency_code": "USD"
                    },
                    "presentment_money": {
                        "amount": "56.25",
                        "currency_code": "USD"
                    }
                },
                "rate": 0.02,
                "title": "Los Angeles County District Tax Sp"
            },
            {
                "channel_liable": false,
                "price": "25.00",
                "price_set": {
                    "shop_money": {
                        "amount": "25.00",
                        "currency_code": "USD"
                    },
                    "presentment_money": {
                        "amount": "25.00",
                        "currency_code": "USD"
                    }
                },
                "rate": 0.01,
                "title": "Los Angeles Co Local Tax Sl"
            }
        ],
        "total_discount": "0.00",
        "total_discount_set": {
            "shop_money": {
                "amount": "0.00",
                "currency_code": "USD"
            },
            "presentment_money": {
                "amount": "0.00",
                "currency_code": "USD"
            }
        },
        "discount_allocations": []
    }],
    "note": "hiiii",
    "note_attributes": [{
            "name": "_recurpay_plan_discount",
            "value": "0"
        },
        {
            "name": "_recurpay_bot_discount",
            "value": "0"
        },
        {
            "name": "_delivery_frequency",
            "value": "1 month"
        },
        {
            "name": "_billing_frequency",
            "value": "1 month"
        },
        {
            "name": "_renewal_order",
            "value": "This is 6th order of subscription 41"
        }
    ],
    "tags": "",
    "shipping_address": {
        "first_name": "Cheetos",
        "last_name": "C",
        "email": "[email protected]",
        "phone": "+12025550151",
        "address1": "17718 Sherman Way",
        "address2": null,
        "company": null,
        "city": "Los Angeles",
        "zip": "91335",
        "province": "California",
        "country": "United States"
    },
    "billing_address": {
        "first_name": "Cheetos",
        "last_name": "C",
        "email": "[email protected]",
        "phone": "+12025550151",
        "address1": "17718 Sherman Way",
        "address2": null,
        "company": null,
        "city": "Los Angeles",
        "zip": "91335",
        "province": "California",
        "country": "United States"
    },
    "shipping_lines": [{
        "price": "5.00",
        "price_set": {
            "shop_money": {
                "amount": "5.00",
                "currency_code": "USD"
            },
            "presentment_money": {
                "amount": "5.00",
                "currency_code": "USD"
            }
        },
        "title": "Standard Shipping"
    }],
    "currency": "USD",
    "subtotal_price": 2500,
    "subtotal_price_set": {
        "shop_money": {
            "amount": 2500,
            "currency_code": "USD"
        },
        "presentment_money": {
            "amount": 2500,
            "currency_code": "USD"
        }
    },
    "total_discounts": 0,
    "total_discounts_set": {
        "shop_money": {
            "amount": 0,
            "currency_code": "USD"
        },
        "presentment_money": {
            "amount": 0,
            "currency_code": "USD"
        }
    },
    "total_tax": 237.5,
    "total_tax_set": {
        "shop_money": {
            "amount": 237.5,
            "currency_code": "USD"
        },
        "presentment_money": {
            "amount": 237.5,
            "currency_code": "USD"
        }
    },
    "total_shipping": 5,
    "total_shipping_set": {
        "shop_money": {
            "amount": 5,
            "currency_code": "USD"
        },
        "presentment_money": {
            "amount": 5,
            "currency_code": "USD"
        }
    },
    "total_price": 2742.5,
    "total_price_set": {
        "shop_money": {
            "amount": 2742.5,
            "currency_code": "USD"
        },
        "presentment_money": {
            "amount": 2742.5,
            "currency_code": "USD"
        }
    },
    "gateway": "shopify_payments",
    "financial_status": "authorized",
    "fulfillment_status": "created",
    "created_at": "2024-07-03 15:32:11",
    "updated_at": "2024-07-03 15:32:22"
}

The order resource

AttributeTypeDescription
idintegerreadonlyAn unsigned 64-bit integer that's used as a unique identifier for the order. Each id is unique across the Recurpay system. No two orders will have the same id, even if they're from different stores.
namestringThe order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings on ecommerce. This is different from the id property, which is the ID of the order used by the API.
emailstringThe email address of the subscriber. Which is used to send notifications of any activity on their subscription.
phonestringThe subscriber's phone number for receiving SMS notifications.
subscriberarrayInformation about the subscriber. For more information about the subscriber object, see the Subscriber resource.
cart_tokenstringA unique value when referencing the cart that's associated with the order.
checkout_tokenstringA unique value when referencing the checkout that's associated with the order.
line_itemsarrayA list of line item objects, each containing information about an item in the order. view
notestringAn optional note that a shop owner can attach to the order.
note_attributesarrayExtra information that is added to the order. Appears in the Additional details section of an order details page. Each array entry contains a hash with name and value keys. view
tagsstringTags attached to the order, formatted as a string of comma-separated values. Tags are additional short descriptors, commonly used for filtering and searching. Each individual tag is limited to 40 characters in length.
shipping_addressarrayThe mailing address to where the order will be shipped. This address is optional and will not be available on orders that do not require shipping. view
billing_addressarrayThe mailing address associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method. view
shipping_linesarrayAn array of objects, each of which details a shipping method used. view
currencystringThe three-letter code (ISO 4217 format) for the shop currency.
subtotal_pricestringThe price of the order in the shop currency after discounts but before shipping, and taxes.
subtotal_price_setobjectThe subtotal of the order in shop and presentment currencies after discounts but before shipping, and taxes. view
total_discountsstringThe total discounts applied to the price of the order in the shop currency.
total_discounts_setobjectThe total discounts applied to the price of the order in shop and presentment currencies. view
total_taxstringThe sum of all the taxes applied to the order in the shop currency. Must be positive.
total_tax_setobjectThe total tax applied to the order in shop and presentment currencies. view
total_shippingstringThe total shipping applied to the order in the shop currency.
total_shipping_setobjectThe total shipping applied to the order in shop and presentment currencies. view
total_pricestringThe sum of all line item prices, discounts, shipping, and taxes in the shop currency.
total_price_setobjectThe total price of the order in shop and presentment currencies. view
gatewaystringThe payment gateway used.
financial_statusstringThe status of payments associated with the order. Can only be set when the order is created. Valid values:

- pending: The payments are pending. Payment might fail in this state. Check again to confirm whether the payments have been paid successfully.
- authorized: The payments have been authorized.
- partially_paid: The order has been partially paid.
- paid: The payments have been paid.
- partially_refunded: The payments have been partially refunded.
- refunded: The payments have been refunded.
- voided: The payments have been voided.
fulfillment_statusstringThe order's status in terms of fulfilled line items. Valid values:

- fulfilled: Every line item in the order has been fulfilled.
- null: None of the line items in the order have been fulfilled.
- partial: At least one line item in the order has been fulfilled.
- restocked: Every line item in the order has been restocked and the order canceled.
created_atstring readonlyThe autogenerated date and time (ISO 8601 format) when the order was created. The value for this property cannot be changed.
updated_atstring readonlyThe date and time (ISO 8601 format) when the order was last modified.

Line Items

AttributeTypeDescription
idintegerreadonlyThe ID of the line item.
product_idintegerThe ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.
variant_idintegerThe ID of the product variant.
skustringThe item's SKU (stock keeping unit).
namestringThe name of the product variant.
titlestringThe title of the product.
variant_titlestringThe title of the product variant.
quantityintegerThe number of items that were purchased.
vendorstringThe name of the item's supplier.
requires_shippingbooleanWhether the item requires shipping.
pricestringThe price of the item before discounts have been applied in the shop currency.
price_setarrayThe price of the line item in shop and presentment currencies. view
propertiesarrayAn array of custom information for the item that has been added to the cart. Often used to provide product customization options. view
taxablebooleanWhether the item was taxable.
tax_linesarrayA list of tax line objects, each of which details a tax applied to the item.
view
total_discountstringThe total amount of the discount allocated to the line item in the shop currency.
total_discount_setarrayThe total amount allocated to the line item in the presentment currency. view
discount_allocationsarrayAn ordered list of amounts allocated by discount applications. Each discount allocation is associated with a particular discount application. view

Properties

AttributeTypeDescription
namestringName of the attribute, for ex: name is Preferred Flavor
valuestringValue of the attribute, for ex: value is Vanilla

Tax Lines

AttributeTypeDescription
pricestringThe amount added to the order for this tax in the shop currency after discounts are applied.
ratestringThe rate of tax to be applied.
titlestringThe name of the tax.

Discount Allocations

AttributeTypeDescription
amountstringThe amount added to the order for this tax in the shop currency after discounts are applied.
discount_application_indexintegerThe index of the associated discount application in the order's discount_applications list.
amount_setarrayThe discount amount allocated to the line item in shop and presentment currencies. view

Note Attributes

AttributeTypeDescription
namestringName of the attribute, for ex: name is Preferred Time Of Delivery
valuestringValue of the attribute, for ex: value is 10 AM - 5 PM

Shipping Lines

AttributeTypeDescription
pricestringThe price of this shipping method in the shop currency. Can't be negative.
price_setarrayThe price of the shipping method in shop and presentment currencies. view
titlestringThe title of the shipping method.

Address

AttributeTypeDescription
first_namestringThe subscriber's first name.
last_namestringThe subscriber's last name.
emailstringThe email address of the subscriber.
phonestringThe subscriber's phone number at this address.
address1stringThe first line of the subscriber's mailing address.
address2stringAn additional field for the subscriber's mailing address.
companystringThe subscriber's company.
citystringThe subscriber's city, town, or village.
zipstringThe subscriber's postal code, also known as zip, postcode, Eircode, etc.
provincestringThe subscriber's region name. Typically a province, a state, or a prefecture.
countrystringThe subscriber's country.

Price Set

AttributeTypeDescription
shop_moneyarrayThe main currency of your ecommerce store. view
presentment_moneyarrayThe presentment money that was used to display prices to the customer. view

Price Set Value

AttributeTypeDescription
amountstringThe value in which customers have completed their purchases.
currency_codestringThe three-letter code (ISO 4217 format) for the currency.