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

Checkouts

Plus planBigCommerceCustom
The checkout resource allows to create unique checkout experiences.
We currently support Stripe, Apple Pay, Google Pay, and Braintree as payment processor.

Related guides: Mobile payments

Important - The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.

#The checkout object

Plus planBigCommerceCustom
The checkout resource allows to create unique checkout experiences.
We currently support Stripe, Apple Pay, Google Pay, Braintree, Authorize as payment processor.
The Checkout endpoints are only available for BigCommerce and Custom implementations. Checkouts on Shopify must go through Shopify.
If you are using test stripe keys, you can use tok_visa as your token.

Attributes

  • Analytics data containing amongst other things the utm_params
    Show child attributesHide child attributes1
  • Details of the discount code applied to the checkout.
    Show child attributesHide child attributes5
    • amountstring
      The standardised financial value of the discount.
      If the discount is a percentage the amount will be in the presentment currency of the checkout. If the discount is fixed it will be in the store currency.
    • applicableboolean
      Whether the discount is valid for the checkout.
    • If applicable is false provides more details on the reason for rejection.
    • valuestring
      The value of the discount.
      This is not necessarily a financial value. It depends on the value_type. See amount for the financial translation of the discount.
    • The type of discount to be applied.
      Possible values
      fixed_amountpercentage
  • Billing address for the checkout.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • Serves as the audit trail for a buyer email marketing's communication opt-in
  • charge_idinteger
    The id associated to the Charge generated as a by-product of a Checkout being processed.
    This value will remain null as long as the Checkout has not been completed.
  • completed_attimestamp
    The timestamp at which the Checkout was processed.
    This value will remain null as long as the Checkout has not been completed.
  • created_attimestamp
    The timestamp at which the Checkout was created.
  • currencystring
    The presentment currency of the Checkout.
    This will also be the currency of the resulting Address and Subscriptions created by the checkout processing.
  • Discount code to be used on the checkout, e.g. “DISCOUNT20”.
  • emailstring
    Email address for the customer.
  • Field which will hold the value of the corresponding external checkout or cart if the checkout was branched from another platform.
  • Source of the creation of the checkout.
    Possible values
    big_commerceheadlessshopify
  • Customer identifier in the source platform issuing the checkout.
    This field is useful for mapping to your customer id in your central CRM, ERP or any other commerce platform where you maintain your customer's profiles.
  • line_itemsarray of objects
    The details of the different items being purchased by the user.
    Show child attributesHide child attributes29
    • frequency at which the user will pay for his subscription on the item.
    • Day of the month a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is month
    • Day of the week a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is week
    • Number of charges to be processed for the resulting subscription until it expires.
      Used if the user subscription on the item should stop after a few iterations. Frequently used for gift subscriptions. e.g. you offer a 3-month flower subscription to a loved one you can setup expire_after_specific_number_of_charges to 3 and a monthly frequency.
    • Add a delay (in days) to the first recurring transaction on the subscription.
      This number will get added to the already projected next charge date. e.g. if you create a monthly subscription and set the first_recurring_charge_delay to 7, the next transaction for that subscription will be 1months and 7 days post checkout.
    • Name of fulfillment service.
    • gramsinteger
      Weight in grams of the item.
      Only valid for physical items.
    • imagestring
      Image link of the item which shows on the checkout.
    • The price of the item.
    • Specify if the order should be processed on a specific day of the month.
      Only valid if the order_interval_unit is month.
    • Specify if the order should be processed on a specific day of the week.
      Only valid if the order_interval_unit is week.
    • Frequency at which the user will receive orders for the subscription.
    • Unit scale for the frequency of orders and charges.
      Possible values
      dayweekmonth
    • Original price of the item.
      e.g. this number will be different from the price if you offer a subscribe&save option and this line_item is for a subscription to the product.
    • pricestring
      Price charged for the item at checkout.
    • product_idinteger
      Product identifier.
      Found under shopify_product_id ir product_id in the Product object.
    • Category of the product defined in PIM.
    • propertiesarray of objects
      An array of Property object containing customer information for an item that has been added to the checkout.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The url reference for the image (CDN or other).
    • quantityinteger
      The number of units of the product that is purchased.
    • Recurring price of the subscription.
    • Marks if an item needs to be packed and delivered.
    • skustring
      A unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
    • tax_codestring
      Tax category of the product.
    • taxableboolean
      Whether tax applies to the product.
    • titlestring
      The title of the product.
    • typestring
      The type of the item.
      Possible values
      SUBSCRIPTIONONETIME
    • variant_idinteger
      Id of the product variant.
    • The title of the product variant.
    • vendorstring
      The vendor name.
      Useful for platforms managing several vendors
  • notestring
    Note used to store free text notes.
  • note_attributesarray of objects
    Structured note attributes.
    Show child attributesHide child attributes2
    • namestring
      The name for the note_attribute.
    • valuestring
      The value for the associated note_attribute.
  • Name of the payment processor selected for the checkout.
    Will remain null until payment details have been filled in.
  • Identifier for the customer on the payment processor platform.
    Will remain null until the checkout has been processed.
  • Identifier for the transaction on the payment processor platform.
    Will remain null until the checkout has been processed.
  • phonestring
    Customer phone number.
  • Signals if the Order resulting from the processing of the checkout will need to be shipped aka packed and delivered.
    This relies on whether any of the line_items requires_shipping.
  • Shipping address for the checkout.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • Results of the shipping address validation.
    only available once the shipping address has been filled in.
    Show child attributesHide child attributes2
  • shipping_linearray of objects
    Shipping lines.
    Show child attributesHide child attributes5
    • codestring
      The code associated with the shipping line of the charge.
    • pricestring
      The price of the shipping line.
    • sourcestring
      The source of the shipping line.
    • titlestring
      The title of the shipping line.
    • taxablestring
      A boolean indicating if the shipping line is taxable.
  • The name of the shipping rate applied.
  • tax_linesarray of objects
    Tax details.
    Show child attributesHide child attributes4
    • pricestring
      The total tax associated with the listed jurisdiction.
    • ratestring
      The tax rate associated with the listed jurisdiction.
    • titlestring
      The title/name of the taxing jurisdiction.
    • The tax associated with a single unit attributed to the listed jurisdiction.
  • Whether taxes are included in the price of the line_items
  • tokenstring
    Unique identifier of the checkout. Used by the update and processing and update endpoints.
  • Total amount for the full checkout transaction
  • total_taxstring
    Total amount of tax for the full checkout transaction
  • updated_attimestamp
    The timestamp at which the Checkout was last updated.
