Core Resources
Checkouts
Checkouts allow you to create, update, and process a Checkout programmatically. Shipping cost and sales tax determination are automatic functions of the Recharge Checkout resource.Related guides: Recharge checkout integrations, How to use the Checkout resource
Important - The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
88 additions in V2, marked New
Everything marked New also works when you send X-Recharge-Version: 2021-11.
- POST/checkouts
- GET/checkouts/{token}
- PUT/checkouts/{token}
- GET/checkouts/{token}/shipping_rates
- POST/checkouts/{token}/process
- GET/checkouts/{token}/line_items
- POST/checkouts/{token}/line_items
- PUT/checkouts/{token}/line_items
- DELETE/checkouts/{token}/line_items
- GET/checkouts/{token}/line_items/{line_item_id}
- PUT/checkouts/{token}/line_items/{line_item_id}
- DELETE/checkouts/{token}/line_items/{line_item_id}
- POST/checkouts/import
#The checkout object
Checkouts resource allows you to create, update, and process a checkout programmatically. Shipping cost and sales tax determination are automatic functions of the Recharge Checkout resource.The
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.Attributes
- charge_idintegerID for the
Chargeresulting from processing theCheckout. - analytics_dataobjectUrchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_paramobjects.Show child attributesHide child attributes7
- utm_campaignstringThe UTM campaign.
- utm_contentstringThe UTM content.
- utm_data_sourcestringThe source of the campaign parameter.
- utm_sourcestringThe UTM source.
- utm_mediumstringThe UTM medium.
- utm_termstringThe UTM term.
- utm_timestampstringThe UTM timestamp.
- applied_discountsarray of objects
Discountdetails, populated once theDiscounthas been applied successfully to theCheckout.Show child attributesHide child attributes6
- amountstringFinancial amount of the
Discountapplied. - applicablebooleanWhether the
Discountcan be applied to theCheckout. - discount_codestringThe code for the
Discount, e.g.25_PERCENT_OFF. - non_redeemable_reasonstringReason why the
Discountcould not be redeemed, if applicable. - valuestringThe value of the
Discount, used in combination withvalue_typeto determine the amount. - value_typestringThe way the
Discountamount is calculated.Possible valuesfixed_amountshipping
- applied_shipping_rateobjectShipping rates details, populated once the rates have been selected and applied successfully to the
Checkout.Show child attributesHide child attributes104 new
- checkoutobjectPrice details from the
Checkout.Show child attributesHide child attributes3
- subtotal_pricestringPrice excluding shipping and tax, including discounts.
- total_pricestringTotal price including tax and shipping cost for that particular shipping rate.
- total_taxstringTotal tax value for the checkout.
- codestringCode corresponding to the category of shipping.
- delivery_rangearray
- descriptionstring
- handlestringUnique string identifying the shipping/
- namestring
- phone_requiredbooleanWhether a
phoneis required for this shipping. - pricestringPrice of shipping.
- An array of
tax_lineobjects for the tax charged on the shipping rate. - titlestring
- available_shipping_ratesarray of objectsShipping rates available for the shipping address provided in the
Checkout.Checkoutobject must contain theshipping_addressbefore theavailable_shipping_ratesare populated.Show child attributesHide child attributes104 new
- checkoutobjectPrice details from the
Checkout.Show child attributesHide child attributes3
- subtotal_pricestringPrice excluding shipping and tax, including discounts.
- total_pricestringTotal price including tax and shipping cost for that particular shipping rate.
- total_taxstringTotal tax value for the checkout.
- codestringCode corresponding to the category of shipping.
- delivery_rangearray
- descriptionstring
- handlestringUnique string identifying the shipping/
- namestring
- phone_requiredbooleanWhether a
phoneis required for this shipping. - pricestringPrice of shipping.
- An array of
tax_lineobjects for the tax charged on the shipping rate. - titlestring
- billing_addressobjectBilling
Addressfor theCheckout.Show child attributesHide child attributes10
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- country_codestring2-letter country code.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code or postcode of the address.
- completed_atdatetimeTimestamp for when the
Checkoutwas processed. - Custom shipping rates that were supplied for the
Checkoutand can be selected withapplied_shipping_rate. - Additional payment methods, such as store credits or gift cards, that are applied to the
Checkouttotal before the main payment method is charged.Only present when additional payment methods were supplied on theCheckout.Show child attributesHide child attributes66 new
- The type of the additional payment method. Store credits are returned as
STORED_VALUE. - The processor of the additional payment method, e.g.
recharge_creditsfor store credits. - The token identifying the payment method. For store credits this is the ID of the credit account; for a gift card it is the gift card code.
- The amount from this payment method that is applied to the
Checkouttotal. - The balance available on the payment method. For store credits this is the balance remaining after
amount_applied.
- created_atdatetimeTimestamp for when the
Checkoutwas created. - currencystringCurrency of the
Checkout. - emailstringEmail address for the
Customer. - external_checkout_idstringExternal checkout reference, if one exists.
- external_checkout_sourcestringExternal checkout platform, if one exists.Possible values
big_commerceheadlessmagentoshopify - external_customer_idobjectExternal customer reference, if one exists.
Show child attributesHide child attributes21 new
- ecommercestringThe customer ID as it appears in the external e-commerce platform.
- The customer ID as it appears in the payment processor, populated once the
Checkouthas been processed.
- external_transaction_idobjectThe ID of the associated transaction in a payment processor system (like Stripe).
Show child attributesHide child attributes1
- payment_processorstringThe ID of the associated transaction in a payment processor system (like Stripe).
- line_itemsarray of objectsA list of items included in the
Checkoutquantityandexternal_variant_idare required parameters inline_items.Show child attributesHide child attributes234 new
- idintegerUnique identifier of the
line_item. - The inventory policy configured for the store that applies to the
line_item.Possible valuesbypassdecrement_ignoring_policydecrement_obeying_policy - An object containing the ID of the line item as it appears in the external system.Only present when an
external_line_item_idwas provided for theline_item.Show child attributesHide child attributes11 new
- The line item ID as it appears in the external e-commerce platform.Only present when an
external_line_item_idwas provided for theline_item.
- external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- external_variant_idobjectAn object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- handlestringA unique, human-friendly string for the
Productassociated with theline_item. - imagesobjectAn object containing URLs of the
Productimage.Show child attributesHide child attributes1
- smallstring
- propertiesarrayAn array of name-value pairs of additional custom
line_itemattributes. - purchase_item_idintegerThe
SubscriptionorOnetimeID associated with theline_item. - purchase_item_typestringThe type of the purchase applied to the item.Possible values
onetimesubscription - quantityintegerThe quantity of the item being purchased.
- recurring_unit_pricestringThe price of a single unit of the
Productassociated with theline_itemthat will be charged in recurring orders. - requires_shippingbooleanWhether the item requires shipping.
- skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item.Show child attributesHide child attributes8
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- cutoff_day_of_monthintegerDay of the month the plan should be chargedOnly valid for
interval_unit:month - cutoff_day_of_weekintegerDay of the month the plan should be chargedOnly valid for
interval_unit:week - A maximum number of charges on which the subscription should appear before automatic cancellation.
- order_day_of_monthintegerDay of the month an order should be generated when the customer is subscribed.
- order_day_of_weekintegerDay of the week an order should be generated when the customer is subscribed.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments when subscribed to this plan.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonthAll plans for aProductmust have the sameinterval_unit.
- tax_linesarray of objectsAn array of
tax_lineobjects associated with theline_item.Show child attributesHide child attributes41 new
- taxablebooleanWhether tax is to be applied to the
line_item - titlestringThe title of the
Productassociated with theline_item. - total_pricestringThe total price of the
line_itemincluding tax. - unit_pricestringThe price of a single unit of the
Productassociated with theline_item. - variant_titlestringThe title of the
Productvariant associated with theline_item. - weightintegerThe weight of a single unit of the
line_item, in grams. - weight_unitstringThe weight unit configured for the store.
weightis always expressed in grams regardless of this value.Possible valueslbozkggt
- notestringCustom note.
- notification_preferencesobjectNotification preferences for the
Customer.Show child attributesHide child attributes2
- emailobjectDetails of a customer's notifications preferences for emails.
Show child attributesHide child attributes3
- promotionalobjectDetails of a customer's notifications preferences for promotional communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- replenishmentobjectDetails of a customer's notifications preferences for replenishment communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- transactionalobjectDetails of a customer's notifications preferences for transactional communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- smsobjectDetails of a customer's notifications preferences for sms.
Show child attributesHide child attributes3
- promotionalobjectDetails of a customer's notifications preferences for promotional communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- replenishmentobjectDetails of a customer's notifications preferences for replenishment communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- transactionalobjectDetails of a customer's notifications preferences for transactional communication on this channel.
Show child attributesHide child attributes5
- last_opt_in_atdatetimeThe timestamp marking the last time the user opted in for the notification channel and type.
nullif the person never opted in. - last_opt_in_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - last_opt_out_atdatetimeThe timestamp marking the last time the user opted out for the notification channel and type.
nullif the person never opted out. - last_opt_out_sourcestringDetails of the source interface or process of the last opt in.Possible values
apibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_pagenullif the person never opted in. - statusstringStatus of the notification preferences.Possible values
accepteddeclined
- order_attributesarray of objectsList of name-value pairs for custom attributes.
- payment_processorstringName of the payment processor.
- requires_shippingbooleanWhether or not the
Checkoutcontains items that require shipping. - shipping_addressobjectShipping
Addressfor theCheckout.Show child attributesHide child attributes111 new
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- country_codestring2-letter country code.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- Shipping lines that will be set as the shipping lines override of the
Addresscreated when theCheckoutis processed.Only present when it was provided on theCheckout. - zipstringThe zip code or postcode of the address.
- shipping_linesarray of objectsDetails of shipping rate, cost...
Show child attributesHide child attributes710 new
- The code associated with the
shipping_line. - The price of the
shipping_line. - The rate of the
shipping_line.Only present when aratewas supplied for the shipping line, which is only possible when theCheckoutwas imported. - The source of the
shipping_line.Only present when asourcewas supplied for the shipping line, which is only possible when theCheckoutwas imported. - An array of tax lines associated with the
shipping_line. - Whether tax was charged on the
shipping_line. - The title of the
shipping_line.
- subtotal_pricestringValue of the
Checkoutminus shipping and tax. - tax_linesarray of objectsArray of
tax_lineobjects. - taxablebooleanWhether the existing
Customermatching theCheckoutemail is subject to tax.falsewhen thatCustomeris tax exempt, or when noCustomerexists yet for the email. - taxes_includedbooleanWhether the tax is included in the price of the items.
- tokenstringUnique token for the
Checkout. - total_pricestringFull price of the
Checkoutincluding shipping and tax. - total_taxstringTax charged on the
Checkout. - updated_atdatetimeTimestamp for the latest
Checkoutupdate.
{
"checkout": {
"charge_id": null,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "textlink",
"utm_data_source": "cookie",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "mleko",
"utm_timestamp": "2020-03-05T00:00:00+00:00"
}
]
},
"applied_discounts": [
{
"amount": "5.00",
"applicable": true,
"discount_code": "5_DOLLARS_OFF",
"non_redeemable_reason": null,
"value": "5.00",
"value_type": "fixed_amount"
}
],
"applied_shipping_rate": {
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "Flat rate (3 - 7 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49",
"name": "Flat rate (3 - 7 Business Days)",
"phone_required": null,
"price": "7.49",
"tax_lines": [],
"title": "Flat rate (3 - 7 Business Days)"
},
"available_shipping_rates": [
{
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "Flat rate (3 - 7 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49",
"name": "Flat rate (3 - 7 Business Days)",
"phone_required": null,
"price": "7.49",
"tax_lines": [],
"title": "Flat rate (3 - 7 Business Days)"
},
{
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "3 Days (3 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-3%20Days%20%283%20Business%20Days%29-11.75",
"name": "3 Days (3 Business Days)",
"phone_required": null,
"price": "11.75",
"tax_lines": [],
"title": "3 Days (3 Business Days)"
}
],
"billing_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"completed_at": null,
"created_at": "2021-11-16T00:51:28+00:00",
"currency": "USD",
"custom_shipping_rate_options": [],
"email": "somerandomemail@test.com",
"external_checkout_id": "<external_cart_id>",
"external_checkout_source": "custom",
"external_customer_id": {
"ecommerce": null,
"payment_processor": null
},
"external_transaction_id": {
"payment_processor": null
},
"line_items": [
{
"id": 0,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "12345"
},
"external_variant_id": {
"ecommerce": "123456"
},
"handle": "shirt-with-design",
"images": {
"small": "https://veryniceimage.jpg"
},
"properties": [
{}
],
"purchase_item_type": "onetime",
"quantity": 3,
"recurring_unit_price": "12.00",
"requires_shipping": true,
"sku": null,
"subscription_preferences": {
"charge_delay": null,
"charge_interval_frequency": null,
"charge_on_day_of_month": null,
"charge_on_day_of_week": null,
"number_charges_until_expiration": null,
"shipping_interval_frequency": null,
"shipping_interval_unit_type": null
},
"tax_lines": [],
"taxable": false,
"title": "A Nice Shirt",
"total_price": "36.00",
"unit_price": "12.00",
"variant_title": null,
"weight": 340,
"weight_unit": "g"
}
],
"note": "flash sale",
"notification_preferences": {
"email": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
},
"sms": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
}
},
"order_attributes": {
"customer_niceness": "very"
},
"payment_processor": null,
"requires_shipping": true,
"shipping_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"shipping_lines": [
{
"code": "Flat rate (3 - 7 Business Days)",
"price": "7.49",
"tax_lines": [],
"taxable": false,
"title": "Flat rate (3 - 7 Business Days)"
}
],
"subtotal_price": "31.00",
"tax_lines": [],
"taxable": false,
"taxes_included": false,
"token": "efd5a6b12b984f439ec16ce2a00fb5c3",
"total_price": "31.00",
"total_tax": "0.00",
"updated_at": "2021-11-16T00:51:28+00:00"
}
}#Create a checkout
POST/checkouts
Create a
CheckoutScope
write_checkoutsThe
Returns
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.Returns
201. The body can be sent with or without the checkout root key. For BigCommerce stores each line item must also include external_product_id, title and unit_price. A line item is created as a subscription when subscription_preferences.order_interval_frequency is set, otherwise as a one-time.Query parameters
- get_shipping_ratesbooleanIf specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout creation.
- When set to
true, shipping address validation is reduced so that only the country and zip are required, e.g. for the partial addresses provided by wallet payments. In this mode the country must be sent asshipping_address.country(full country name) instead ofshipping_address.country_code.
Body parameters
- analytics_dataobjectUrchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_paramobjects.Show child attributesHide child attributes7
- utm_campaignstringThe UTM campaign.
- utm_contentstringThe UTM content.
- The source of the campaign parameter.
- utm_sourcestringThe UTM source.
- utm_mediumstringThe UTM medium.
- utm_termstringThe UTM term.
- The UTM timestamp.
- applied_discountsarray of objects
Discountto apply to theCheckout.Show child attributesHide child attributes1
- discount_codestringThe code for the
Discount, e.g.25_PERCENT_OFF.
- applied_shipping_rateobjectShipping rates details, populated once the rates have been selected and applied successfully to the
Checkout.Important: You can only create a checkout withapplied_shipping_rateif you pass the query parameterget_shipping_rates=trueor if you supply a list of shipping rates usingcustom_shipping_rate_options.Show child attributesHide child attributes1
- handlestringUnique identifier for the shipping rate that should be applied.
- custom_shipping_rate_optionsarray of objectsList of available shipping rates to use when selecting a shipping rate with
applied_shipping_rate. Custom shipping rates will take precedence over any default rates fetched usingget_shipping_rates=true. - billing_addressobjectBilling
Addressfor theCheckout.Show child attributesHide child attributes10
- Line one of the billing address.
- address2stringLine two of the billing address.
- The city of the billing address.
- companystringThe company name of the billing address.
- 2-letter country code.
- first_namestringThe first name of the billing address.
- The last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code or postcode of the address.
- currencystringCurrency of the
Checkout. - emailstringEmail address for the
Customer. - external_checkout_idstringExternal checkout reference, if one exists.
- external_checkout_sourcestringExternal checkout platform, if one exists.Possible values
big_commerceheadlessmagentoshopify - A list of items included in the
Checkoutquantityandexternal_variant_idare required parameters inline_items.Show child attributesHide child attributes165 new
- An object containing the ID of the line item as it appears in the external system.
Show child attributesHide child attributes11 new
- The line item ID as it appears in the external e-commerce platform.
- external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- The product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- An object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- The variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- handlestringA unique, human-friendly string for the
Product. - imagesobjectAn object containing URLs of the
Productimage. - propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - The quantity of the
line_item. - The price of a single unit of the
line_itemthat will be charged on recurring orders. Only applies to subscription line items and defaults tounit_price. - Whether the item requires shipping. Defaults to the value of the product in the catalog.
- skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item.required if thepurchase_item_typeissubscription.Show child attributesHide child attributes8
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- cutoff_day_of_monthintegerDay of the month the plan should be chargedOnly valid for
interval_unit:month - cutoff_day_of_weekintegerDay of the month the plan should be chargedOnly valid for
interval_unit:week - A maximum number of charges on which the subscription should appear before automatic cancellation.
- order_day_of_monthintegerDay of the month an order should be generated when the customer is subscribed.
- order_day_of_weekintegerDay of the week an order should be generated when the customer is subscribed.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments when subscribed to this plan.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonthAll plans for aProductmust have the sameinterval_unit.
- Whether tax is to be applied to the
line_item.Only used for BigCommerce stores. For other stores the value always comes from the product in the catalog. - titlestringThe title of the
Productof thisline_item. - unit_pricestringThe unit price of the
line_item. - variant_titlestringThe title of the
Productvariant associated with theline_item. - weightintegerThe total weight of the
line_item.
- notestringCustom note.
- order_attributesarray of objectsList of name-value pairs for custom attributes.
- Additional payment methods, such as store credits or gift cards, to apply to the
Checkouttotal before the main payment method is charged. Duplicate entries are rejected.Requires store credits or gift cards to be enabled for the store.Show child attributesHide child attributes44 new
- The type of the additional payment method:
stored_valuefor store credits orgift_cardfor a gift card. - The processor of the additional payment method. Must be
recharge_creditswhenpayment_typeisstored_valueandrise.aiwhen it isgift_card. - The token identifying the payment method. For store credits this is the ID of the credit account; for a gift card it is the gift card code.
- shipping_addressobjectShipping
Addressfor theCheckout.Show child attributesHide child attributes111 new
- Line one of the billing address.
- address2stringLine two of the billing address.
- The city of the billing address.
- companystringThe company name of the billing address.
- 2-letter country code.
- first_namestringThe first name of the billing address.
- The last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- Shipping lines to set as the shipping lines override of the
Addresscreated when theCheckoutis processed. - zipstringThe zip code or postcode of the address.
curl -X POST 'https://api.rechargeapps.com/checkouts' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'X-Recharge-Version: v2' \
-d '{
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "textlink",
"utm_data_source": "shopify_cookie",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "mleko",
"utm_timestamp": "2020-03-05T00:00:00"
}
]
},
"applied_discounts": [
{
"discount_code": "5_DOLLARS_OFF"
}
],
"billing_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": "",
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"email": "somerandomemail@test.com",
"external_checkout_id": "<external_cart_id>",
"external_checkout_source": "custom",
"line_items": [
{
"external_product_id": {
"ecommerce": "12345"
},
"external_variant_id": {
"ecommerce": "123456"
},
"handle": "shirt-with-design",
"images": {
"small": "http://small.jpg"
},
"properties": [
{
"name": "size",
"value": "xl"
},
{
"name": "color",
"value": "fuchsia"
}
],
"quantity": 3,
"subscription_preferences": {
"charge_interval_frequency": null,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": null,
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": null
},
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
}
]
}
],
"note": "flash sale",
"order_attributes": {
"customer_niceness": "very"
},
"shipping_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": "",
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
}
}'{
"checkout": {
"charge_id": null,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "textlink",
"utm_data_source": "shopify_cookie",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "mleko",
"utm_timestamp": "2020-03-05T00:00:00+00:00"
}
]
},
"applied_discounts": [
{
"amount": "5.00",
"applicable": true,
"discount_code": "5_DOLLARS_OFF",
"non_redeemable_reason": null,
"value": "5.00",
"value_type": "fixed_amount"
}
],
"billing_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"completed_at": null,
"created_at": "2021-11-16T00:51:28+00:00",
"currency": "USD",
"custom_shipping_rate_options": [],
"email": "somerandomemail@test.com",
"external_checkout_id": "f71848585658686-36f6-d9efg8125rogkfdaa",
"external_checkout_source": "custom",
"external_customer_id": {
"ecommerce": null,
"payment_processor": null
},
"external_transaction_id": {
"payment_processor": null
},
"line_items": [
{
"id": null,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "12345"
},
"external_variant_id": {
"ecommerce": "123456"
},
"handle": "shirt-with-design",
"images": {
"small": "http://small.jpg"
},
"properties": [
{},
{}
],
"purchase_item_type": "onetime",
"quantity": 3,
"requires_shipping": true,
"sku": null,
"subscription_preferences": {
"charge_interval_frequency": null,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": null,
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": null
},
"tax_lines": [],
"taxable": false,
"title": "A Very Nice Shirt",
"total_price": "36.00",
"unit_price": "12.00",
"variant_title": null,
"weight": 340,
"weight_unit": "g"
}
],
"note": "flash sale",
"notification_preferences": {
"email": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
},
"sms": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
}
},
"order_attributes": {
"customer_niceness": "very"
},
"payment_processor": null,
"requires_shipping": true,
"shipping_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"subtotal_price": "31.00",
"tax_lines": [],
"taxable": false,
"taxes_included": false,
"token": "efd5a6b12b984f439ec16ce2a00fb5c3",
"total_price": "31.00",
"total_tax": "0.00",
"updated_at": "2021-11-16T00:51:28+00:00"
}
}#Retrieve a checkout
GET/checkouts/{token}
Retrieve a checkout.
Scope
read_checkoutsThe
Returns
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.Returns
404 for a Checkout that was created more than 180 days ago.curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'X-Recharge-Version: v2'{
"checkout": {
"charge_id": null,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "textlink",
"utm_data_source": "shopify_cookie",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "mleko",
"utm_timestamp": "2020-03-05T00:00:00+00:00"
}
]
},
"applied_discounts": [
{
"amount": "5.00",
"applicable": true,
"discount_code": "5_DOLLARS_OFF",
"non_redeemable_reason": null,
"value": "5.00",
"value_type": "fixed_amount"
}
],
"applied_shipping_rate": {
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "3 Days (3 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-3%20Days%20%283%20Business%20Days%29-11.75",
"name": "3 Days (3 Business Days)",
"phone_required": null,
"price": "11.75",
"tax_lines": [],
"title": "3 Days (3 Business Days)"
},
"available_shipping_rates": [
{
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "Flat rate (3 - 7 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49",
"name": "Flat rate (3 - 7 Business Days)",
"phone_required": null,
"price": "7.49",
"tax_lines": [],
"title": "Flat rate (3 - 7 Business Days)"
},
{
"checkout": {
"subtotal_price": null,
"total_price": null,
"total_tax": null
},
"code": "3 Days (3 Business Days)",
"delivery_range": null,
"description": null,
"handle": "recharge-3%20Days%20%283%20Business%20Days%29-11.75",
"name": "3 Days (3 Business Days)",
"phone_required": null,
"price": "11.75",
"tax_lines": [],
"title": "3 Days (3 Business Days)"
}
],
"billing_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"completed_at": null,
"created_at": "2021-11-16T00:51:28+00:00",
"currency": "USD",
"custom_shipping_rate_options": [],
"email": "somerandomemail@test.com",
"external_checkout_id": "<external_cart_id>",
"external_checkout_source": "headless",
"external_customer_id": {
"ecommerce": null,
"payment_processor": null
},
"external_transaction_id": {
"payment_processor": null
},
"line_items": [
{
"id": null,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "12345"
},
"external_variant_id": {
"ecommerce": "123456"
},
"handle": "shirt-with-design",
"images": {
"small": "http://small.jpg"
},
"properties": [
{}
],
"purchase_item_type": "onetime",
"quantity": 3,
"requires_shipping": true,
"sku": null,
"subscription_preferences": {
"charge_interval_frequency": null,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": null,
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": null
},
"tax_lines": [],
"taxable": false,
"title": "A Very Nice Shirt",
"total_price": "36.00",
"unit_price": "12.00",
"variant_title": null,
"weight": 340,
"weight_unit": "g"
}
],
"note": "flash sale",
"notification_preferences": {
"email": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
},
"sms": {
"promotional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"replenishment": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
},
"transactional": {
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null,
"status": "unspecified"
}
}
},
"order_attributes": {
"customer_niceness": "very"
},
"payment_processor": null,
"requires_shipping": true,
"shipping_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": null,
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"subtotal_price": "31.00",
"tax_lines": [],
"taxable": false,
"taxes_included": false,
"token": "efd5a6b12b984f439ec16ce2a00fb5c3",
"total_price": "31.00",
"total_tax": "0.00",
"updated_at": "2021-11-16T00:51:28+00:00"
}
}#Update a checkout
PUT/checkouts/{token}
You can modify an existing checkout to match the specified parameters.
Scope
write_checkoutsThe
A
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.A
Checkout that has already been processed cannot be updated (422). Sending line_items replaces the full list of line items. Only applied_shipping_rate.handle is needed to select a shipping rate; the rate details are taken from the available or custom shipping rates.Query parameters
- get_shipping_ratesbooleanIf specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout update.
- When set to
true, shipping address validation is reduced so that only the country and zip are required, e.g. for the partial addresses provided by wallet payments. In this mode the country must be sent asshipping_address.country(full country name) instead ofshipping_address.country_code.
Body parameters
- analytics_dataobjectUrchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_paramobjects.Show child attributesHide child attributes7
- utm_campaignstringThe UTM campaign.
- utm_contentstringThe UTM content.
- The source of the campaign parameter.
- utm_sourcestringThe UTM source.
- utm_mediumstringThe UTM medium.
- utm_termstringThe UTM term.
- The UTM timestamp.
Discountto apply to theCheckout. Send an empty array to remove the applied discount.Show child attributesHide child attributes11 new
- The code for the
Discount, e.g.25_PERCENT_OFF.
- applied_shipping_rateobjectShipping rates details, populated once the rates have been selected and applied successfully to the
Checkout.Important: You can only setapplied_shipping_rateif you have already collected theavailable_shipping_ratesby callingGET /checkout/<checkout_token>/shipping_ratesor if you pass the query parameterget_shipping_rates=truewhen calling this route.code,priceandtitleare required when setting a custom shipping rateShow child attributesHide child attributes8
- codestringCode corresponding to the category of shipping.
- delivery_rangestring
- descriptionstring
- handlestringUnique string identifying the shipping/
- namestring
- phone_requiredstringWhether a
phoneis required for this shipping. - pricestringPrice of shipping.
- titlestring
- billing_addressobjectBilling address for the checkout.
Show child attributesHide child attributes10
- Line one of the billing address.
- address2stringLine two of the billing address.
- The city of the billing address.
- companystringThe company name of the billing address.
- 2-letter country code.
- first_namestringThe first name of the billing address.
- The last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code or postcode of the address.
- List of available shipping rates to use when selecting a shipping rate with
applied_shipping_rate. - currencystringCurrency of the
Checkout. - emailstringEmail address for the customer.
- external_checkout_idstringRepresents the external cart token.
- external_checkout_sourcestringRepresents the source for
external_checkout_id.Possible valuesbig_commerceheadlessmagentoshopify - line_itemsarray of objectsA list of items included in the
Checkout.quantityandexternal_variant_idare required for each line item. The list replaces all existing line items.Show child attributesHide child attributes165 new
- An object containing the ID of the line item as it appears in the external system.
Show child attributesHide child attributes11 new
- The line item ID as it appears in the external e-commerce platform.
- external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- The product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- An object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- The variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- handlestringA unique, human-friendly string for the
Product. - imagesobjectAn object containing URLs of the
Productimage. - propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - The quantity of the
line_item. - The price of a single unit of the
line_itemthat will be charged on recurring orders. Only applies to subscription line items and defaults tounit_price. - Whether the item requires shipping. Defaults to the value of the product in the catalog.
- skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item.required if thepurchase_item_typeissubscription.Show child attributesHide child attributes8
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- cutoff_day_of_monthintegerDay of the month the plan should be chargedOnly valid for
interval_unit:month - cutoff_day_of_weekintegerDay of the month the plan should be chargedOnly valid for
interval_unit:week - A maximum number of charges on which the subscription should appear before automatic cancellation.
- order_day_of_monthintegerDay of the month an order should be generated when the customer is subscribed.
- order_day_of_weekintegerDay of the week an order should be generated when the customer is subscribed.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments when subscribed to this plan.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonthAll plans for aProductmust have the sameinterval_unit.
- Whether tax is to be applied to the
line_item.Only used for BigCommerce stores. For other stores the value always comes from the product in the catalog. - titlestringThe title of the
Productof thisline_item. - unit_pricestringThe unit price of the
line_item. - variant_titlestringThe name of a variant of the
Productof thisline_item. - weightintegerThe total weight in grams of the
line_item.
- notestringNote attribute used to store custom notes.
- order_attributesarray of objectsStructured custom notes.
- Additional payment methods, such as store credits or gift cards, to apply to the
Checkouttotal before the main payment method is charged. Duplicate entries are rejected.Requires store credits or gift cards to be enabled for the store.Show child attributesHide child attributes44 new
- The type of the additional payment method:
stored_valuefor store credits orgift_cardfor a gift card. - The processor of the additional payment method. Must be
recharge_creditswhenpayment_typeisstored_valueandrise.aiwhen it isgift_card. - The token identifying the payment method. For store credits this is the ID of the credit account; for a gift card it is the gift card code.
- shipping_addressobjectShipping address for the checkout.When using mobile payment options, insufficient shipping address data is available until payment intent, which causes validation errors when updating the checkout object.
Related guides: Checkout mobile paymentShow child attributesHide child attributes111 new
- Line one of the billing address.
- address2stringLine two of the billing address.
- The city of the billing address.
- companystringThe company name of the billing address.
- 2-letter country code.
- first_namestringThe first name of the billing address.
- The last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- Shipping lines to set as the shipping lines override of the
Addresscreated when theCheckoutis processed. - zipstringThe zip code or postcode of the address.
curl -X PUT 'https://api.rechargeapps.com/checkouts/b706eecfd66c45329d3886a02d7515d6' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'X-Recharge-Version: v2' \
-d '{
"line_items": [
{
"product_id": 4546063663207,
"quantity": 6,
"variant_id": 3844924611
}
]
}'{
"checkout": {
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "textlink",
"utm_data_source": "shopify_cookie",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "mleko",
"utm_timestamp": "2020-03-05T00:00:00+00:00"
}
]
},
"applied_discount": {
"amount": "7.50",
"applicable": true,
"non_applicable_reason": "",
"value": "7.50",
"value_type": "fixed_amount"
},
"billing_address": null,
"buyer_accepts_marketing": false,
"charge_id": null,
"completed_at": null,
"created_at": "2020-07-10T09:21:46.259352+00:00",
"currency": "USD",
"custom_shipping_rate_options": [],
"discount_code": "POPUS_25",
"email": "somerandomemail@test.com",
"external_checkout_id": "<shopify_cart_token>",
"external_checkout_source": "shopify",
"line_items": [
{
"charge_interval_frequency": 5,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"external_inventory_policy": "decrement_obeying_policy",
"first_recurring_charge_delay": null,
"fulfillment_service": "manual",
"image": "//cdn.shopify.com/s/files/1/0279/8387/2103/products/kazan_small.jpg?v=1586451337",
"line_price": "30.00",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 5,
"order_interval_unit": "day",
"order_interval_unit_type": "day",
"original_price": "5.00",
"price": "5.00",
"product_id": 4546063663207,
"product_type": "Milk",
"properties": null,
"quantity": 6,
"recurring_price": "5.00",
"requires_shipping": true,
"sku": "kRaViCah-1",
"tax_code": null,
"taxable": false,
"title": "Powder Milk",
"type": "SUBSCRIPTION",
"variant_id": 32165284380775,
"variant_title": "1 / Powder",
"vendor": "Imlek"
}
],
"note": null,
"order_attributes": null,
"payment_processor": null,
"payment_processor_customer_id": null,
"payment_processor_transaction_id": null,
"phone": null,
"requires_shipping": true,
"shipping_address": {
"address1": "6419 Ocean Front Walk",
"address2": "Apt 2",
"city": "Los Angeles",
"company": "",
"country_code": "US",
"first_name": "Novak",
"last_name": "Djokovic",
"phone": "1-800-800-8000",
"province": "California",
"zip": "90293"
},
"shipping_address_validations": {
"country_is_supported": true,
"ups": true
},
"shipping_line": null,
"shipping_rate": null,
"subtotal_price": "22.50",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"taxes_included": false,
"token": "b706eecfd66c45329d3886a02d7515d6",
"total_price": "22.50",
"total_tax": "0.00",
"updated_at": "2020-07-10T09:21:46.284703+00:00"
}
}#Retrieve shipping rates
GET/checkouts/{token}/shipping_rates
You can retrieve all shipping rates for a specific checkout.
Scope
read_checkoutsThe list is returned under the
available_shipping_rates root key. A shipping_address must be set on the Checkout before shipping rates can be retrieved (422 otherwise).Response attributes
- checkoutobjectPrice details from the
Checkout.Show child attributesHide child attributes3
- subtotal_pricestringPrice excluding shipping and tax, including discounts.
- total_pricestringTotal price including tax and shipping cost for that particular shipping rate.
- total_taxstringTotal tax value for the checkout.
- codestringCode corresponding to the category of shipping.
- delivery_rangestring
- descriptionstring
- handlestringUnique string identifying the shipping/
- namestring
- phone_requiredstringWhether a
phoneis required for this shipping. - pricestringPrice of shipping.
- titlestring
curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005/shipping_rates' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'X-Recharge-Version: v2'{
"shipping_rates": [
{
"checkout": {
"subtotal_price": "22.50",
"total_price": "42.40",
"total_tax": "0.00"
},
"code": "Standard",
"delivery_range": null,
"description": null,
"handle": "shopify-Standard-19.90",
"name": "Standard",
"phone_required": false,
"price": "19.90",
"title": "Standard"
}
]
}#Process a checkout
POST/checkouts/{token}/process
You can process and charge checkout using our API.
Scope
write_checkoutsThe
We support Stripe, Apple Pay, Google Pay, and Braintree as payment processor.
If you are using test stripe keys, you can use
Related guides: Mobile payments
Returns
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.We support Stripe, Apple Pay, Google Pay, and Braintree as payment processor.
If you are using test stripe keys, you can use
tok_visa as your token.Related guides: Mobile payments
Returns
201 with a checkout_charge object containing charge_id, status (successful or requires_authentication), payment_processor, payment_processor_transaction_id, processor_payment_method_token, processor_customer_token, payment_type, free and authorization_token. The Checkout must have an email, a shipping_address and at least one line item.Body parameters
- Whether to hold the payment as an authorization so that post-purchase upsell items can be added before it is captured.Only has an effect when the store's payment capture is set to capture automatically after upsell.
- Set to
trueto process theCheckoutwithout taking a payment.payment_processorandprocessor_payment_method_tokenmust not be sent whentrue. - Mandate acceptance details for bank debit payments.Only read when the request body is wrapped in the
checkout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL.Show child attributesHide child attributes16 new
- Details of how the customer accepted the mandate.Only read when the request body is wrapped in the
checkout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL.Show child attributesHide child attributes35 new
- The type of acceptance, e.g.
online. Required whencustomer_acceptanceis sent.Only read when the request body is wrapped in thecheckout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL. - Timestamp of when the customer accepted the mandate. Required when
customer_acceptanceis sent.Only read when the request body is wrapped in thecheckout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL. - Details of an online mandate acceptance.Only read when the request body is wrapped in the
checkout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL.Show child attributesHide child attributes22 new
- The IP address from which the customer accepted the mandate.Only read when the request body is wrapped in the
checkout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL. - The user agent of the browser from which the customer accepted the mandate.Only read when the request body is wrapped in the
checkout_chargeroot key andpayment_typeisSEPA_DEBITorIDEAL.
- The name of payment processor.Possible values
authorizebraintreestripemollie - The URL the customer is returned to after authorizing the payment with their bank.Only read when the request body is wrapped in the
checkout_chargeroot key,payment_typeisIDEALandmandate_datais also sent. - payment_typestringThe payment type used for the
Checkout.Possible valuesCREDIT_CARDPAYPALAPPLE_PAYGOOGLE_PAYSEPA_DEBITIDEALSHOP_PAYPAYPAL_EXPRESSSOFORTGIROPAYSTORED_VALUEAMAZON_PAYINVOICEAFTERPAY_CLEARPAYKLARNA - The ID of the customer in the payment processor.Only used when reusing an existing payment processor customer is enabled for the store.
- Payment method token from the payment processor that will be used in the transaction. Either this or
authorization_tokenis required unlessfreeistrue.
Response attributes
- charge_idstringUnique identifier for the charge resulting from the processing of the checkout.
- freebooleanBoolean to identify if the checkout was free.
- payment_processorstringPayment processor used for the checkout.
- payment_typestringPayment type used for the checkout.
- processor_customer_tokenstringUnique identifier for the customer created in the payment service provider platform (aka PSP).
- Payment method token used for the transaction.
- Unique transaction id used for the transaction.
- statusstringStatus of the checkout
curl -X POST 'https://api.rechargeapps.com/checkouts/5a5c19ea31c44641855017f1276db959/process' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'X-Recharge-Version: v2' \
-d '{
"payment_processor": "stripe",
"payment_token": "<payment_token>",
"payment_type": "CREDIT_CARD"
}'{
"checkout_charge": {
"authorization_token": null,
"charge_id": 258065996,
"free": false,
"payment_processor": "stripe",
"processor_customer_token": "cus_HcbgqiS49fABBg62E",
"processor_payment_method_token": "pm_lkj3lkl4lk34",
"payment_processor_transaction_id": "ch_1H3McXJ2zdqHvZaRd191xV2idRt",
"payment_token": "tok_visa",
"payment_type": "CREDIT_CARD",
"status": "successful"
}
}#List line items of a checkoutNew
GET/checkouts/{token}/line_items
Returns the line items of a
Checkout. Each item has the same attributes as line_items on the Checkout object.Scope
read_checkoutscurl 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"line_items": [
{
"id": 1,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "7301234"
},
"external_variant_id": {
"ecommerce": "41209876"
},
"handle": "morning-blend-coffee",
"images": {
"small": "https://cdn.example.com/products/morning-blend_small.png"
},
"properties": [
{
"name": "grind",
"value": "whole bean"
}
],
"purchase_item_type": "subscription",
"quantity": 2,
"recurring_unit_price": "18.00",
"requires_shipping": true,
"sku": "COF-MB-12",
"subscription_preferences": {
"charge_interval_frequency": 1,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": "month",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1
},
"tax_lines": [],
"taxable": true,
"title": "Morning Blend Coffee",
"total_price": "36.00",
"unit_price": "18.00",
"variant_title": "12 oz",
"weight": 340,
"weight_unit": "g"
}
]
}#Add line items to a checkoutNew
POST/checkouts/{token}/line_items
Adds one or more line items to a
Checkout and recalculates it. Accepts the same line item attributes as line_items on Create a checkout and returns all line items of the Checkout. Line item id values are positional: new items are placed first and all id values are reassigned.Scope
write_checkoutsBody parameters
- A list of line items.
Show child attributesHide child attributes12
- An object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- The variant id as it appears in the external e-commerce platform.
- The quantity of the
line_item. Must be at least 1. - external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform.
- unit_pricestringThe unit price of the
line_item. - recurring_unit_pricestringThe price of a single unit of the
line_itemthat will be charged on recurring orders. Only applies to subscription line items. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item. Whenorder_interval_frequencyis set the line item is a subscription, otherwise a one-time.Show child attributesHide child attributes3
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonth
- propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - titlestringThe title of the
Productof thisline_item. - variant_titlestringThe title of the
Productvariant associated with theline_item. - skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - weightintegerThe weight of a single unit of the
line_item, in grams. - requires_shippingbooleanWhether the item requires shipping.
curl -X POST 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"line_items": [
{
"id": 1,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "7301234"
},
"external_variant_id": {
"ecommerce": "41209876"
},
"handle": "morning-blend-coffee",
"images": {
"small": "https://cdn.example.com/products/morning-blend_small.png"
},
"properties": [
{
"name": "grind",
"value": "whole bean"
}
],
"purchase_item_type": "subscription",
"quantity": 2,
"recurring_unit_price": "18.00",
"requires_shipping": true,
"sku": "COF-MB-12",
"subscription_preferences": {
"charge_interval_frequency": 1,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": "month",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1
},
"tax_lines": [],
"taxable": true,
"title": "Morning Blend Coffee",
"total_price": "36.00",
"unit_price": "18.00",
"variant_title": "12 oz",
"weight": 340,
"weight_unit": "g"
}
]
}#Update line items of a checkoutNew
PUT/checkouts/{token}/line_items
Updates several line items of a
Checkout in one request and recalculates it. Each line item is matched by its id; a 404 is returned if an id does not exist on the Checkout. Returns all line items of the Checkout.Scope
write_checkoutsBody parameters
- A list of line items.
Show child attributesHide child attributes13
- Unique identifier of the
line_itemto update. - An object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- The variant id as it appears in the external e-commerce platform.
- The quantity of the
line_item. Must be at least 1. - external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform.
- unit_pricestringThe unit price of the
line_item. - recurring_unit_pricestringThe price of a single unit of the
line_itemthat will be charged on recurring orders. Only applies to subscription line items. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item. Whenorder_interval_frequencyis set the line item is a subscription, otherwise a one-time.Show child attributesHide child attributes3
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonth
- propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - titlestringThe title of the
Productof thisline_item. - variant_titlestringThe title of the
Productvariant associated with theline_item. - skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - weightintegerThe weight of a single unit of the
line_item, in grams. - requires_shippingbooleanWhether the item requires shipping.
curl -X PUT 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"line_items": [
{
"id": 1,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "7301234"
},
"external_variant_id": {
"ecommerce": "41209876"
},
"handle": "morning-blend-coffee",
"images": {
"small": "https://cdn.example.com/products/morning-blend_small.png"
},
"properties": [
{
"name": "grind",
"value": "whole bean"
}
],
"purchase_item_type": "subscription",
"quantity": 2,
"recurring_unit_price": "18.00",
"requires_shipping": true,
"sku": "COF-MB-12",
"subscription_preferences": {
"charge_interval_frequency": 1,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": "month",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1
},
"tax_lines": [],
"taxable": true,
"title": "Morning Blend Coffee",
"total_price": "36.00",
"unit_price": "18.00",
"variant_title": "12 oz",
"weight": 340,
"weight_unit": "g"
}
]
}#Remove line items from a checkoutNew
DELETE/checkouts/{token}/line_items
Removes several line items from a
Checkout and recalculates it. A 404 is returned if an id does not exist on the Checkout. The id values of the remaining line items are reassigned.Scope
write_checkoutsBody parameters
- The
idvalues of the line items to remove.
curl -X DELETE 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'No content is returned for this response.
#Retrieve a line item of a checkoutNew
GET/checkouts/{token}/line_items/{line_item_id}
Returns a single line item of a
Checkout by its id.Scope
read_checkoutscurl 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items/209176' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"line_item": {
"id": 1,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "7301234"
},
"external_variant_id": {
"ecommerce": "41209876"
},
"handle": "morning-blend-coffee",
"images": {
"small": "https://cdn.example.com/products/morning-blend_small.png"
},
"properties": [
{
"name": "grind",
"value": "whole bean"
}
],
"purchase_item_type": "subscription",
"quantity": 2,
"recurring_unit_price": "18.00",
"requires_shipping": true,
"sku": "COF-MB-12",
"subscription_preferences": {
"charge_interval_frequency": 1,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": "month",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1
},
"tax_lines": [],
"taxable": true,
"title": "Morning Blend Coffee",
"total_price": "36.00",
"unit_price": "18.00",
"variant_title": "12 oz",
"weight": 340,
"weight_unit": "g"
}
}#Update a line item of a checkoutNew
PUT/checkouts/{token}/line_items/{line_item_id}
Updates a single line item of a
Checkout and recalculates it. The attributes to change are sent at the top level of the request body, without a root key; attributes that are not sent keep their current value.Scope
write_checkoutsBody parameters
- quantityintegerThe quantity of the
line_item. Must be at least 1. - unit_pricestringThe unit price of the
line_item. - recurring_unit_pricestringThe price of a single unit of the
line_itemthat will be charged on recurring orders. Only applies to subscription line items. - subscription_preferencesobjectAn object containing the various subscription preferences associated with the
line_item. Whenorder_interval_frequencyis set the line item is a subscription, otherwise a one-time.Show child attributesHide child attributes3
- charge_interval_frequencyintegerFrequency at which the subscriber will be charged.
- order_interval_frequencyintegerFrequency at which the subscriber will receive shipments.
- interval_unitstringThe unit applied to
charge_interval_frequencyandorder_interval_frequency.Possible valuesdayweekmonth
- propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - requires_shippingbooleanWhether the item requires shipping.
curl -X PUT 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items/209176' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"line_item": {
"id": 1,
"external_inventory_policy": "decrement_obeying_policy",
"external_product_id": {
"ecommerce": "7301234"
},
"external_variant_id": {
"ecommerce": "41209876"
},
"handle": "morning-blend-coffee",
"images": {
"small": "https://cdn.example.com/products/morning-blend_small.png"
},
"properties": [
{
"name": "grind",
"value": "whole bean"
}
],
"purchase_item_type": "subscription",
"quantity": 2,
"recurring_unit_price": "18.00",
"requires_shipping": true,
"sku": "COF-MB-12",
"subscription_preferences": {
"charge_interval_frequency": 1,
"cutoff_day_of_month": null,
"cutoff_day_of_week": null,
"expire_after_specific_number_of_charges": null,
"interval_unit": "month",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1
},
"tax_lines": [],
"taxable": true,
"title": "Morning Blend Coffee",
"total_price": "36.00",
"unit_price": "18.00",
"variant_title": "12 oz",
"weight": 340,
"weight_unit": "g"
}
}#Remove a line item from a checkoutNew
DELETE/checkouts/{token}/line_items/{line_item_id}
Removes a single line item from a
Checkout and recalculates it. The id values of the remaining line items are reassigned.Scope
write_checkoutscurl -X DELETE 'https://api.rechargeapps.com/checkouts/a1b2c3d4e5f6/line_items/209176' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'No content is returned for this response.
#Import a checkoutNew
POST/checkouts/import
Creates a
Checkout from an order that was already priced in an external system and, when payment details are included, processes it in the same request. Taxes and shipping are not calculated: the tax lines, shipping line and total supplied in the request are used as they are. The body must be wrapped in the checkout root key and accepts the same attributes as Create a checkout plus the ones listed here. Subscription line items must also include external_product_id.Scope
write_checkoutsBody parameters
- paymentsarray of objectsPayment methods used to process the
Checkout. The first payment method that is not store credit is charged; store credits are applied to the total first.Show child attributesHide child attributes5
- payment_processorstringThe name of the payment processor, or
recharge_creditsfor store credits. - payment_typestringThe payment type, e.g.
CREDIT_CARD, orSTORED_VALUEfor store credits. - Payment method token from the payment processor. Either this or
authorization_tokenis required unless the payment is store credit. - payment_tokenstringThe ID of the credit account. Required when
payment_processorisrecharge_credits.
- payment_dataarrayAlternative to
payments: a list whose first entry is used to process theCheckout, with the same attributes as the body of Process a checkout. - shipping_linesarray of objectsThe shipping line to apply to the
Checkout. Only the first entry is used.Show child attributesHide child attributes7
- codestringThe code associated with the
shipping_line. - pricestringThe price of the
shipping_line. - titlestringThe title of the
shipping_line. - sourcestringThe source of the
shipping_line. - handlestringUnique identifier for the shipping rate.
- taxablebooleanWhether the
shipping_lineis taxable. - tax_linesarrayAn array of tax lines associated with the
shipping_line.
- tax_linesarray of objectsArray of
tax_lineobjects for theCheckout. Their prices are summed to obtaintotal_tax. Show child attributesHide child attributes1
- tax_linesarray of objectsAn array of
tax_lineobjects associated with theline_item.
- total_pricestringFull price of the
Checkoutincluding shipping and tax. When omitted it is calculated from the line items, shipping line and tax lines. - send_avalara_invoicebooleanWhether an invoice is sent to Avalara for this
Checkoutwhen the store uses Avalara for taxes. Defaults totrue. - send_taxjar_invoicebooleanWhether an invoice is sent to TaxJar for this
Checkoutwhen the store uses TaxJar for taxes. Defaults totrue.
curl -X POST 'https://api.rechargeapps.com/checkouts/import' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"checkout": {
"token": "3b1f6a0e2c9d4f7a8e5b6c1d2a3f4e5b",
"charge_id": 880012345,
"email": "jane.doe@example.com",
"currency": "USD",
"requires_shipping": true,
"taxes_included": false,
"subtotal_price": "70.00",
"total_tax": "1.33",
"total_price": "71.33",
"created_at": "2026-09-14T15:02:11+00:00",
"updated_at": "2026-09-14T15:02:11+00:00"
}
}