Core Resources
Checkouts
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
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
The checkout resource allows to create unique checkout experiences.
We currently support Stripe, Apple Pay, Google Pay, Braintree, Authorize as payment processor.
We currently support Stripe, Apple Pay, Google Pay, Braintree, Authorize as payment processor.
The
If you are using test stripe keys, you can use
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_dataobjectAnalytics data containing amongst other things the
utm_paramsShow child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_parameterswhich are commonly used to store the details of an acquisition campaign.Show child attributesHide child attributes7
- utm_campaignstringThe utm campaign details.
- 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_discountobjectDetails of the discount code applied to the checkout.
Show child attributesHide child attributes5
- amountstringThe 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.
- applicablebooleanWhether the discount is valid for the checkout.
- non_applicable_reasonstringIf
applicableisfalseprovides more details on the reason for rejection. - valuestringThe value of the discount.This is not necessarily a financial value. It depends on the
value_type. Seeamountfor the financial translation of the discount. - value_typestringThe type of discount to be applied.Possible values
fixed_amountpercentage
- billing_addressobjectBilling address for the checkout.
Show child attributesHide child attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
- buyer_accepts_marketingbooleanServes as the audit trail for a buyer email marketing's communication opt-in
- charge_idintegerThe
idassociated to theChargegenerated as a by-product of aCheckoutbeing processed.This value will remainnullas long as theCheckouthas not been completed. - completed_attimestampThe timestamp at which the
Checkoutwas processed.This value will remainnullas long as theCheckouthas not been completed. - created_attimestampThe timestamp at which the
Checkoutwas created. - currencystringThe presentment currency of the
Checkout.This will also be the currency of the resulting Address and Subscriptions created by the checkout processing. - discount_codestringDiscount code to be used on the checkout, e.g. “DISCOUNT20”.
- emailstringEmail address for the customer.
- external_checkout_idstringField which will hold the value of the corresponding external checkout or cart if the checkout was branched from another platform.
- external_checkout_sourcestringSource of the creation of the checkout.Possible values
big_commerceheadlessshopify - external_customer_idstringCustomer 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 objectsThe details of the different items being purchased by the user.
Show child attributesHide child attributes29
- charge_interval_frequencyintegerfrequency at which the user will pay for his subscription on the item.
- cutoff_day_of_monthintegerDay 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_unitismonth - cutoff_day_of_weekintegerDay 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_unitisweek - 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_chargesto 3 and a monthly frequency. - first_recurring_charge_delayintegerAdd 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.
- fulfillment_servicestringName of fulfillment service.
- gramsintegerWeight in grams of the item.Only valid for physical items.
- imagestringImage link of the item which shows on the checkout.
- line_pricestringThe price of the item.
- order_day_of_monthintegerSpecify if the order should be processed on a specific day of the month.Only valid if the
order_interval_unitismonth. - order_day_of_weekintegerSpecify if the order should be processed on a specific day of the week.Only valid if the
order_interval_unitisweek. - order_interval_frequencyintegerFrequency at which the user will receive orders for the subscription.
- order_interval_unitstringUnit scale for the frequency of orders and charges.Possible values
dayweekmonth - original_pricestringOriginal 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.
- pricestringPrice charged for the item at checkout.
- product_idintegerProduct identifier.Found under
shopify_product_idirproduct_idin theProductobject. - product_typestringCategory of the product defined in PIM.
- propertiesarray of objectsAn array of
Propertyobject containing customer information for an item that has been added to the checkout. - quantityintegerThe number of units of the product that is purchased.
- recurring_priceintegerRecurring price of the subscription.
- requires_shippingbooleanMarks if an item needs to be packed and delivered.
- skustringA unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
- tax_codestringTax category of the product.
- taxablebooleanWhether tax applies to the product.
- titlestringThe title of the product.
- typestringThe type of the item.Possible values
SUBSCRIPTIONONETIME - variant_idintegerId of the product variant.
- variant_titlestringThe title of the product variant.
- vendorstringThe vendor name.Useful for platforms managing several vendors
- notestringNote used to store free text notes.
- note_attributesarray of objectsStructured note attributes.
- payment_processorstringName of the payment processor selected for the checkout.Will remain
nulluntil payment details have been filled in. - Identifier for the customer on the payment processor platform.Will remain
nulluntil the checkout has been processed. - Identifier for the transaction on the payment processor platform.Will remain
nulluntil the checkout has been processed. - phonestringCustomer phone number.
- requires_shippingbooleanSignals if the
Orderresulting from the processing of the checkout will need to be shipped aka packed and delivered.This relies on whether any of theline_itemsrequires_shipping. - shipping_addressobjectShipping address for the checkout.
Show child attributesHide child attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
- Results of the shipping address validation.only available once the shipping address has been filled in.
Show child attributesHide child attributes2
- country_is_supportedbooleanchecks if country is in the list of shipping countries.
- upsbooleanups supported.
- shipping_linearray of objectsShipping lines.
Show child attributesHide child attributes5
- shipping_ratestringThe name of the shipping rate applied.
- tax_linesarray of objectsTax details.
Show child attributesHide child attributes4
- pricestringThe total tax associated with the listed jurisdiction.
- ratestringThe tax rate associated with the listed jurisdiction.
- titlestringThe title/name of the taxing jurisdiction.
- unit_pricestringThe tax associated with a single unit attributed to the listed jurisdiction.
- taxes_includedbooleanWhether taxes are included in the price of the line_items
- tokenstringUnique identifier of the checkout. Used by the update and processing and update endpoints.
- total_pricestringTotal amount for the full checkout transaction
- total_taxstringTotal amount of tax for the full checkout transaction
- updated_attimestampThe timestamp at which the
Checkoutwas last updated.
{
"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
Endpoint to create a checkout object and start populating it.
Scope
write_checkoutsThe
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_dataobjectAnalytics data containing amongst other things the
utm_params.analytics_datawill be added toSubscription,CustomerandChargeobjects created as a result of the successful processing of theCheckout.Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_parameterswhich are commonly used to store the details of an acquisition campaign.Show child attributesHide child attributes7
- utm_campaignstringThe utm campaign details.
- 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.
- billing_addressobjectBilling address for the checkout.
Show child attributesHide child attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
- buyer_accepts_marketingbooleanServes as the audit trail for a buyer email marketing's communication opt-in
- currencystringThe presentment currency of the
Checkout.Only currencies set up in the store settingstore_presentment_currenciesare accepted. This will also be the currency of the resulting Address and Subscriptions created by the checkout processing. - discount_codestringDiscount code to be used on the checkout, e.g. “DISCOUNT20”.
- emailstringEmail address for the customer.will be required before being able to process a
Checkout. - external_checkout_idstringCart token from ecommerce platform.
- external_checkout_sourcestringEcommerce platform hosting the cart.Possible values
big_commerceheadlessshopify - Ecommerce platform hosting the cart.
- 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
- charge_interval_frequencyintegerfrequency at which the user will pay for his subscription on the item.
- cutoff_day_of_monthintegerDay 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_unitismonth - cutoff_day_of_weekintegerDay 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_unitisweek - 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_chargesto 3 and a monthly frequency. - first_recurring_charge_delayintegerAdd 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.
- fulfillment_servicestringName of fulfillment service.
- gramsintegerWeight in grams of the item.Only valid for physical items.
- imagestringImage link of the item which shows on the checkout.
- order_day_of_monthintegerSpecify if the order should be processed on a specific day of the month.Only valid if the
order_interval_unitismonth. - order_day_of_weekintegerSpecify if the order should be processed on a specific day of the week.Only valid if the
order_interval_unitisweek. - order_interval_frequencyintegerFrequency at which the user will receive orders for the subscription.
- order_interval_unitstringUnit scale for the frequency of orders and charges.Possible values
dayweekmonth - original_pricestringOriginal 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.
- pricestringPrice charged for the item at checkout.
- product_idintegerProduct identifier in Recharge.
- product_typestringCategory of the product defined in PIM.
- propertiesarray of objectsAn array of
Propertyobject containing customer information for an item that has been added to the checkout. - quantityintegerThe number of units of the product that is purchased.
- requires_shippingbooleanMarks if an item needs to be packed and delivered.
- skustringA unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
- tax_codestringTax category of the product.
- taxablebooleanWhether tax applies to the product.
- titlestringThe title of the product.
- typestringThe type of the item.Possible values
SUBSCRIPTIONONETIME - variant_idintegerId of the product variant.
- variant_titlestringThe title of the product variant.
- notestringNote used to store free text notes.
- note_attributesarray of objectsStructured note attributes.
- phonestringCustomer phone number.
- shipping_addressobjectShipping address for the checkout.will be required before being able to process a
Checkout.Show child attributesHide child attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
Response attributes
- errorsobject
RelatedCheckout integrations →
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"
}
}'{
"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}
Retrieve a checkout
Scope
read_checkoutsThe
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005' \
-H 'X-Recharge-Access-Token: your_api_token'{
"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}
You can modify an existing checkout to match the specified parameters.
Related guides: Checkout integrations
Related guides: Checkout integrations
Scope
write_checkoutsThe
If you are using test stripe keys, you can use
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_dataobjectAnalytics data containing amongst other things the
utm_params.analytics_datawill be added toSubscription,CustomerandChargeobjects created as a result of the successful processing of theCheckout.Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_parameterswhich are commonly used to store the details of an acquisition campaign.Show child attributesHide child attributes7
- utm_campaignstringThe utm campaign details.
- 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.
- billing_addressobjectBilling address for the checkout.
Show child attributesHide child attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
- buyer_accepts_marketingbooleanDoes the buyer accept marketing, newsletters etc.
- currencystringThe presentment currency of the
Checkout.Only currencies set up in the store settingstore_presentment_currenciesare accepted. This will also be the currency of the resulting Address and Subscriptions created by the checkout processing. - discount_codestringDiscount code to be used on the checkout, e.g. “DISCOUNT20”.
- emailstringEmail address for the customer.
- external_checkout_idstringCart token from ecommerce platform.
- external_checkout_sourcestringEcommerce platform hosting the cart.Possible values
big_commerceheadlessshopify - Ecommerce platform hosting the cart.
- line_itemsarray of objects
quantity,product_idandvariant_idare required parameters in line_items.Show child attributesHide child attributes26
- charge_interval_frequencyintegerfrequency at which the user will pay for his subscription on the item.
- cutoff_day_of_monthintegerDay 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_unitismonth - cutoff_day_of_weekintegerDay 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_unitisweek - 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_chargesto 3 and a monthly frequency. - first_recurring_charge_delayintegerAdd 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.
- fulfillment_servicestringName of fulfillment service.
- gramsintegerWeight in grams of the item.Only valid for physical items.
- imagestringImage link of the item which shows on the checkout.
- order_day_of_monthintegerSpecify if the order should be processed on a specific day of the month.Only valid if the
order_interval_unitismonth. - order_day_of_weekintegerSpecify if the order should be processed on a specific day of the week.Only valid if the
order_interval_unitisweek. - order_interval_frequencyintegerFrequency at which the user will receive orders for the subscription.
- order_interval_unitstringUnit scale for the frequency of orders and charges.Possible values
dayweekmonth - original_pricestringOriginal 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.
- pricestringPrice charged for the item at checkout.
- product_idintegerProduct identifier in Recharge.
- product_typestringCategory of the product defined in PIM.
- propertiesarray of objectsAn array of
Propertyobject containing customer information for an item that has been added to the checkout. - quantityintegerThe number of units of the product that is purchased.
- requires_shippingbooleanMarks if an item needs to be packed and delivered.
- skustringA unique identifier of the item in the fulfillment. Stands for Stock Keeping Unit.
- tax_codestringTax category of the product.
- taxablebooleanWhether tax applies to the product.
- titlestringThe title of the product.
- typestringThe type of the item.Possible values
SUBSCRIPTIONONETIME - variant_idintegerId of the product variant.
- variant_titlestringThe title of the product variant.
- notestringNote attribute used to store custom notes.
- note_attributesarray of objectsEach array entry must contain a dictionary with “name” and “value” keys.
- partial_shippingbooleanWhen 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 - phonestringCustomer phone number.
- 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 attributes22
- idintegerUnique numeric identifier for the
Address. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the shipping address.
- The note that that will be passed to the
notefield ofOrdersmade within theAddress.cart_noteis not currently honored when sent to the Shopify contract api (SCI). - citystringThe city associated with the shipping address.
- companystringThe company associated with the shipping address.
- countrystringThe country associated with the shipping address.
- country_codestringThe 2-letter country code.
- customer_idintegerUnique numeric identifier for the
Customerassociated with theAddress. - discount_idintegerUnique numeric identifier of
Discountthat is applied on theAddress. - first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- note_attributesarray of objectsExtra information that is added to the order.
- phonestringThe 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.
- provincestringThe state or province associated with the address.
- shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- cart_attributesarrayAdditional information added to an initial order.Important: This field will be deprecated. Please use
note_attributesinstead. - created_atdatetimeThe date and time when the address was created.
- Shipping line details.Important: This field will be deprecated. Please use
shipping_lines_overrideinstead. - updated_atdatetimeThe date and time when the
Addresswas last updated.
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
}
]
}'{
"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
Retrieve all shipping rates for a specific checkout.
Scope
read_checkoutsThe
Checkout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.Response attributes
- checkoutobjectRelevant checkout details for Shipping rates availability.
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 given to the shipping rate entry.
- delivery_rangestring
- descriptionstringLong form version of the title to provide details on the shipping rate.
- handlestringUnique identifier for the shipping rate.
- namestringName of the shipping rate.
- phone_requiredbooleanSpecifies if a phone number must be required if this shipping rate is selected by the user.
- pricestringPrice of the shipping rate.
- tax_linesobjectTax lines associated with the shipping rate if tax is being charged on shipping.
- titlestringTitle of the shipping rate.
curl 'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005/shipping_rates' \
-H 'X-Recharge-Access-Token: your_api_token'{
"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
You can process and charge checkout using our API.
Scope
write_checkoutsThe
The Checkout API supports Stripe, Apple Pay, Google Pay, and Braintree as payment processor.
If you are using test stripe keys, you can use
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 APIBody parameters
- The name of payment processor.Possible values
stripebraintreemollieauthorize - Payment token that will be used in transaction.For
stripethis field needs to be populated with a payment method.
Forbraintreethis field needs to be populated with a payment nonce.
Formolliethis field needs to be populated with a mandate. - payment_typestringIt identifies the payment type.Possible values
CREDIT_CARDPAYPALAPPLE_PAYGOOGLE_PAY
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.
- 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).
- payment_tokenstringToken used for the checkout which will be reused for future transaction processing unless replaced.
- payment_typestringPayment type used for the checkout.
- statusstringStatus of the checkout
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"
}'{
"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"
}
}