The checkout object
{
  "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"
        }
      ]
    },
    "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+00:00",
    "currency": "USD",
    "discount_code": "POPUS_25",
    "email": "somerandomemail@test.com",
    "external_checkout_id": "<cart_token>",
    "external_checkout_source": "ecommerce_platform",
    "line_items": [
      {
        "charge_interval_frequency": 5,
        "cutoff_day_of_month": null,
        "cutoff_day_of_week": null,
        "expire_after_specific_number_of_charges": null,
        "first_recurring_charge_delay": null,
        "fulfillment_service": "manual",
        "grams": 1000,
        "image": "//cdn.example.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,
    "note_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": "United States",
      "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+00:00"
  }
}

#Create a checkout

POST/checkouts
Plus planBigCommerceCustom
Endpoint to create a checkout object and start populating it.
Scopewrite_checkouts
The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
The token field received on checkout POST response is the unique identifier for the Checkout. Use it to make updates to the Checkout.

Body parameters

  • Analytics data containing amongst other things the utm_params.
    analytics_data will be added to Subscription, Customer and Charge objects created as a result of the successful processing of the Checkout.
    Show child attributesHide child attributes1
  • Billing address for the checkout.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • Serves as the audit trail for a buyer email marketing's communication opt-in
  • currencystring
    The presentment currency of the Checkout.
    Only currencies set up in the store setting store_presentment_currencies are accepted. This will also be the currency of the resulting Address and Subscriptions created by the checkout processing.
  • Discount code to be used on the checkout, e.g. “DISCOUNT20”.
  • emailstring
    Email address for the customer.
    will be required before being able to process a Checkout.
  • Cart token from ecommerce platform.
  • Ecommerce platform hosting the cart.
    Possible values
    big_commerceheadlessshopify
  • Ecommerce platform hosting the cart.
  • line_itemsarray of objectsRequired
    The details of the different items being purchased by the user.
    will be required before being able to process a Checkout.
    Show child attributesHide child attributes26
    • frequency at which the user will pay for his subscription on the item.
    • Day of the month a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is month
    • Day of the week a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is week
    • Number of charges to be processed for the resulting subscription until it expires.
      Used if the user subscription on the item should stop after a few iterations. Frequently used for gift subscriptions. e.g. you offer a 3-month flower subscription to a loved one you can setup expire_after_specific_number_of_charges to 3 and a monthly frequency.
    • Add a delay (in days) to the first recurring transaction on the subscription.
      This number will get added to the already projected next charge date. e.g. if you create a monthly subscription and set the first_recurring_charge_delay to 7, the next transaction for that subscription will be 1months and 7 days post checkout.
    • Name of fulfillment service.
    • gramsinteger
      Weight in grams of the item.
      Only valid for physical items.
    • imagestring
      Image link of the item which shows on the checkout.
    • Specify if the order should be processed on a specific day of the month.
      Only valid if the order_interval_unit is month.
    • Specify if the order should be processed on a specific day of the week.
      Only valid if the order_interval_unit is week.
    • Frequency at which the user will receive orders for the subscription.
    • Unit scale for the frequency of orders and charges.
      Possible values
      dayweekmonth
    • Original price of the item.
      e.g. this number will be different from the price if you offer a subscribe&save option and this line_item is for a subscription to the product.
    • pricestring
      Price charged for the item at checkout.
    • product_idinteger
      Product identifier in Recharge.
    • Category of the product defined in PIM.
    • propertiesarray of objects
      An array of Property object containing customer information for an item that has been added to the checkout.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The url reference for the image (CDN or other).
    • quantityinteger
      The number of units of the product that is purchased.
    • Marks if an item needs to be packed and delivered.
    • skustring
      A unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
    • tax_codestring
      Tax category of the product.
    • taxableboolean
      Whether tax applies to the product.
    • titlestring
      The title of the product.
    • typestring
      The type of the item.
      Possible values
      SUBSCRIPTIONONETIME
    • variant_idinteger
      Id of the product variant.
    • The title of the product variant.
  • notestring
    Note used to store free text notes.
  • note_attributesarray of objects
    Structured note attributes.
    Show child attributesHide child attributes2
    • namestring
      The name for the note_attribute.
    • valuestring
      The value for the associated note_attribute.
  • phonestring
    Customer phone number.
  • Shipping address for the checkout.
    will be required before being able to process a Checkout.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.

