Core Resources
Charges
A charge is the representation of a financial transaction linked to the purchase of an item (past or future). It can be a transaction that was processed already or the representation of an upcoming transaction. A charge is linked to its corresponding Orders( one Order for pay as you go subscriptions and several for pre-paid).
Order are created once the corresponding Charge is successful. After successful payment, the first order will be immediately submitted to the external platform if applicable (e.g. Shopify, BigCommerce).
#The charge object
A
A
Charge is the representation of the financial transaction linked to a purchase (past or future). It can be a transaction that was processed already or the representation of an upcoming transaction. A charge is linked to its corresponding Orders (one for pay as you go subscriptions and several for pre-paid).A
Charge can have many parent subscriptions. All subscriptions on a given Address with the same next_charge_date date will be merged into one Charge and that charge will contain one line_item per Subscription.Attributes
- idintegerThe unique numeric identifier for the charge.
- address_idintegerThe customer shipping address the charge is tied to.
- analytics_dataobjectAn object containing analytics data associated with the charge.
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_addressobjectAll the billing information related to the charge.
Show child attributesHide child attributes10
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- countrystringThe country of the billing address.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code of the billing address.
- client_detailsobjectDetails of the access method used by the purchaser.
Show child attributesHide child attributes2
- browser_ipstringThe IP address of the buyer as detected in checkout.
- user_agentstringThe user agent detected during checkout.
- created_atdatetimeWhen the
Chargewas created. - customer_hashstringThe
hashof theCustomerassociated with the charge. - customer_idstringThe
idof theCustomerassociated with the charge. - discount_codesobjectAn array of discounts associated with the charge.
Show child attributesHide child attributes4
- recharge_discount_idintegerThe id of a discount associated with this charge.
- codestringThe code of the discount applied on this charge.
- valuefloatThe value of the discount applied to the charge.
- typestringThe type of the value of the discount applied to the charge (percentage, fixed_amount).
- emailstringThe email address of the customer.
- first_namestringThe first name of the customer.
- Specifies whether the charge is scheduled for a regeneration (if the subscription related to the charge was updated in the last 5 seconds using “commit_update”:false).
- last_namestringThe last name of the customer.
- line_itemsarray of objectsA list of
line_itemobjects, each one containing information about an item in the charge. Oneline_itemper subscription.Show child attributesHide child attributes12
- gramintegerWeight in gram of the item.
- imagesobjectWeight in gram of the item.
- original_pricestringThe original price of the item without discounts or taxes.
- pricestringThe price of the item.
- propertiesarray of objectsAn array of
Propertyobject containing customer information for an item. - quantityintegerThe number of products that were purchased.
- shopify_product_idintegerThe unique numeric identifier for the Shopify product in the fulfillment.
- shopify_variant_idintegerThe id of the Shopify product variant.
- skustringA unique identifier of the item in the fulfillment.
- titlestringThe title of the product.
- variant_titlestringThe title of the product variant.
- subscription_idintegerThe id of the corresponding
Subscription.
- notestringShows the next order in sequence.
- note_attributesarray of objectsnote attributes.
- processor_namestringThe payment processor used on the charge.
- processed_atdatetimeThe date and time when the transaction was processed.
- scheduled_atdatetimeWhen the charge processing will next be attempted.If a charge failed to process,
scheduled_atremains the initial scheduled date of the processing not the date of the next attempt. - shipments_countintegerThe number of successfully processed child orders on the charge.
- shipping_addressobjectThe shipping address of the shipping address.
Show child attributesHide child attributes10
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- countrystringThe country of the billing address.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code of the billing address.
- shipping_linesarray of objectsAn array of shipping lines associated with the charge.
Show child attributesHide child attributes5
- shopify_order_idintegerThe unique numeric identifier within Shopify for the charge
- statusstringThe status of the charge.Possible values
SUCCESSERRORQUEUEDSKIPPEDREFUNDEDPARTIALLY_REFUNDED - The item price without taxes and discounts. Use subtotal_price instead.
- subtotal_pricestringThe item price without taxes and shipping.
- tax_linesarray of objectsArray of strings used to distinguish specific charges.
Show child attributesHide child attributes5
- total_discountsstringThe sum of the discounts applied to the
Charge. - total_line_items_pricestringThe sum of all the prices of all the items in the charge.
- total_pricestringThe sum of all the prices of all the items in the charge, taxes and discounts included (must be positive).
- total_refundsstringThe sum of all refunds that were made on specific charge.
- total_weightstringThe sum of all refunds that were made on specific charge.
- transaction_idstringThe unique alphanumeric identifier of the transaction.
- typestringThe type of the charge.Possible values
CHECKOUTRECURRING - updated_atdatetimeThe date and time when the
Chargewas last updated. - errorstringError reason as sentence text (typically returned direct from the payment processor). e.g.
"Customer needs to update credit card" - error_typestringStructured reason why the charge failed such as
CUSTOMER_NEEDS_TO_UPDATE_CARD - last_charge_attempt_datedatetimeThe date when a charge was last attempted.
- number_times_triedintegerShows how many times an attempt to charge was placed.
- retry_datedateThe date when the next attempt will be placed.
- shopify_variant_id_not_foundintegerIndicates if Recharge was able to find the
shopify_variant_idfrom the charge.
{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": "next order #1",
"note_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"processor_name": "stripe",
"scheduled_at": "2018-12-12T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": 12345,
"status": "QUEUED",
"sub_total": 12,
"subtotal_price": "12:00",
"tags": "Subscription",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:45:44"
}
}#Retrieve a charge
GET/charges/{id}
Retrieve a charge using the Recharge charge id.
Scope
read_ordersStarting March 19th, 2025, processed charges (those where status equals success, refunded, or partially-refunded) that have a value for processed_at greater than 90 days in the past will no longer appear in responses. As a result, you may receive an error.
Charge data processed over 90 days ago will remain available through the Exports tool in the Recharge merchant portal and within the Merchant portal UI.
Example of unaffected API calls:
[RETRIEVE A CHARGE]
Example of API calls that will result in an error:
[RETRIEVE A CHARGE]
Charge data processed over 90 days ago will remain available through the Exports tool in the Recharge merchant portal and within the Merchant portal UI.
Example of unaffected API calls:
[RETRIEVE A CHARGE]
/charges/{id} (if it's a charge that does not have a processed_at date or the processed_at date is within the last 90 days) Example of API calls that will result in an error:
[RETRIEVE A CHARGE]
/charges/{id} (if it's a charge with a processed_at date older than 90 days)curl 'https://api.rechargeapps.com/charges/100714428' \
-H 'X-Recharge-Access-Token: your_api_token'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": "next order #1",
"note_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"processor_name": "stripe",
"scheduled_at": "2018-12-12T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": 12345,
"status": "QUEUED",
"sub_total": 12,
"subtotal_price": "12:00",
"tags": "Subscription",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:45:44"
}
}#List charges
GET/charges
Returns a list of charges.
HTTPS request examples
GET /charges?address_id=21317826 GET /charges?customer_id=18819267 GET /charges?date_min=2021-05-18&date_max=2021-06-18 GET /charges?discount_code=10PERCENTOFF GET /charges?discount_id=753963GET /charges?ids=1123551,262667345,12341535 GET /charges?shopify_order_id=7895652 GET /charges?sort_by=id-desc GET /charges?status=queued GET /charges?status=queued,refunded,partially_refunded GET /charges?subscription_id=753489514Scope
read_ordersStarting March 19th, 2025, processed charges (those where status equals success, refunded, or partially- refunded) that have a value for processed_at greater than 90 days in the past will no longer appear in responses. As a result, you may receive a partial data set or an empty list.
Charge data processed over 90 days ago will remain available through the Exports tool in the Recharge merchant portal and within the Merchant portal UI.
Examples of unaffected API calls:
[LIST CHARGES]
[LIST CHARGES]
Examples of API calls that may return partial results:
[LIST CHARGES]
[LIST CHARGES]
Example of API calls that will result in an empty list:
[LIST CHARGES]
Reminder: returned charges are sorted ascending by id value by default.
Charge data processed over 90 days ago will remain available through the Exports tool in the Recharge merchant portal and within the Merchant portal UI.
Examples of unaffected API calls:
[LIST CHARGES]
/charges?status=queued [LIST CHARGES]
/charges?status=error Examples of API calls that may return partial results:
[LIST CHARGES]
/charges?processed_at_min=2024-01-01 (this would only return results that have a processed_at date in the last 90 days)[LIST CHARGES]
/charges?status=success,queued (this would return all queued charges but only return success charges that have a processed_at date in the last 90 days)Example of API calls that will result in an empty list:
[LIST CHARGES]
/charges?processed_at_max=2024-01-01 (any date over 90 days old)Reminder: returned charges are sorted ascending by id value by default.
Query parameters
- address_idstringFilter charges by address.
- created_at_maxstringShow charges created before the given date.
- created_at_minstringShow charges created after the given date.
- customer_idstringFilter charges by customer.
- datestringShow charges scheduled on the given date.
- date_maxstringShow charges scheduled before the given date.
- date_minstringShow charges scheduled after the given date.
- discount_codestringList charges that contain the given
discount_code. - discount_idstringList charges that contain the given
discount_id. - idsstringFilter charges by
id. If passing multiple values, must be comma separated.Non-integer values will result in a422error. - limitstringThe amount of results.
- The page to show.Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, use cursor pagination.
- shopify_order_idstringFilter charges by
shopify_order_id. - statusstringFilter charges by statusPossible values
SUCCESSQUEUEDERRORREFUNDEDPARTIALLY_REFUNDEDSKIPPED - subscription_idstringFilter charges by
subscription_id. - updated_at_maxstringShow charges updated before the given date.
- updated_at_minstringShow charges updated after the given date.
curl 'https://api.rechargeapps.com/charges?limit=3' \
-H 'X-Recharge-Access-Token: your_api_token'{
"charges": [
{
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2018-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12:00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T10:08:14"
}
]
}#Count charges
GET/charges/count
Retrieve a count of charges.
HTTPS request examples
GET /charges/count GET /charges/count?address_id=10175825 GET /charges/count?customer_id=10101 GET /charges/count?date_min=2019-11-10&date_max=2019-11-11 GET /charges/count?discount_code=10PERCENTOFF GET /charges/count?discount_id=18493516 GET /charges/count?shopify_order_id=281223307 GET /charges/count?status=queued GET /charges/count?status=queued,refunded,partially_refunded GET /charges/count?subscription_id=14562Scope
read_ordersReminder: returned charges are sorted ascending by id value.
Query parameters
- address_idstringFilter charges by address.
- customer_idstringFilter charges by customer.
- datestringShow charges scheduled on the given date.
- date_maxstringShow charges scheduled before the given date.
- date_minstringShow charges scheduled after the given date.
- discount_idstringList charges that contain the given discount_id.
- shopify_order_idintegerFilter charges by shopify_order_id.
- statusstringFilter charges by status. Available status: SUCCESS, QUEUED, ERROR, REFUNDED, PARTIALLY_REFUNDED, SKIPPED.
- subscription_idstringFilter charges by subscription_id.
Response attributes
- countinteger
curl 'https://api.rechargeapps.com/charges/count' \
-H 'X-Recharge-Access-Token: your_api_token'{
"count": 38667
}#Change next charge date
POST/charges/{id}/change_next_charge_date
Modify the next_charge_date of the subscription.
Scope
write_ordersIf there are two queued
Charges with the same address_id, and you update their scheduled_at attribute to match, they will be merged into one Charge.Body parameters
- Next charge date in ISO 8601 format.
curl -X POST 'https://api.rechargeapps.com/charges/100714428/change_next_charge_date' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"next_charge_date": "2021-12-19"
}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2021-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:59:28"
}
}#Skip a charge
POST/charges/{id}/skip
Skip the charge and generate the next
Charge in the schedule.Scope
write_ordersWhen a
Charge contains multiple line_items and you only want to skip the charge for a subset of items, you can specify the specific subscription_id OR subscriptions_ids.curl -X POST 'https://api.rechargeapps.com/charges/100714428/skip' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"subscription_ids": [
"27363808"
]
}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2021-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:59:28"
}
}#Unskip a charge
POST/charges/{id}/unskip
Unskip the charge.
Scope
write_ordersWhen a
Charge contains multiple line_items and you only want to unskip the charge for a subset of items, you can specify the specific subscription_id OR subscriptions_ids.Response attributes
- errorsobject
curl -X POST 'https://api.rechargeapps.com/charges/100714428/unskip' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"subscription_ids": [
"27363808"
]
}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2021-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:59:28"
}
}#Refund a charge
POST/charges/{id}/refund
Applies a refund to a
After the refund, the
Charge. After the refund, the
Charge will have status parameter REFUNDED or PARTIALLY_REFUNDED.Scopes
write_orderswrite_paymentsBody parameters
- Amount of money that will be refunded. It can be fully or partially refunded.
- full_refundbooleanIf this parameter is set to
true, the charge will be totally refunded.
curl -X POST 'https://api.rechargeapps.com/charges/100714428/refund' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"amount": 11
}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2021-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:59:28"
}
}#Process a charge
POST/charges/{id}/process
The charge processing route can be used to process
Charges that are in a queued or error status.Scope
write_paymentsThe
Learn more about Recharge Plus.
/charges/{id}/process endpoint is available to Recharge Plus merchants on a request basis. If you’re interested in leveraging the Recharge charge processing API, reach out to your account manager or our Support team.Learn more about Recharge Plus.
RelatedCharges FAQ →
curl -X POST 'https://api.rechargeapps.com/charges/100714428/process' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": " next order #1 - Subscription Recurring Order",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2021-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "QUEUED",
"sub_total": null,
"subtotal_price": "12.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": null,
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "cch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T09:59:28"
}
}#Capture a charge
POST/charges/{id}/capture_payment
If you are leveraging the authorize/capture workflow with Recharge, the charge/capture_payment endpoint is how to capture the funds of a previously authorized
As a result, Recharge provides a
Charge.Capture Window
You can only capture payment on charges that have been authorized within the last 7 days. This is a limitation of payment providers/financial institutions and Recharge cannot configure or override this limit. Any charges that are attempted to be captured beyond that 7 day window may respond in an error indicating the charge cannot be captured.As a result, Recharge provides a
charge/uncaptured webhook. If subscribed, this webhook will notify you of any charges that are not captured 6 days after authorization. Please refer to the webhooks section for more information.Scopes
write_orderswrite_paymentswrite_subscriptionswrite_customersThe capture_payment endpoint is available to Recharge Plus merchants in the Recharge Closed Beta group. If you’re interested in leveraging the Recharge charge
Learn more about Recharge Plus.
capture_payment endpoint, reach out to your account manager or our Support team. Learn more about Recharge Plus.
Response attributes
- errorsobject
curl -X POST 'https://api.rechargeapps.com/charges/100714428/capture_payment' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{}'{
"charge": {
"id": 100714428,
"address_id": 21317826,
"analytics_data": {
"utm_params": [
{
"utm_campaign": "spring_sale",
"utm_content": "differentiate-content",
"utm_data_source": "shopify_cookie",
"utm_medium": "email",
"utm_source": "newsletter",
"utm_term": "test-term",
"utm_time_stamp": "2019-12-16T23:57:28.752Z"
}
]
},
"billing_address": {
"address1": "3030 Nebraska Avenue",
"address2": null,
"city": "Los Angeles",
"company": null,
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"client_details": {
"browser_ip": null,
"user_agent": null
},
"created_at": "2018-11-14T09:45:44",
"customer_hash": "18819267b1f9095be98f13a8",
"customer_id": 18819267,
"discount_codes": [],
"email": "example_mail@gmail.com",
"first_name": "Mike",
"has_uncommited_changes": false,
"last_name": "Flynn",
"line_items": [
{
"grams": 4536,
"images": {
"large": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_large.png",
"medium": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__medium.png",
"original": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee_.png",
"small": "https://cdn.shopify.com/s/files/1/0175/0695/9460/products/Sumatra_Coffee__small.png"
},
"original_price": "12.00",
"price": "12.00",
"properties": [
{
"name": "grind",
"value": "drip"
}
],
"quantity": 1,
"shopify_product_id": "1255183683",
"shopify_variant_id": "3844924611",
"sku": "MILK-1",
"subscription_id": 27363808,
"title": "Sumatra Coffee",
"variant_title": "Milk - a / b"
}
],
"note": "next order #2",
"note_attributes": null,
"processor_name": "stripe",
"scheduled_at": "2018-12-19T00:00:00",
"shipments_count": null,
"shipping_address": {
"address1": "3030 Nebraska Avenue",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country": "United States",
"first_name": "Mike",
"last_name": "Flynn",
"phone": "3103843698",
"province": "California",
"zip": "90404"
},
"shipping_lines": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"shopify_order_id": null,
"status": "SUCCESS",
"sub_total": null,
"subtotal_price": "12:00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"total_discounts": "0.0",
"total_line_items_price": "12.00",
"total_price": "12.00",
"total_refunds": "12.00",
"total_tax": 0,
"total_weight": 4536,
"transaction_id": "ch_1Du2QpJ2iqHvZRd18RyqoPvc",
"type": "RECURRING",
"updated_at": "2018-11-14T10:08:14"
}
}