Response attributes

POST/checkouts
curl 'https://api.rechargeapps.com/checkouts' \
 -H 'Content-Type: application/json' \
 -H 'X-Recharge-Access-Token: your_api_token' \
 -d '{
  "analytics_data": {
    "utm_params": [{
      "utm_campaign": "spring_sale",
      "utm_content": "textlink",
      "utm_data_source": "website_cookie",
      "utm_medium": "cpc",
      "utm_source": "google",
      "utm_term": "mleko",
      "utm_timestamp": "2020-03-05"
    }]
  },
  "discount_code": "POPUS_25",
  "email":"somerandomemail@test.com",
  "external_checkout_id": "<cart_token>",
  "external_checkout_source": "custom",
  "line_items": [
    {
      "charge_interval_frequency": 5,
      "cutoff_day_of_month": None,
      "cutoff_day_of_week": None,
      "expire_after_specific_number_of_charges": None,
      "fulfillment_service": "manual",
      "order_day_of_month": None,
      "order_day_of_week": None,
      "order_interval_frequency": 5,
      "order_interval_unit": "day",
      "product_id": 4546063663207,
      "quantity": 6,
      "requires_shipping": True,
      "taxable": True,
      "variant_id": 32165284380775
    }
  ],
  "shipping_address": {
    "address1": "6419 Ocean Front Walk",
    "address2": "Apt 2",
    "city": "Los Angeles",
    "company": "",
    "country": "United States",
    "first_name": "Novak",
    "last_name": "Djokovic",
    "phone": "1-800-800-8000",
    "province": "California",
    "zip": "90293"
  }
}'
Response
{
  "checkout": {
    "analytics_data": {
      "utm_params": [
        {
          "utm_campaign": "spring_sale",
          "utm_content": "textlink",
          "utm_data_source": "website_cookie",
          "utm_medium": "cpc",
          "utm_source": "google",
          "utm_term": "mleko",
          "utm_timestamp": "2020-03-05T00:00:00"
        }
      ]
    },
    "applied_discount": {
      "amount": "7.50",
      "applicable": true,
      "non_applicable_reason": "",
      "value": "7.50",
      "value_type": "fixed_amount"
    },
    "billing_address": {
      "address1": "6419 Ocean Front Walk",
      "address2": "Apt 2",
      "city": "Los Angeles",
      "company": "",
      "country": "United States",
      "first_name": "Novak",
      "last_name": "Djokovic",
      "phone": "1-800-800-8000",
      "province": "California",
      "zip": "90293"
    },
    "buyer_accepts_marketing": false,
    "charge_id": null,
    "completed_at": null,
    "created_at": "2020-07-10T09:21:46.259352+00:00",
    "currency": "USD",
    "discount_code": "POPUS_25",
    "email": "somerandomemail@test.com",
    "external_checkout_id": "<cart_token>",
    "external_checkout_source": "custom",
    "external_customer_id": "someone",
    "line_items": [
      {
        "charge_interval_frequency": 5,
        "cutoff_day_of_month": null,
        "cutoff_day_of_week": null,
        "expire_after_specific_number_of_charges": null,
        "first_recurring_charge_delay": null,
        "fulfillment_service": "manual",
        "grams": 1000,
        "handle": null,
        "image": "//cdn.example.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,
    "note_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": "United States",
      "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": "1.28",
    "updated_at": "2020-07-10T09:21:46.284703+00:00"
  }
}

#Retrieve a checkout

GET/checkouts/{token}
Plus planBigCommerceCustom
Retrieve a checkout
Scoperead_checkouts
The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
GET/checkouts/{token}
curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "checkout": {
    "analytics_data": {
      "utm_params": [
        {
          "utm_campaign": "spring_sale",
          "utm_content": "textlink",
          "utm_data_source": "website_cookie",
          "utm_medium": "cpc",
          "utm_source": "google",
          "utm_term": "mleko",
          "utm_timestamp": "2020-03-05T00: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",
    "discount_code": "POPUS_25",
    "email": "somerandomemail@test.com",
    "external_checkout_id": "<cart_token>",
    "external_checkout_source": "headless",
    "line_items": [
      {
        "charge_interval_frequency": 5,
        "cutoff_day_of_month": null,
        "cutoff_day_of_week": null,
        "expire_after_specific_number_of_charges": null,
        "first_recurring_charge_delay": null,
        "fulfillment_service": "manual",
        "grams": 1000,
        "image": "//cdn.example.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,
    "note_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": "United States",
      "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"
  }
}

#Update a checkout

PUT/checkouts/{token}
Plus planBigCommerceCustom
You can modify an existing checkout to match the specified parameters.

Related guides: Checkout integrations
Scopewrite_checkouts
The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
If you are using test stripe keys, you can use tok_visa as your token.

Body parameters

  • Analytics data containing amongst other things the utm_params.
    analytics_data will be added to Subscription, Customer and Charge objects created as a result of the successful processing of the Checkout.
    Show child attributesHide child attributes1
  • Billing address for the checkout.
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
  • Does the buyer accept marketing, newsletters etc.
  • currencystring
    The presentment currency of the Checkout.
    Only currencies set up in the store setting store_presentment_currencies are accepted. This will also be the currency of the resulting Address and Subscriptions created by the checkout processing.
  • Discount code to be used on the checkout, e.g. “DISCOUNT20”.
  • emailstring
    Email address for the customer.
  • Cart token from ecommerce platform.
  • Ecommerce platform hosting the cart.
    Possible values
    big_commerceheadlessshopify
  • Ecommerce platform hosting the cart.
  • line_itemsarray of objects
    quantity, product_id and variant_id are required parameters in line_items.
    Show child attributesHide child attributes26
    • frequency at which the user will pay for his subscription on the item.
    • Day of the month a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is month
    • Day of the week a customer should be charged. Used only if the user is to be charged on a specific day.
      Only valid if the order_interval_unit is week
    • Number of charges to be processed for the resulting subscription until it expires.
      Used if the user subscription on the item should stop after a few iterations. Frequently used for gift subscriptions. e.g. you offer a 3-month flower subscription to a loved one you can setup expire_after_specific_number_of_charges to 3 and a monthly frequency.
    • Add a delay (in days) to the first recurring transaction on the subscription.
      This number will get added to the already projected next charge date. e.g. if you create a monthly subscription and set the first_recurring_charge_delay to 7, the next transaction for that subscription will be 1months and 7 days post checkout.
    • Name of fulfillment service.
    • gramsinteger
      Weight in grams of the item.
      Only valid for physical items.
    • imagestring
      Image link of the item which shows on the checkout.
    • Specify if the order should be processed on a specific day of the month.
      Only valid if the order_interval_unit is month.
    • Specify if the order should be processed on a specific day of the week.
      Only valid if the order_interval_unit is week.
    • Frequency at which the user will receive orders for the subscription.
    • Unit scale for the frequency of orders and charges.
      Possible values
      dayweekmonth
    • Original price of the item.
      e.g. this number will be different from the price if you offer a subscribe&save option and this line_item is for a subscription to the product.
    • pricestring
      Price charged for the item at checkout.
    • product_idinteger
      Product identifier in Recharge.
    • Category of the product defined in PIM.
    • propertiesarray of objects
      An array of Property object containing customer information for an item that has been added to the checkout.
      Show child attributesHide child attributes2
      • namestring
        The name of the property.
      • valuestring
        The url reference for the image (CDN or other).
    • quantityinteger
      The number of units of the product that is purchased.
    • Marks if an item needs to be packed and delivered.
    • skustring
      A unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
    • tax_codestring
      Tax category of the product.
    • taxableboolean
      Whether tax applies to the product.
    • titlestring
      The title of the product.
    • typestring
      The type of the item.
      Possible values
      SUBSCRIPTIONONETIME
    • variant_idinteger
      Id of the product variant.
    • The title of the product variant.
  • notestring
    Note attribute used to store custom notes.
  • note_attributesarray of objects
    Each array entry must contain a dictionary with “name” and “value” keys.
    Show child attributesHide child attributes2
    • namestring
      The name for the note_attribute.
    • valuestring
      The value for the associated note_attribute.
  • When set to true, shipping address validations are reduced to only require country and zip when creating/updating a checkout. The full shipping address including address line 1 must be added to the checkout before processing associated charges. This is helpful for mobile payments.

    Related guides: Mobile payments
  • phonestring
    Customer phone number.
  • Shipping 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 payment
    Show child attributesHide child attributes22
    • idinteger
      Unique numeric identifier for the Address.
    • address1string
      The street associated with the Address.
    • address2string
      Any additional information associated with the shipping address.
    • cart_notestringBigCommerceCustomRCS
      The note that that will be passed to the note field of Orders made within the Address.
      cart_note is not currently honored when sent to the Shopify contract api (SCI).
    • citystring
      The city associated with the shipping address.
    • companystring
      The company associated with the shipping address.
    • countrystring
      The country associated with the shipping address.
    • The 2-letter country code.
    • Unique numeric identifier for the Customer associated with the Address.
    • Unique numeric identifier of Discount that is applied on the Address.
    • The customer’s first name associated with the address.
    • last_namestring
      The customer’s last name associated with the address.
    • note_attributesarray of objects
      Extra information that is added to the order.
      Show child attributesHide child attributes2
      • namestring
        The name for the note_attribute.
      • valuestring
        The value for the associated note_attribute.
    • phonestring
      The phone number associated with the address.
    • Presentment currency is the currency used to display prices to the associated on a storefront and at checkout.
      Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
    • provincestring
      The state or province associated with the address.
    • shipping_lines_overridearray of objects
      Used when shipping rates need to be overridden. If this parameter has value null, rates will be fetched when a related Charge is created or regenerated
      Show child attributesHide child attributes3
      • codestring
        The code of the associated shipping line.
      • pricestring
        The price (in store’s currency) of the associated shipping line.
      • titlestring
        The title of the associated shipping line.
    • zipstring
      The zip or postal code associated with the address.
    • Additional information added to an initial order.
      Important: This field will be deprecated. Please use note_attributes instead.
    • created_atdatetime
      The date and time when the address was created.
    • Shipping line details.
      Important: This field will be deprecated. Please use shipping_lines_override instead.
    • updated_atdatetime
      The date and time when the Address was last updated.
PUT/checkouts/{token}
curl -X PUT 'https://api.rechargeapps.com/checkouts/98ac7af0c9d447019379c6ccdb24d069' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "line_items": [
    {
      "product_id": 4546063663207,
      "quantity": 6,
      "variant_id": 3844924611
    }
  ]
}'
Response
{
  "checkout": {
    "analytics_data": {
      "utm_params": [
        {
          "utm_campaign": "spring_sale",
          "utm_content": "textlink",
          "utm_data_source": "website_cookie",
          "utm_medium": "cpc",
          "utm_source": "google",
          "utm_term": "mleko",
          "utm_timestamp": "2020-03-05T00: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",
    "discount_code": "POPUS_25",
    "email": "somerandomemail@test.com",
    "external_checkout_id": "<cart_token>",
    "external_checkout_source": "headless",
    "line_items": [
      {
        "charge_interval_frequency": 5,
        "cutoff_day_of_month": null,
        "cutoff_day_of_week": null,
        "expire_after_specific_number_of_charges": null,
        "first_recurring_charge_delay": null,
        "fulfillment_service": "manual",
        "grams": 1000,
        "image": "//cdn.example.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,
    "note_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": "United States",
      "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
Plus planBigCommerceCustom
Retrieve all shipping rates for a specific checkout.
Scoperead_checkouts
The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.

Response attributes

  • checkoutobject
    Relevant checkout details for Shipping rates availability.
    Show child attributesHide child attributes3
    • Price excluding shipping and tax, including discounts.
    • Total price including tax and shipping cost for that particular shipping rate.
    • total_taxstring
      Total tax value for the checkout.
  • codestring
    Code given to the shipping rate entry.
  • Long form version of the title to provide details on the shipping rate.
  • handlestring
    Unique identifier for the shipping rate.
  • namestring
    Name of the shipping rate.
  • Specifies if a phone number must be required if this shipping rate is selected by the user.
  • pricestring
    Price of the shipping rate.
  • tax_linesobject
    Tax lines associated with the shipping rate if tax is being charged on shipping.
  • titlestring
    Title of the shipping rate.
GET/checkouts/{token}/shipping_rates
curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005/shipping_rates' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "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",
      "tax_lines": [],
      "title": "Standard"
    }
  ]
}

#Process a checkout

POST/checkouts/{token}/charge
Plus planBigCommerceCustom
You can process and charge checkout using our API.
Scopewrite_checkouts
The Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
The Checkout API supports 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. For checkouts using Mobile Payments, see Mobile Payments with Checkout API

Body parameters

  • payment_processorstringRequired
    The name of payment processor.
    Possible values
    stripebraintreemollieauthorize
  • payment_tokenstringRequired
    Payment token that will be used in transaction.
    For stripe this field needs to be populated with a payment method.
    For braintree this field needs to be populated with a payment nonce.
    For mollie this field needs to be populated with a mandate.
  • It identifies the payment type.
    Possible values
    CREDIT_CARDPAYPALAPPLE_PAYGOOGLE_PAY

Response attributes

  • Unique identifier for the authorization of the charge.
  • charge_idstring
    Unique identifier for the charge resulting from the processing of the checkout.
  • freeboolean
    Boolean to identify if the checkout was free.
  • Payment processor used for the checkout.
  • Unique identifier for the customer created in the payment service provider platform (aka PSP).
  • Unique identifier for the transaction created in the payment service provider platform (aka PSP).
  • Token used for the checkout which will be reused for future transaction processing unless replaced.
  • Payment type used for the checkout.
  • statusstring
    Status of the checkout
POST/checkouts/{token}/charge
curl -X POST 'https://api.rechargeapps.com/checkouts/5a5c19ea31c44641855017f1276db959/charge' \
  -H 'Content-Type: application/json' \
  -H 'X-Recharge-Access-Token: your_api_token' \
  -d '{
  "payment_processor": "stripe",
  "payment_token": "<payment_token>",
  "payment_type": "CREDIT_CARD"
}'
Response
{
  "checkout_charge": {
    "authorization_token": null,
    "charge_id": 258065996,
    "free": false,
    "payment_processor": "stripe",
    "payment_processor_customer_id": "cus_HcbgqiS49fABBg62E",
    "payment_processor_transaction_id": "ch_1H3McXJ2zdqHvZaRd191xV2idRt",
    "payment_token": "tok_visa",
    "payment_type": "CREDIT_CARD",
    "status": "successful"
  }
}