The Recharge API is primarily a REST API with some RPC endpoints to support common operations. It has predictable, resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and methods.
Related guides:Generate API tokens,Using the API
Recharge offers hosted solutions and integrates with various ecommerce platforms to process recurring transactions with the setup of your choice. In order to be compatible with those platforms some of our API resources and endpoints may be limited in use to a subset of platforms. When that is the case we will flag with the help of tags the checkout/platform association for which that feature is compatible.
When there is no restriction of compatibility no tags will appear.
Below is a legend of the tags you may come across:
| Tag | Checkout solution | Ecommerce platform |
|---|---|---|
| BigCommerce | Recharge hosted | BigCommerce |
| Custom | Recharge hosted or API-first | Custom |
| RCS | Recharge hosted | Shopify |
| SCI | Shopify hosted | Shopify |
You may also come across other tags specifying regional restrictions (e.g. USA Only) or new releases (e.g. Alpha, Beta).

https://api.rechargeapps.comRecharge uses API keys to authenticate requests.
Each request to the API should contain an API token in the following header:
X-Recharge-Access-Token:store_api_token
Replacestore_api_token with your API key.
All requests must be made over HTTPS.
Scopes can be set up from the API token edit page in Recharge to control the level of access of an API token.
The API currently supports the scopes below:
| Write | Read |
|---|---|
read_accounts | |
write_batches | read_batches |
write_customers | read_customers |
write_discounts | read_discounts |
read_events | |
write_notifications | |
write_orders | read_orders |
write_payment_methods | read_payment_methods |
write_plans | read_plans |
write_products | read_products |
write_subscriptions | read_subscriptions |
read_store | |
read_credit_accounts | |
read_credit_adjustments |
curl -i -H'X-Recharge-Access-Token: your_api_token'-X GETAll requests will use your account API settings, unless you send aX-Recharge-Version header to specify the version.
You can use the same token to make calls to all versions. When no version is specified it will default to the default version on your store.
| Existing API Versions | Release notes |
|---|---|
2021-11 | 2021-11release notes |
2021-01 |
Recharge uses conventionalHTTP response codes to indicate the success or failure of an API request. In general, codes in the2xx range indicate success, codes in the4xx range indicate an error that failed given the information provided ( e.g. a required parameter was omitted, a charge failed, etc ), and codes in the5xx range indicate an error with Recharge’s servers.
200 - OK: Everything worked as expected.201 - OK: The request was successful, created a new resource, and resource created is in the body.202 - OK: The request has been accepted and is in processing.204 - OK: The server has successfully fulfilled the request and there is no content to send in the response body.400 - Bad Request: The request was unacceptable, often due to a missing required parameter.401 - Unauthorized: No valid API key was provided.402 - Request Failed: The parameters were valid but the request failed.403 - The request was authenticated but not authorized for the requested resource (permission scope error).403 - Uninstalled Store.404 - Not Found: The requested resource doesn’t exist.405 - Method Not Allowed: The method is not allowed for this URI.406 - The request was unacceptable, or requesting a data source which is not allowed although permissions permit the request.409 - Conflict: You will get this error when you try to send two requests to edit an address or any of its child objects at the same time, in order to avoid out of date information being returned.415 - The request body was not a JSON object.422 - The request was understood but cannot be processed due to invalid or missing supplemental information.426 - The request was made using an invalid API version.429 - The request has been rate limited.500 - Internal server error.501 - The resource requested has not been implemented in the current version but may be implemented in the future.503 - A 3rd party service on which the request depends has timed out.Our API endpoints and webhooks allow developers to extend responses with additional data in order to optimize calls, allowing for simpler and more efficient implementations.
The API supports including additional objects when using aGET request to retrieve a list or aGET request to retrieve a record by a specific id. This is achieved by using aninclude query parameter in the request URL. Theinclude value contains the object or objects you want to include in the response of your request. On routes where multiple includes are available, you are able to pass multiple values separated by a comma (include=customer,metafields). The below table defines availableinclude values for commonly used resources of the API.
Webhooks supportincluded_objects on the topics listed below. Webhookincluded_objects accepts an array of supported values ("included_objects": [ "customer", "metafields"]). Specifyingincluded_objects will return an enriched payload, containing the original resource and the associated included objects.
When includingcharge_activities in API calls or webhooks, note that only the last 90 days of activities will be included in the response.
| Resource | Endpoints | Webhook topics | Supportedinclude values | Supportedincluded_objects values |
|---|---|---|---|---|
Addresses | GET /addressesGET /addresses/{id} | address/createdaddress/updated | charge_activitiescustomerdiscountpayment_methodssubscriptions | customerpayment_methods |
Charges | GET /chargesGET /charges/{id} | charge/createdcharge/failedcharge/max_retries_reachedcharge/paidcharge/refundedcharge/uncapturedcharge/upcomingcharge/updatedcharge/deleted | charge_activities (beta)customermetafieldspayment_methods | customermetafieldspayment_methods |
Customers | GET /customersGET /customers/{id} | customer/activatedcustomer/createdcustomer/deactivatedcustomer/payment_method_updatedcustomer/updatedcustomer/deleted | addressesmetafieldspayment_methodssubscriptions | addressesmetafieldspayment_methods |
Orders | GET /ordersGET /orders/{id} | order/cancelledorder/createdorder/deletedorder/processedorder/payment_capturedorder/upcomingorder/updatedorder/success | customermetafieldssubscriptions | customermetafields |
Payment Methods | GET /payment_methodsGET /payment_methods/{id} | addresses | addresses | |
Subscriptions | GET /subscriptionsGET /subscriptions/{id} | subscription/activatedsubscription/cancelledsubscription/createdsubscription/deletedsubscription/skippedsubscription/updatedsubscription/unskippedsubscription/paused | addresscharge_activitiescustomermetafieldsbundle_productbundle_selections | customermetafields |
By default, calls for a list of objects will return 50 results. Using thelimit parameter, that can be increased to 250 results per response.
When there are more results than the currentlimit a cursor may be used to request additional results.
Thenext_cursor andprevious_cursor attributes are are included in all list responses.
To request the next set of results, find thenext_cursor in the list response and include it in the url with the cursor parameter e.g.GET https://api.rechargeapps.com/subscriptions?limit=250&cursor=<next_cursor>
To request the previous set of results, find theprevious_cursor in the list response and include it in the url with the cursor parameter e.g.GET https://api.rechargeapps.com/subscriptions?limit=250&cursor=<previous_cursor>
Starting with the2021-11 version of the API, you will not be able to retrieve a count of total records for a givenGET request. If you are building a UI page that allows end users to paginate through result sets (such as paginating through a list of orders or subscriptions), we recommend that your pagination implementation allow users to go to the next and previous page of results (as opposed to allowing users to jump to specific page in the results). This aligns well with theprevious_cursor and thenext_cursor fields included in all list responses.
URL="https://api.rechargeapps.com/charges?limit=5"response=$(curl -s -w"%{http_code}"\ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -X GET$URL)content=$(sed'$ d' <<<"$response")# get all but the last line which contains the status code# Display resultsecho$content | jq"."# parse next urlecho"Next URL"next_cursor=$(jq".next_cursor" <<<"${content}")# Notice next_cursor value is passed as page_info query paramecho"$URL&page_info=$next_cursor"The API supports sorting of results when using aGET request to retrieve a list. Sorting is achieved using asort_by query parameter in the request URL. Thesort_by value contains the parameter and sort direction for your results (ascending or descending), and available sort_by values vary between resources. The below table defines availablesort_by options for commonly used resources.
| Resource | Supportedsort_by_values |
|---|---|
Address | Default:id-descOptions: id-ascid-descupdated_at-ascupdated_at-desc |
Async Batch | Default:id-descOptions: id-ascid-desccreated_at-asccreated_at-desc |
Charge | Default:id-ascOptions: id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-descscheduled_at-ascscheduled_at-desc |
Customer | Default:id-descOptions: id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc |
Discount | Default:id-descOptions: id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc |
Metafield | Default:id-descOptions: id-ascid-descupdated_at-ascupdated_at-desc |
Onetime | Default:id-descOptions: id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc |
Order | Default:id-descOptions: id-ascid-descupdated_at-ascupdated_at-descprocessed_at-ascprocessed_at-descscheduled_at-ascscheduled_at-desc |
Plan | Default:id-descOptions: id-ascid-descupdated_at-ascupdated_at-desc |
Subscription | Default:id-descOptions: id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc |
Webhook | Default:id-descOptions: id-ascid-desc |
An Addresses record represents a shipping address. Each customer can have multiple addresses. Subscriptions are a child object of an address.
An Addresses record represents a shipping address. Each customer can have multiple addresses. Subscriptions are a child object of an address.
Unique numeric identifier for theAddress.
Unique numeric identifier for thePayment Method associated to theAddress.
The street associated with theAddress.
Any additional information associated with theAddress.
The city associated with the address.
The company associated with the address.
2-letter country code.
Unique numeric identifier for the customer associated with the address.
A discount which will be applied on the address. While thediscounts parameter is an array, only a single discount code will be applied. If multiple discount codes are provided, only the first discount in the array will apply to the address.
The customer’s first name associated with the address.
The customer’s last name associated with the address.
Replaces cart_attributes. Extra information that is added to the order.
Notes to be added to all orders associated with the address.
The phone number associated with the address.
The currency on the subscription contract in Shopify.
Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
The state or province associated with the address.
Shipping rates that have previously been overridden viashipping_lines_override but are currently inactive.
Used when shipping rates need to be overridden.
If this parameter has valuenull, rates will be fetched whenCharge is created or regenerated
The zip or postal code associated with the address.
The date and time when the address was created.
The date and time when the address was last updated.
{"address":{"id":21317826,"payment_method_id":17874235,"address1":"1776 Washington Street","address2":"","city":"Los Angeles","company":"Recharge","country_code":"US","created_at":"2018-11-14T09:00:01+00:00","customer_id":18819267,"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"first_name":"John","last_name":"Doe","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note.","phone":"5551234567","presentment_currency":"USD","shipping_lines_conserved":[],"shipping_lines_override":[{"code":"Standard Shipping","price":"0.00","title":"Standard Shipping"}],"updated_at":"2018-11-14T09:00:01+00:00","zip":"90404"}}Create a new address for a customer.
Unique numeric identifier for the customer associated with the address.
The street associated with theAddress. Minimum length is 1 character.
Any additional information associated with the shipping address.
The city associated with the shipping address.
The company associated with the shipping address.
2-letter country code.
Check if the store supports shipping to this country. This is set by the merchant in their Shipping Settings page.
The customer’s first name associated with the address. Minimum length is 1 character.
The customer’s last name associated with the address. Minimum length is 1 character.
Extra information that is added to the order.
Notes to be added to all orders associated with the address.
Payment method id for thePayment_method to be associated to this address.
The phone number associated with the address. Must be included in the request schema but can be an empty string.
The currency that charges on this address will be processed in. If no presentment_currency is passed, it will be set to your default store currency.
The state or province associated with the address. Check if country requires a provinceCOUNTRIES_REQUIRING_PROVINCE.
Used when shipping rates need to be overridden. If this parameter has valuenull, rates will be fetched when a relatedCharge is created or regenerated
The zip or postal code associated with the address.
Check if thecountry requires azip codeCOUNTRIES_NOT_REQUIRING_ZIP. If not included in the list then a zip code with the minimum length of 1 character is required. If the country isUnited States validate against regexUNITED_STATES_ZIP_REGEX. If country isUnited Kingdom then validate against regexUNITED_KINGDOM_ZIP_REGEX.
OK: The request was successful, created a new resource, and resource created is in the body.
curlhttps://api.rechargeapps.com/addresses \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "customer_id": 22152215, "address1": "1776 Washington Street", "address2": "", "city": "Los Angeles", "company": "Recharge", "country_code": "US", "first_name": "John", "last_name": "Doe", "order_attributes": [ { "name": "custom name", "value": "custom value" } ], "phone": "5551234567", "presentment_currency": "USD", "province": "California", "zip": "90404"}'{"address":{"id":42171447,"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","created_at":"2022-10-12T20:16:09+00:00","customer_id":37657002,"discounts":[],"first_name":"Fake First","last_name":"Fake Last","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note","phone":"999-999-9999","presentment_currency":"USD","province":"Connecticut","shipping_lines_conserved":[],"shipping_lines_override":[],"updated_at":"2022-10-12T20:16:09+00:00","zip":"06614"}}Retrieves address for customer based on specified address id.
successful response
curl'https://api.rechargeapps.com/addresses/21317826' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"address":{"id":42171447,"payment_method_id":17874235,"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","created_at":"2022-10-12T20:16:09+00:00","customer_id":37657002,"discounts":[],"first_name":"Fake First","last_name":"Fake Last","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note","phone":"999-999-9999","presentment_currency":"USD","province":"Connecticut","shipping_lines_conserved":[],"shipping_lines_override":[],"updated_at":"2022-10-12T20:16:09+00:00","zip":"06614"}}Updates an existing address to match the specified parameters.
discounts parameter to an empty array:{"discounts": []}Note: When updating thecountry property you will have to update thezip property as well, otherwise you will receive an error.
The street associated with theAddress. Minimum length is 1 character.
Any additional information associated with the shipping address.
The city associated with the shipping address. Minimum length is 1 character.
The company associated with the shipping address.
2-letter country code.
Check if thestore supports shipping to this country. This is set by the merchant in their Shipping Settings page.
A discount which will be applied on the address. While thediscounts parameter is an array, only a single discount code will be applied. If multiple discount codes are provided, only the first discount in the array will apply to the address.
The customer’s first name associated with the address. Minimum length is 1 character.
The customer’s last name associated with the address. Minimum length is 1 character.
Extra information that is added to the order.
Notes to be added to all orders associated with the address.
Payment method id for thePayment_method to be associated to this address.
The phone number associated with the address. Must be included in the request schema but can be an empty string.
The state or province associated with the address. Check if country requires a provinceCOUNTRIES_REQUIRING_PROVINCE.
Used when shipping rates need to be overridden. If this parameter has valuenull, rates will be fetched when a relatedCharge is created or regenerated.
The zip or postal code associated with the address. Check if the country requires a zip codeCOUNTRIES_NOT_REQUIRING_ZIP. If not included in the list then a zip code with the minimum length of 1 character is required. If the country isUnited States then validate against regexUNITED_STATES_ZIP_REGEX. If country isUnited Kingdom then validate against regexUNITED_KINGDOM_ZIP_REGEX.
successful response
curl -XPUT'https://api.rechargeapps.com/addresses/38700614' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"address1": "1776 Washington Street"}'{"address":{"id":42171447,"payment_method_id":17874235,"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","created_at":"2022-10-12T20:16:09+00:00","customer_id":37657002,"discounts":[],"first_name":"Fake First","last_name":"Fake Last","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note","phone":"999-999-9999","presentment_currency":"USD","province":"Connecticut","shipping_lines_conserved":[],"shipping_lines_override":[],"updated_at":"2022-10-12T20:16:09+00:00","zip":"06614"}}It is possible to delete certain addresses from the store using API.
OnlyAddresses with no activeSubscriptions can be deleted.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/addresses/38700614'\ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Returns all addresses from the store, or addresses for the user given in the parameter.
GET /addressesGET /addresses?customer_id=<customer_id>GET /addresses?discount_id=<discount_id>GET /addresses?discount_code=<discount_code>You can combinecreated_at_min andcreated_at_max to return all addresses created in the given timespan. This also applies toupdated_at_min andupdated_at_max parameters.
Returns addresses created before the given time.
Returns addresses created after the given time.
Unique identifier of the customer.
Returns addresses that have the provided discount_code.
Returns addresses that have the provided discount_id.
Filter addresses by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Default: 50
Max: 250
The amount of results. Default is 50 while the maximum is 250.
Default: 1
The page to show. Default is 1.
Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, usecursor pagination.
Returns addresses updated before the given date.
Returns addresses updated after the given time.
Returns active addresses.
successful response
curl'https://api.rechargeapps.com/addresses' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"addresses":[{"id":42171447,"payment_method_id":17874235,"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","created_at":"2022-10-12T20:16:09+00:00","customer_id":37657002,"discounts":[{"id":123456}],"first_name":"Fake First","last_name":"Fake Last","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note","phone":"999-999-9999","presentment_currency":"USD","province":"Connecticut","shipping_lines_conserved":[],"shipping_lines_override":[{"code":"Standard Shipping","price":"0.00","title":"Standard Shipping"}],"updated_at":"2022-10-12T20:16:09+00:00","zip":"06614"}]}Merges up to 10 source addresses into 1 target address.
If one of theAddresses being merged has a different presentment currency, the entire merge will fail and throw an error.
Indicates whether source addresses should be deleted.
Specifies the next charge date of the associated subscriptions on the target address.
The address all of the subscriptions should be moved to.
The list of addresses that the subscriptions should move from.
successful response
curl -XPOST'https://api.rechargeapps.com/addresses/merge' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"target_address": {"id": 42171447}, "source_addresses": [{"id": 42171446}, {"id": 42171445}]}'{"address":{"id":42171447,"payment_method_id":17874235,"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","created_at":"2022-10-12T20:16:09+00:00","customer_id":37657002,"discounts":[],"first_name":"Fake First","last_name":"Fake Last","order_attributes":[{"name":"custom name","value":"custom value"}],"order_note":"My recurring order note","phone":"999-999-9999","presentment_currency":"USD","province":"Connecticut","shipping_lines_conserved":[],"shipping_lines_override":[],"updated_at":"2022-10-12T20:16:09+00:00","zip":"06614"}}Skip aCharge in the future for one or multipleSubscriptions associated with theAddress.
If theCharge does not exist on the date, it will be created with aSKIPPED status.
The date in the future of theCharge to be skipped.
This date must be within the delivery schedules of theCustomer.
A list containing theSubscription IDs to be skipped.
successful response
theAddress withid does not exist
invalid data passed to the endpoint
curl'https://api.rechargeapps.com/addresses/91977136/charges/skip' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"date": "2022-09-15", "purchase_item_ids": [27363808, 27363809]}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":null,"retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"skipped","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}A bundle selection represents the contents within a Bundle linked to an individual Subscription. It can represent the selection for upcoming orders or past orders. ABundleSelection is associated with a correspondingSubscription and aBundleVariant (theBundleVariant is used to validate contents in the selection). When a new order for the associatedSubscription occurs, it will extract the current contents of theBundleSelection for the Bundle item in the order.
A bundle selection represents the contents within a Bundle linked to an individual Subscription. It can represent the selection for upcoming orders or past orders. ABundleSelection is associated with a correspondingSubscription and aBundleVariant (theBundleVariant is used to validate contents in the selection).
The unique numeric identifier for theBundleSelection.
The ID of theBundleVariant associated with theBundleSelection.
The ID of thePurchaseItem associated with theBundleSelection.
The date and time when the contents were selected.
The product id as it appears in the external e-commerce platform. Theexternal_product_id of theProduct record in Recharge, linking theBundleSelection to aProduct associated with a Bundle.
The variant id as it appears in the external e-commerce platform. Theexternal_variant_id of theProduct record in Recharge, linking theBundleSelection to aProduct associated with a Bundle.
A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.
The date and time at which theBundleSelection was most recently updated.
{"bundle_selection":{"id":100714428,"bundle_variant":382417,"purchase_item_id":199820883,"created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121697210548","external_variant_id":"41450875650228","items":[{"id":541,"collection_id":"287569608884","collection_source":"shopify","created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121693671604","external_variant_id":"41450853105844","quantity":3,"updated_at":"2022-08-26T18:52:41+00:00"}],"updated_at":"2022-08-26T18:31:28+00:00"}}Returns a list ofBundleSelections.
GET /bundle_selections?purchase_item_ids=:purchase_item_id_1,:purchase_item_id_2GET /bundle_selections?bundle_variant_ids=:bundle_variant_id_1,:bundle_variant_id_2GET /bundle_selections?limit=1GET /bundle_selections?limit=1&page=2GET /bundle_selections?sort_by=updated_at-descBundleSelections are sorted descending by ID value by default.BundleSelections endpoints are available for Recharge Pro merchants. If you’re interested in leveraging the Rechargebundle_selections endpoints, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
FilterBundleSelections bySubscription orOnetime ID.
If passing multiple values, must be comma separated. Non-integer values will result in a422 error.
FilterBundleSelections byBundleVariants.
If passing multiple values, must be comma separated. Non-integer values will result in a422 error.
Default: 50
Max: 250
The amount of results.
Default: 1
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, usecursor pagination.
Sort listedBundleSelections in a specific order.
Available sort options:id-asc,id-desc,updated_at-asc,updated_at-desc.
Bundle selections are not directly linked to Subscriptions. By default, the endpoint returns Bundle Selections, even those associated with cancelled subscriptions, unless the Bundle Selection has been deleted.
To exclude cancelled subscriptions from your results, includeactive_purchase_items=true in your query.
successful response
curl'https://api.rechargeapps.com/bundle_selections' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next_cursor":null,"previous_cursor":null,"bundle_selections":[{"id":100714428,"bundle_variant":382417,"purchase_item_id":199820883,"created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121697210548","external_variant_id":"41450875650228","items":[{"id":541,"collection_id":"287569608884","collection_source":"shopify","created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121693671604","external_variant_id":"41450853105844","quantity":3,"updated_at":"2022-08-26T18:52:41+00:00"}],"updated_at":"2022-08-26T18:31:28+00:00"}]}Retrieve aBundleSelection using thebundle_selection_id.
BundleSelections endpoints are available for Recharge Pro merchants. If you’re interested in leveraging the Rechargebundle_selections endpoints, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
successful response
theBundleSelection withbundle_selection_id does not exist
curl'https://api.rechargeapps.com/bundle_selections/100714428' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"bundle_selection":{"id":100714428,"bundle_variant":382417,"purchase_item_id":199820883,"created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121697210548","external_variant_id":"41450875650228","items":[{"id":541,"collection_id":"287569608884","collection_source":"shopify","created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121693671604","external_variant_id":"41450853105844","quantity":3,"updated_at":"2022-08-26T18:52:41+00:00"}],"updated_at":"2022-08-26T18:31:28+00:00"}}Create aBundleSelection.
BundleSelections endpoints are available for Recharge Pro merchants. If you’re interested in leveraging the Rechargebundle_selections endpoints, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
The ID of thePurchaseItem associated with theBundleSelection.
A Recharge Plan ID. If provided in a dynamically-priced Bundle, the unit price of each product variant will be inferred from the plan associated with the ID; otherwise, it will be inferred from the plan with the greatest discount for each product in the selection. This is not used in fixed-priced Bundles.
A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.
successful response
missing required field or invalid items passed
curl'https://api.rechargeapps.com/bundle_selections' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "purchase_item_id": 199820883, "items": [ { "collection_id": "287569608884", "collection_source": "shopify", "external_product_id": "7121693671604", "external_variant_id": "41450853105844", "quantity": 3 } ]}'{"bundle_selection":{"id":100714428,"bundle_variant":382417,"purchase_item_id":199820883,"created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121697210548","external_variant_id":"41450875650228","items":[{"id":541,"collection_id":"287569608884","collection_source":"shopify","created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121693671604","external_variant_id":"41450853105844","quantity":3,"updated_at":"2022-08-26T18:52:41+00:00"}],"updated_at":"2022-08-26T18:31:28+00:00"}}Modify an existingBundleSelection to match the specified parameters.
BundleSelections endpoints are available for Recharge Pro merchants. If you’re interested in leveraging the Rechargebundle_selections endpoints, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
The ID of thePurchaseItem associated with theBundleSelection.
A Recharge Plan ID. If provided in a dynamically-priced Bundle, the unit price of each product variant will be inferred from the plan associated with the ID; otherwise, it will be inferred from the plan with the greatest discount for each product in the selection. This is not used in fixed-priced Bundles.
A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.
successful response
theBundleSelection withbundle_selection_id does not exist
invalid items passed
curl -XPUT'https://api.rechargeapps.com/bundle_selections/100714428' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "purchase_item_id": 199820883, "items": [ { "collection_id": "287569608884", "collection_source": "shopify", "external_product_id": "7121693671604", "external_variant_id": "41450853105844", "quantity": 3 } ]}'{"bundle_selection":{"id":100714428,"bundle_variant":382417,"purchase_item_id":199820883,"created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121697210548","external_variant_id":"41450875650228","items":[{"id":541,"collection_id":"287569608884","collection_source":"shopify","created_at":"2022-08-26T18:31:28+00:00","external_product_id":"7121693671604","external_variant_id":"41450853105844","quantity":3,"updated_at":"2022-08-26T18:52:41+00:00"}],"updated_at":"2022-08-26T18:31:28+00:00"}}Delete aBundleSelection
BundleSelections endpoints are available for Recharge Pro merchants. If you’re interested in leveraging the Rechargebundle_selections endpoints, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
theBundleSelection has been removed and there is no content to send back in the response body.
theBundleSelection withid does not exist
curl -XDELETE'https://api.rechargeapps.com/bundle_selections/100714428' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}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. ACharge is linked to its correspondingOrders (oneOrder for pay as you go subscriptions and several for pre-paid).Orders are created once the correspondingCharge is successful. After successful payment, the firstOrder will be immediately submitted to the external platform if applicable (e.g. Shopify, BigCommerce).
ACharge 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 correspondingOrders (one for pay as you go subscriptions and several for pre-paid).
ACharge can have many parent subscriptions. All subscriptions on a givenAddress with the samenext_charge_date date will be merged into oneCharge and that charge will contain oneline_item perSubscription.
The unique numeric identifier for theCharge.
The ID of the shippingAddress tied to theCharge.
An object containing analytics data associated with theCharge.
All the billing information related to the charge.
Details of the access method used by the purchaser.
The date and time when the transaction was created.
The code of the currency for thisCharge, such asUSD.
Related guides:Supported currencies
An object containingCustomer information associated with thisCharge.
An array ofDiscounts associated with theCharge.
An object containing the associated external order ID.
An object containing the associated external transaction ID.
A list ofline_item objects, each containing information about a distinct purchase item.
Notes associated with theCharge.
An array of name-value pairs of order attributes on theCharge.
The number ofOrders generated from thisCharge (>1 for prepaidSubscriptions).
The payment processor used for thisCharge.
The date and time when the transaction was processed.
The date time of when theCharge is/was scheduled to process.
The shippingAddress of theCharge.
An array of shipping lines associated with theCharge.
Possible values: success, error, queued, skipped, refunded, partially_refunded, pending_manual_payment, pending
The status of theCharge.
The combined price of allline_items without taxes and shipping.
A comma-separated list of tags on theCharge.
An array of tax lines that apply to theCharge.
A boolean indicator of the taxability of theCharge.
Whether taxes are included in the order subtotal.
The sum of theDiscounts applied to theCharge.
The total price of all line items of theCharge.
The sum of all the prices of all the items in theCharge, taxes and discounts included (must be positive).
The sum of all refunds that were applied to theCharge.
The total tax due associated with theCharge.
The total weight of theCharge’s line items in grams.
Possible values: checkout, recurring
An indicator of theCharge’s type, either checkout or recurring.
The date time at which theCharge was most recently updated.
Error reason as sentence text (typically returned direct from the payment processor). e.g."error": "Customer needs to update credit card"
Structured reason why the charge failed such asCUSTOMER_NEEDS_TO_UPDATE_CARD.
Shows how many times an attempt to charge was placed.
Indicates if Recharge was able to find theexternal_variant_id from theCharge.
The date when the next attempt will be placed.
Specifies whether theCharge is scheduled for a regeneration (if theSubscription related to the charge was updated in the last 5 seconds usingcommit=false).
{"charge":{"id":100714428,"address_id":21317826,"analytics_data":{"utm_params":[{"utm_campaign":"spring_sale","utm_content":"differentiate-content","utm_data_source":"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_code":"US","first_name":"Mike","last_name":"Flynn","phone":"3103843698","province":"California","zip":"90404"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2018-11-14T09:45:44+00:00","currency":"USD","customer":{"id":12345,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"10DOLLAROFF","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_XXXXXXXXXXXXXXX"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"99999999999"},"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","properties":[{"name":"grind","value":"drip"}],"purchase_item_type":"subscription","quantity":1,"sku":"MILK-1","tax_due":"1.14","tax_lines":[{"price":"0.870","rate":0.0725,"title":"CA State Tax"},{"price":"0.270","rate":0.0225,"title":"Los Angeles County Tax"}],"taxable":true,"taxable_amount":"12.00","title":"Sumatra Coffee","total_price":"13.14","unit_price":"12.00","variant_title":"Milk - a / b"}],"note":"next order #1","order_attributes":[{"name":"custom name","value":"custom value"}],"processor_name":"stripe","scheduled_at":"2018-12-12","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"}],"status":"queued","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"}],"taxes_included":true,"total_discounts":"0.00","total_line_items_price":"12.00","total_price":"13.14","total_refunds":null,"total_tax":"1.14","total_weight_grams":4536,"type":"recurring","updated_at":"2018-11-14T09:45:44+00:00"}}Retrieve aCharge using thecharge_id.
Starting 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 theExports tool in the Recharge merchant portal and within theMerchant 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)
successful response
curl'https://api.rechargeapps.com/charges/377749210' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"taxes_included":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Returns a list ofCharges.
GET /charges?address_id=:address_idGET /charges?created_at_min=2016-05-18&created_at_max=2016-06-18GET /charges?customer_id=:customer_idGET /charges?discount_code=10PERCENTOFFGET /charges?discount_id=:discount_idGET /charges?external_order_id=:external_order_idGET /charges?ids=1123551,262667345,12341535GET /charges?purchase_item_id=:purchase_item_idGET /charges?scheduled_at=2016-06-18GET /charges?scheduled_at_min=2016-05-18&scheduled_at_max=2016-06-18GET /charges?sort_by=id-descGET /charges?status=queuedGET /charges?status=queued,refunded,partially_refundedGET /charges?updated_at_min=2016-05-18&updated_at_max=2016-06-18GET /charges?processed_at_min=2022-01-18&processed_at_max=2022-02-18Starting 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 theExports tool in the Recharge merchant portal and within theMerchant 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.
FilterCharges byAddress.
ShowCharges created before the given date.
ShowCharges created after the given date.
FilterCharges byCustomer.
ListCharges that contain the givendiscount_code.
ListCharges that contain the givendiscount_id.
FilterCharges by the associated order ID in the external e-commerce platform.
FilterCharges by ID.
If passing multiple values, must be comma separated. Non-integer values will result in a422 error.
Default: 50
Max: 250
The amount of results.
Default: 1
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, usecursor pagination.
FilterCharges by aSubscription orOnetime ID.
FilterCharges by a comma-separated list ofSubscription orOnetime IDs.
FilterCharges by specific scheduled charge date.
ShowCharges scheduled to be processed before the given date.
ShowCharges scheduled to be processed after the given date.
Sort listedCharges in a specific order.
Available sort options:id-asc,id-desc,updated_at-asc,updated_at-desc,scheduled_at-asc,scheduled_at-desc.
Filter charges by status.
Available status:success,queued,error,refunded,partially_refunded,skipped,pending_manual_payment,pending.
Show charges updated before the given date.
Show charges updated after the given date.
Show charges processed after, and including, the given date.
Show charges processed before, and including, the given date.
successful response
curl'https://api.rechargeapps.com/charges' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next":"next_cursor","previous":"previous_cursor","charges":[{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"taxes_included":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}]}Endpoint for addingDiscount to an existing queuedCharge.
You cannot add aDiscount to an existing queuedCharge if theCharge or the associatedAddress already has one.
You can provide eitherdiscount_id ordiscount_code. If both parameters are passed, the value fordiscount_id will take precedence.
If aCharge has aDiscount and it gets updated, or a regeneration occurs, theDiscount will be lost. Regeneration is a process that refreshes theCharge JSON with new data in the case of theSubscription orAddress being updated.
Code of theDiscount you want to apply to aCharge.
ID of theDiscount you want to apply to aCharge.
successful response
curl'https://api.rechargeapps.com/charges/105805051/apply_discount' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"discount_code": "test"}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Remove aDiscount from aCharge without destroying theDiscount.
POST /charges/<charge_id>/remove_discount/In most cases theDiscount should be removed from theAddress. When theDiscount is removed from theAddress, theDiscount is also removed from any futureCharges.
If theDiscount is on the parentAddress, you cannot remove it usingcharge_id. When removing yourDiscount, it is preferable to pass theaddress_id so that theDiscount stays removed if theCharge is regenerated. Only passcharge_id in edge cases in which there are two or moreCharges on a parentAddress and you only want to remove theDiscount from oneCharge. If you pass both parameters, it will remove theDiscount from theAddress.
successful response
curl'https://api.rechargeapps.com/charges/459904607/remove_discount' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Skip aCharge.
successful response
curl'https://api.rechargeapps.com/charges/377749210/skip' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"purchase_item_ids": [27363808, 27363809]}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":null,"retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"skipped","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Unskip aCharge.
successful response
Unprocessable
curl'https://api.rechargeapps.com/charges/377749210/unskip' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"purchase_item_ids": [27363808]}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":null,"retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"queued","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Refund aCharge.
After thePOST request, that particularCharge will havestatus parameter updated torefunded orpartially_refunded depending on the value of theamount parameter. Ifretry istrue,error anderror_type are required, theCharge will havestatus parameter updated toerror. This means a new transaction would occur if the charge dunning process succeeds again. This functionality is used when the order submission attempt on the remote platform failed after the transaction succeeded.
Amount of money that will be refunded. It can be fully or partially refunded.
If this parameter has valuetrue, theCharge will be totally refunded.
If this parameter has valuetrue andfull_refund has valuetrue, theCharge will be retried. Thestatus on theCharge will be returned as “error”.
If theretry parameter has valuetrue, this value is required. Valid values are “insufficient_inventory”.
If theretry parameter has valuetrue, this value is required.
successful response
curl'https://api.rechargeapps.com/charges/377749210/refund' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"amount": 11.00}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"refunded","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"11.29","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Pro only
The charge processing route can be used to processCharges that are in aqueued orerror status.
Related guides: Charges FAQ
The/charges/{id}/process endpoint is available to Recharge Pro merchants on a request basis. If you’re interested in leveraging the RechargeCharge processing API, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
successful response
curl'https://api.rechargeapps.com/charges/100714428/process' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}If you are leveraging the authorize/capture workflow with Recharge, thecharge/{id}/capture_payment endpoint is how to capture the funds of a previously authorizedCharge.
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. AnyCharges that are attempted to be captured beyond that 7 day window may result in an error indicating theCharge cannot be captured.charge/uncapturedWebhook. If subscribed, thisWebhook will notify you of anyCharges that are not captured 6 days after authorization. Please refer to thewebhooks section for more information.The/charges/{id}/capture_payment endpoint is available to Recharge Pro merchants in the Recharge Closed Beta group. If you’re interested in leveraging the Rechargecapture_payment endpoint, reach out to your account manager or our Support team.
Learn more about Recharge Pro.
Charge captured successfully
Bad Request
Not Found
Unprocessable
curl'https://api.rechargeapps.com/charges/100714428/capture_payment' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":null,"scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Endpoint for addingFree Gift to an existing queuedCharge.
You can provideexternal_variant_id to add to theCharge.
List ofFree Gifts you want to add to aCharge.
Whether to conserve theFree Gift on a skipped charge.
Free gift added to charge
Unprocessable
curl'https://api.rechargeapps.com/charges/105805051/add_free_gift' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"free_gifts": [{"external_variant_id": "1234567890", "quantity": 1}], "conserve_on_skip": true}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"},{"purchase_item_id":null,"external_product_id":{"ecommerce":"6791118553225"},"external_variant_id":{"ecommerce":"39940738482313"},"grams":null,"handle":null,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"offer_attributes":null,"original_price":"0.00","properties":[{"name":"source","value":"gift:API:RequestId:self.request_id,"}],"purchase_item_type":null,"quantity":1,"sku":null,"tax_due":"0.00","tax_lines":[],"taxable":false,"taxable_amount":"0.00","title":"Free Gift","total_price":"0.00","unit_price":"0.00","unit_price_includes_tax":false,"variant_title":"Free Gift Title"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"taxes_included":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Endpoint for removing a free gift from an existing queuedCharge.
You can provideexternal_variant_ids to remove from theCharge.
List ofExternalVariant IDs of free gifts you want to remove from aCharge.
Free gift removed from charge
curl'https://api.rechargeapps.com/charges/105805051/remove_free_gift' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"external_variant_ids": ["1234567890"]}'{"charge":{"id":377749210,"address_id":42171447,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"billing_address":{"address1":"601 SW Washing St.","address2":"Suite 101","city":"Portland","company":"Acme Corp","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"888-888-8888","province":"Oregon","zip":"97205"},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2021-11-09T19:22:13+00:00","currency":"USD","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"2879413682227"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"error_type":null,"external_order_id":{"ecommerce":"2541635698739"},"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"},"has_uncommitted_changes":false,"line_items":[{"purchase_item_id":63898947,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"handle":"shirt-package","images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_due":"1.30","tax_lines":[{"price":"0.9931","rate":"0.0725","title":"CA State Tax","unit_price":"0.3310"},{"price":"0.3082","rate":"0.0225","title":"LA County Tax","unit_price":"0.1027"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt package","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue T-shirt"}],"note":"next order in sequence 3","order_attributes":[{"name":"Checkout-Method","value":"delivery"}],"orders_count":1,"payment_processor":"stripe","processed_at":"2021-11-09T23:59:31+00:00","retry_date":"2021-01-01","scheduled_at":"2021-12-09","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","source":"shopify","taxable":true,"tax_lines":[{"price":"0.355","rate":0.0725,"title":"CA State Tax"},{"price":"0.110","rate":0.0225,"title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"taxes_included":true,"total_discounts":"10.0","total_line_items_price":"10.00","total_price":"11.29","total_refunds":"0.00","total_tax":"1.29","total_weight_grams":454,"type":"recurring","updated_at":"2021-11-09T23:59:32+00:00"}}Checkouts allow you to create, update, and process aCheckout programmatically. Shipping cost and sales tax determination are automatic functions of the Recharge Checkout resource.
Related guides:Recharge checkout integrations,How to use the Checkout resource
Important - TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
Checkouts resource allows you to create, update, and process a checkout programmatically. Shipping cost and sales tax determination are automatic functions of the Recharge Checkout resource.
TheCheckout endpoints are only available for BigCommerce and Custom.Checkouts on Shopify must go through Shopify.
ID for theCharge resulting from processing theCheckout.
Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Discount details, populated once theDiscount has been applied successfully to theCheckout.
Shipping rates details, populated once the rates have been selected and applied successfully to theCheckout.
Shipping rates available for the shipping address provided in theCheckout.
Checkout object must contain theshipping_address before theavailable_shipping_rates are populated.
BillingAddress for theCheckout.
Timestamp for when theCheckout was processed.
Timestamp for when theCheckout was created.
Currency of theCheckout.
Email address for theCustomer.
External checkout reference, if one exists.
External checkout platform, if one exists.
External customer reference, if one exists.
The ID of the associated transaction in a payment processor system (like Stripe).
A list of items included in theCheckout
quantity andexternal_variant_id are required parameters inline_items.
Custom note.
Notification preferences for theCustomer.
List of name-value pairs for custom attributes.
Name of the payment processor.
Whether or not theCheckout contains items that require shipping.
ShippingAddress for theCheckout.
Details of shipping rate, cost…
Value of theCheckout minus shipping and tax.
Array oftax_line objects.
Whether theCheckout contains items that are taxable.
Whether the tax is included in the price of the items.
Unique token for theCheckout.
Full price of theCheckout including shipping and tax.
Tax charged on theCheckout.
Timestamp for the latestCheckout update.
{"checkout":{"charge_id":null,"analytics_data":{"utm_params":[{"utm_campaign":"spring_sale","utm_content":"textlink","utm_data_source":"cookie","utm_medium":"cpc","utm_source":"google","utm_term":"mleko","utm_timestamp":"2020-03-05T00:00:00+00:00"}]},"applied_discounts":[{"amount":"5.00","applicable":true,"discount_code":"5_DOLLARS_OFF","non_redeemable_reason":null,"value":"5.00","value_type":"fixed_amount"}],"applied_shipping_rate":{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"Flat rate (3 - 7 Business Days)","delivery_range":null,"description":null,"handle":"recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49","name":"Flat rate (3 - 7 Business Days)","phone_required":null,"price":"7.49","tax_lines":[],"title":"Flat rate (3 - 7 Business Days)"},"available_shipping_rates":[{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"Flat rate (3 - 7 Business Days)","delivery_range":null,"description":null,"handle":"recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49","name":"Flat rate (3 - 7 Business Days)","phone_required":null,"price":"7.49","tax_lines":[],"title":"Flat rate (3 - 7 Business Days)"},{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"3 Days (3 Business Days)","delivery_range":null,"description":null,"handle":"recharge-3%20Days%20%283%20Business%20Days%29-11.75","name":"3 Days (3 Business Days)","phone_required":null,"price":"11.75","tax_lines":[],"title":"3 Days (3 Business Days)"}],"billing_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"completed_at":null,"created_at":"2021-11-16T00:51:28+00:00","currency":"USD","email":"somerandomemail@test.com","external_checkout_id":"<external_cart_id>","external_checkout_source":"custom","external_customer_id":{"ecommerce":null,"payment_processor":null},"external_transaction_id":{"payment_processor":null},"line_items":[{"id":0,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"12345"},"external_variant_id":{"ecommerce":"123456"},"handle":"shirt-with-design","images":{"small":"https://veryniceimage.jpg"},"properties":[{"name":"size","value":"xl"}],"purchase_item_type":"onetime","quantity":3,"recurring_unit_price":"12.00","requires_shipping":true,"sku":null,"subscription_preferences":{"charge_delay":null,"charge_interval_frequency":null,"charge_on_day_of_month":null,"charge_on_day_of_week":null,"number_charges_until_expiration":null,"shipping_interval_frequency":null,"shipping_interval_unit_type":null},"tax_lines":[],"taxable":false,"title":"A Nice Shirt","total_price":"36.00","unit_price":"12.00","variant_title":null,"weight":340,"weight_unit":"g"}],"note":"flash sale","notification_preferences":{"email":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}},"sms":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}}},"order_attributes":{"customer_niceness":"very"},"payment_processor":null,"requires_shipping":true,"shipping_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"shipping_lines":[{"code":"Flat rate (3 - 7 Business Days)","price":"7.49","tax_lines":[],"taxable":false,"title":"Flat rate (3 - 7 Business Days)"}],"subtotal_price":"31.00","tax_lines":[],"taxable":false,"taxes_included":false,"token":"efd5a6b12b984f439ec16ce2a00fb5c3","total_price":"31.00","total_tax":"0.00","updated_at":"2021-11-16T00:51:28+00:00"}}Create aCheckout
TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
If specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout creation.
Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Discount to apply to theCheckout.
Shipping rates details, populated once the rates have been selected and applied successfully to theCheckout.
Important: You can only create a checkout withapplied_shipping_rate if you pass the query parameterget_shipping_rates=true or if you supply a list of shipping rates usingcustom_shipping_rate_options.
List of available shipping rates to use when selecting a shipping rate withapplied_shipping_rate. Custom shipping rates will take precedence over any default rates fetched usingget_shipping_rates=true.
BillingAddress for theCheckout.
Currency of theCheckout.
Email address for theCustomer.
External checkout reference, if one exists.
External checkout platform, if one exists.
The ID of the associated transaction in a payment processor system (like Stripe).
A list of items included in theCheckout
quantity andexternal_variant_id are required parameters inline_items.
Custom note.
List of name-value pairs for custom attributes.
ShippingAddress for theCheckout.
successful response
curl'https://api.rechargeapps.com/checkouts' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -d'{ "analytics_data": { "utm_params": [ { "utm_campaign": "spring_sale", "utm_content": "textlink", "utm_data_source": "shopify_cookie", "utm_medium": "cpc", "utm_source": "google", "utm_term": "mleko", "utm_timestamp": "2020-03-05T00:00:00" } ] }, "applied_discounts": [ { "discount_code": "5_DOLLARS_OFF" } ], "billing_address": { "address1": "6419 Ocean Front Walk", "address2": "Apt 2", "city": "Los Angeles", "company": "", "country_code": "US", "first_name": "Novak", "last_name": "Djokovic", "phone": "1-800-800-8000", "province": "California", "zip": "90293" }, "email": "somerandomemail@test.com", "external_checkout_id": "<external_cart_id>", "external_checkout_source": "custom", "line_items": [ { "external_product_id": { "ecommerce": "12345" }, "external_variant_id": { "ecommerce": "123456" }, "handle": "shirt-with-design", "images": { "small": "http://small.jpg" }, "properties": [ { "name": "size", "value": "xl" }, { "name": "color", "value": "fuchsia" } ], "quantity": 3, "subscription_preferences": { "charge_interval_frequency": null, "cutoff_day_of_month": null, "cutoff_day_of_week": null, "expire_after_specific_number_of_charges": null, "interval_unit": null, "order_day_of_month": null, "order_day_of_week": null, "order_interval_frequency": null }, "tax_lines": [ { "price": "0.950", "rate": 0.0725, "title": "CA State Tax" } ] } ], "note": "flash sale", "order_attributes": { "customer_niceness": "very" }, "shipping_address": { "address1": "6419 Ocean Front Walk", "address2": "Apt 2", "city": "Los Angeles", "company": "", "country_code": "US", "first_name": "Novak", "last_name": "Djokovic", "phone": "1-800-800-8000", "province": "California", "zip": "90293" }}'{"checkout":{"charge_id":null,"analytics_data":{"utm_params":[{"utm_campaign":"spring_sale","utm_content":"textlink","utm_data_source":"shopify_cookie","utm_medium":"cpc","utm_source":"google","utm_term":"mleko","utm_timestamp":"2020-03-05T00:00:00+00:00"}]},"applied_discounts":[{"amount":"5.00","applicable":true,"discount_code":"5_DOLLARS_OFF","non_redeemable_reason":null,"value":"5.00","value_type":"fixed_amount"}],"billing_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"completed_at":null,"created_at":"2021-11-16T00:51:28+00:00","currency":"USD","email":"somerandomemail@test.com","external_checkout_id":"f71848585658686-36f6-d9efg8125rogkfdaa","external_checkout_source":"custom","external_customer_id":{"ecommerce":null,"payment_processor":null},"external_transaction_id":{"payment_processor":null},"line_items":[{"id":null,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"12345"},"external_variant_id":{"ecommerce":"123456"},"handle":"shirt-with-design","images":{"small":"http://small.jpg"},"properties":[{"name":"size","value":"xl"},{"name":"color","value":"fuchsia"}],"purchase_item_type":"onetime","quantity":3,"requires_shipping":true,"sku":null,"subscription_preferences":{"charge_interval_frequency":null,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":null,"interval_unit":null,"order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":null},"tax_lines":[],"taxable":false,"title":"A Very Nice Shirt","total_price":"36.00","unit_price":"12.00","variant_title":null,"weight":340,"weight_unit":"g"}],"note":"flash sale","notification_preferences":{"email":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}},"sms":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}}},"order_attributes":{"customer_niceness":"very"},"payment_processor":null,"requires_shipping":true,"shipping_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"subtotal_price":"31.00","tax_lines":[],"taxable":false,"taxes_included":false,"token":"efd5a6b12b984f439ec16ce2a00fb5c3","total_price":"31.00","total_tax":"0.00","updated_at":"2021-11-16T00:51:28+00:00"}}Retrieve a checkout.
TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
successful response
curl'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11'{"checkout":{"charge_id":null,"analytics_data":{"utm_params":[{"utm_campaign":"spring_sale","utm_content":"textlink","utm_data_source":"shopify_cookie","utm_medium":"cpc","utm_source":"google","utm_term":"mleko","utm_timestamp":"2020-03-05T00:00:00+00:00"}]},"applied_discounts":[{"amount":"5.00","applicable":true,"discount_code":"5_DOLLARS_OFF","non_redeemable_reason":null,"value":"5.00","value_type":"fixed_amount"}],"applied_shipping_rate":{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"3 Days (3 Business Days)","delivery_range":null,"description":null,"handle":"recharge-3%20Days%20%283%20Business%20Days%29-11.75","name":"3 Days (3 Business Days)","phone_required":null,"price":"11.75","tax_lines":[],"title":"3 Days (3 Business Days)"},"available_shipping_rates":[{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"Flat rate (3 - 7 Business Days)","delivery_range":null,"description":null,"handle":"recharge-Flat%20rate%20%283%20-%207%20Business%20Days%29-7.49","name":"Flat rate (3 - 7 Business Days)","phone_required":null,"price":"7.49","tax_lines":[],"title":"Flat rate (3 - 7 Business Days)"},{"checkout":{"subtotal_price":null,"total_price":null,"total_tax":null},"code":"3 Days (3 Business Days)","delivery_range":null,"description":null,"handle":"recharge-3%20Days%20%283%20Business%20Days%29-11.75","name":"3 Days (3 Business Days)","phone_required":null,"price":"11.75","tax_lines":[],"title":"3 Days (3 Business Days)"}],"billing_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"completed_at":null,"created_at":"2021-11-16T00:51:28+00:00","currency":"USD","email":"somerandomemail@test.com","external_checkout_id":"<external_cart_id>","external_checkout_source":"headless","external_customer_id":{"ecommerce":null,"payment_processor":null},"external_transaction_id":{"payment_processor":null},"line_items":[{"id":null,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"12345"},"external_variant_id":{"ecommerce":"123456"},"handle":"shirt-with-design","images":{"small":"http://small.jpg"},"properties":[{"name":"size","value":"xl"}],"purchase_item_type":"onetime","quantity":3,"requires_shipping":true,"sku":null,"subscription_preferences":{"charge_interval_frequency":null,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":null,"interval_unit":null,"order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":null},"tax_lines":[],"taxable":false,"title":"A Very Nice Shirt","total_price":"36.00","unit_price":"12.00","variant_title":null,"weight":340,"weight_unit":"g"}],"note":"flash sale","notification_preferences":{"email":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}},"sms":{"promotional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"replenishment":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"},"transactional":{"last_opt_in_at":null,"last_opt_in_source":null,"last_opt_out_at":null,"last_opt_out_source":null,"status":"unspecified"}}},"order_attributes":{"customer_niceness":"very"},"payment_processor":null,"requires_shipping":true,"shipping_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":null,"country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"subtotal_price":"31.00","tax_lines":[],"taxable":false,"taxes_included":false,"token":"efd5a6b12b984f439ec16ce2a00fb5c3","total_price":"31.00","total_tax":"0.00","updated_at":"2021-11-16T00:51:28+00:00"}}You can modify an existing checkout to match the specified parameters.
TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
If specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout update.
Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.
Shipping rates details, populated once the rates have been selected and applied successfully to theCheckout.
Important: You can only setapplied_shipping_rate if you have already collected theavailable_shipping_rates by callingGET /checkout/<checkout_token>/shipping_rates or if you pass the query parameterget_shipping_rates=true when calling this route.code,price andtitle are required when setting a custom shipping rate
Billing address for the checkout.
Does the buyer accept marketing, newsletters etc.
Discount code to be used on the checkout, e.g. “DISCOUNT20”.
Currency of theCheckout.
Email address for the customer.
Represents the external cart token.
Represents the source forexternal_checkout_id.
quantity,product_id andvariant_id are required parameters in line_items.
Note attribute used to store custom notes.
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
Structured custom notes.
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
Shipping lines.
successful response
curl -XPUT'https://api.rechargeapps.com/checkouts/b706eecfd66c45329d3886a02d7515d6' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -d'{ "line_items": [ { "product_id": 4546063663207, "quantity": 6, "variant_id": 3844924611 } ]}'{"checkout":{"analytics_data":{"utm_params":[{"utm_campaign":"spring_sale","utm_content":"textlink","utm_data_source":"shopify_cookie","utm_medium":"cpc","utm_source":"google","utm_term":"mleko","utm_timestamp":"2020-03-05T00:00:00+00:00"}]},"applied_discount":{"amount":"7.50","applicable":true,"non_applicable_reason":"","value":"7.50","value_type":"fixed_amount"},"billing_address":null,"buyer_accepts_marketing":false,"charge_id":null,"completed_at":null,"created_at":"2020-07-10T09:21:46.259352+00:00","currency":"USD","discount_code":"POPUS_25","email":"somerandomemail@test.com","external_checkout_id":"<shopify_cart_token>","external_checkout_source":"shopify","line_items":[{"charge_interval_frequency":5,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":null,"first_recurring_charge_delay":null,"fulfillment_service":"manual","image":"//cdn.shopify.com/s/files/1/0279/8387/2103/products/kazan_small.jpg?v=1586451337","line_price":"30.00","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":5,"order_interval_unit":"day","order_interval_unit_type":"day","original_price":"5.00","price":"5.00","product_id":4546063663207,"product_type":"Milk","properties":null,"quantity":6,"recurring_price":"5.00","requires_shipping":true,"sku":"kRaViCah-1","tax_code":null,"taxable":false,"title":"Powder Milk","type":"SUBSCRIPTION","variant_id":32165284380775,"variant_title":"1 / Powder","vendor":"Imlek"}],"note":null,"order_attributes":null,"payment_processor":null,"payment_processor_customer_id":null,"payment_processor_transaction_id":null,"phone":null,"requires_shipping":true,"shipping_address":{"address1":"6419 Ocean Front Walk","address2":"Apt 2","city":"Los Angeles","company":"","country_code":"US","first_name":"Novak","last_name":"Djokovic","phone":"1-800-800-8000","province":"California","zip":"90293"},"shipping_address_validations":{"country_is_supported":true,"ups":true},"shipping_line":null,"shipping_rate":null,"subtotal_price":"22.50","tax_lines":[{"price":"0.950","rate":0.0725,"title":"CA State Tax"},{"price":"0.335","rate":0.0225,"title":"Los Angeles County Tax"}],"taxes_included":false,"token":"b706eecfd66c45329d3886a02d7515d6","total_price":"22.50","total_tax":"0.00","updated_at":"2020-07-10T09:21:46.284703+00:00"}}You can retrieve all shipping rates for a specific checkout.
successful response
curl'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005/shipping_rates' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11'{"shipping_rates":[{"checkout":{"subtotal_price":"22.50","total_price":"42.40","total_tax":"0.00"},"code":"Standard","delivery_range":null,"description":null,"handle":"shopify-Standard-19.90","name":"Standard","phone_required":false,"price":"19.90","title":"Standard"}]}You can process and charge checkout using our API.
TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.
We supportStripe,Apple Pay,Google Pay, andBraintree as payment processor.
If you are using test stripe keys, you can usetok_visa as your token.
Related guides: Mobile payments
Possible values: stripe, braintree, authorize
The name of payment processor.
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.
Possible values: CREDIT_CARD, PAYPAL, APPLE_PAY, GOOGLE_PAY, SEPA_DEBIT
The payment type used for theCheckout.
successful response
curl'https://api.rechargeapps.com/checkouts/5a5c19ea31c44641855017f1276db959/process' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -d'{ "payment_processor": "stripe", "payment_token": "<payment_token>", "payment_type": "CREDIT_CARD"}'{"checkout_charge":{"authorization_token":null,"charge_id":258065996,"free":false,"payment_processor":"stripe","processor_customer_token":"cus_HcbgqiS49fABBg62E","processor_payment_method_token":"pm_lkj3lkl4lk34","payment_processor_transaction_id":"ch_1H3McXJ2zdqHvZaRd191xV2idRt","payment_token":"tok_visa","payment_type":"CREDIT_CARD","status":"successful"}}Collections allow to create and manage a logical list ofProducts called aCollection. ACollection contains an ordered list ofProducts and can be used for selective display ofProducts on chosen interfaces or for business logic automation (e.g.Discounts definition…).
Unique numeric identifier for theCollection.
The date and time when theCollection was created.
TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.
Possible values: id-asc, id-desc, title-asc, title-desc, created_at-asc, created_at-desc
The order in which theProducts in the collection should appear.
The title of theCollection. A short descriptive definition of theCollection.
Possible values: manual
The type of theCollection.
manual stands forCollections which were manually created ie. when the products where explicitly selected to be part of theCollection.
The date and time when theCollection was last updated.
{"id":4021,"created_at":"2021-08-30T17:25:57+00:00","description":"August 2021 cat products new release.","sort_order":"id-desc","title":"Cats Summer Collection","type":"manual","updated_at":"2021-08-30T17:25:57+00:00"}Create aCollection in Recharge.
TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.
Default: id-desc
Possible values: id-asc, id-desc, title-asc, title-desc, created-asc, created-desc
The order in which theProducts in the collection should appear.
The title of theCollection. A short descriptive definition of theCollection.
successful response
curl'https://api.rechargeapps.com/collections' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "description": "cat products new release", "title": "Cats Spring 2022"}{"collection":{"id":134157,"created_at":"2022-03-29T04:57:36+00:00","description":"cat products new release","sort_order":"id-desc","title":"Cats Spring 2022","type":"manual","updated_at":"2020-12-17T18:50:39+00:00"}}Retrieve oneCollection usingcollection_id.
successful response
Not found
curl'https://api.rechargeapps.com/collections/134157' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"collection":{"id":134157,"created_at":"2022-03-29T04:57:36+00:00","description":"cat products new release","sort_order":"id-desc","title":"Cats Spring 2022","type":"manual","updated_at":"2022-03-29T04:57:36+00:00"}}Modify an existingCollection to match the specified parameters.
TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.
Possible values: id-asc, id-desc, title-asc, title-desc, created-asc, created-desc
The order in which theProducts in the collection should appear.
The title of theCollection. A short descriptive definition of theCollection.
successful response
Not found
Unprocessable entity
curl -XPUT'https://api.rechargeapps.com/collections/134157' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"sort_order": "title-asc"}'{"collection":{"id":134157,"created_at":"2022-03-29T04:57:36+00:00","description":"cats products new release","sort_order":"title-asc","title":"Cats Spring 2022","type":"manual","updated_at":"2022-03-29T05:27:39+00:00"}}Delete aCollection
For safety and good UX, you can only delete aCollection if it is not in use in the Customer Portal
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
Not found
curl -XDELETE'https://api.rechargeapps.com/collections/134129' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Return a list ofCollections in your store.
GET /collectionsGET /collections?title=CatsThe title of theCollection. A short descriptive definition of theCollection.
successful response
curl'https://api.rechargeapps.com/collections' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next_cursor":null,"previous_cursor":null,"collections":[{"id":134136,"created_at":"2022-03-28T15:38:27+00:00","description":"cat products august 2022","sort_order":"title-asc","title":"Cats","type":"manual","updated_at":"2022-03-28T15:38:27+00:00"},{"id":134129,"created_at":"2022-03-28T12:27:03+00:00","description":"kitten accessories soft.","sort_order":"id-asc","title":"Soft Kitty","type":"manual","updated_at":"2022-02-23T11:27:34+00:00"}]}Return a list of the product ids included inCollections in your store.
GET /collection_productsGET /collection_products?collection_id=134157The id of theCollection for which you want to see the products.
successful response
Errors. Unprocessable entity.
curl'https://api.rechargeapps.com/collection_products' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next_cursor":null,"previous_cursor":null,"collection_products":[{"collection_id":111733,"created_at":"2022-03-30T18:12:09+00:00","external_product_id":"5","updated_at":"2022-03-30T18:12:09+00:00"},{"collection_id":111733,"created_at":"2022-02-12T12:53:33+00:00","external_product_id":"2","updated_at":"2022-02-12T12:53:33+00:00"},{"collection_id":111735,"created_at":"2022-02-12T06:46:49+00:00","external_product_id":"3","updated_at":"2022-02-12T06:46:49+00:00"}]}Add products to aCollection in Recharge.
An array of products and their collection definition to be added to theCollection.
Important: there is a set limit of 250 products that can be added per request.
successful response
unprocessable entity
internal server error. (often the external_product_id entered does not exist)
curl -XPOST'https://api.rechargeapps.com/collections/134129/collection_products-bulk' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "collection_products": [ { "external_product_id": "7" } ]}'{"collection_products":[{"collection_id":111733,"created_at":"2022-03-29T04:57:36+00:00","external_product_id":"7","updated_at":"2022-03-30T18:32:35+00:00"}]}Removes products from aCollection in Recharge.
The array of products to be removed from theCollection identified by theirexternal_product_id.
Important: there is a set limit of 250 products that can be added per request.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
Not found
curl'-X DELETE https://api.rechargeapps.com/collections/134129/collection_products-bulk' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "collection_products": [ { "external_product_id": "7" } ]}'{}Retain
The Credit Account object represents a set of positive and negative credit adjustments that when summed equal an available balance. Credit accounts may not have negative balances. A credit account may be associated with a customer, via the customer_id attribute. A customer may be associated with many credit accounts.
A credit adjustment represents a financial adjustment to the balance of a Credit Account. An adjustment of type ‘credit’ results in an increase in the available balance of a credit account, where an adjustment of type ‘debit’ results in a decrease.
Access to the Credits endpoints are only available for merchants usingRetain.
Unique numeric identifier for the Credit Account
Unique numeric identifier for thecustomer associated with thecredit_account.
The dollar amount of available credit in the credit account, in the associated Store’s default currency as configured in Recharge
The date and time at which the credit account was created.
The currency code for the credit account.
The date and time at which the credit account expires, and can no longer be adjusted.
The initial value of the credit account at the time of creation.
The name of the credit account
The type of the credit account. Accepted values arerewards andmanual.
The date and time at which the credit account was last updated.
{"credit_account":{"id":697470,"customer_id":36885098,"available_balance":"10.00","created_at":"2024-07-08T20:40:30+00:00","currency_code":"USD","expires_at":null,"initial_value":"1.55","name":"Reward Credit","type":"reward","updated_at":"2024-07-08T20:40:30+00:00"}}Create a new credit account.
The ID of the customer to create the credit account for.
The date and time at which the credit account expires, and can no longer be adjusted.
The initial value of the credit account at the time of creation.
The name of the credit account.
The type of the credit account. Accepted values arereward andmanual.
successful response
curl'https://api.rechargeapps.com/credit_accounts' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'customer_id=36885098' \ -d'name=Reward Credit' \ -d'type=reward' \ -d'initial_value=10.00' \ -d'expires_at=2026-01-01T00:00:00+00:00'{"credit_account":{"id":697470,"customer_id":36885098,"available_balance":"0.00","created_at":"2024-07-08T20:40:30+00:00","currency_code":"USD","expires_at":null,"initial_value":"0.45","name":"Reward Credit","type":"reward","updated_at":"2024-07-08T20:40:30+00:00"}}Retrieve one credit account usingcredit_account_id.
successful response
curl'https://api.rechargeapps.com/credit_accounts/697470' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"credit_account":{"id":697470,"customer_id":36885098,"available_balance":"0.00","created_at":"2024-07-08T20:40:30+00:00","currency_code":"USD","expires_at":null,"initial_value":"0.45","name":"Reward Credit","type":"reward","updated_at":"2024-07-08T20:40:30+00:00"}}Update a credit account name, expiration date or assign to a customer.
The name of the credit account.
The ID of the customer to assign the credit account to.
The date and time at which the credit account expires, and can no longer be adjusted.
successful response
curl'https://api.rechargeapps.com/credit_accounts/697470' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'name=Reward Credit' \ -d'customer_id=36885098' \ -d'expires_at=2026-01-01T00:00:00+00:00'{"credit_account":{"id":697470,"customer_id":36885098,"available_balance":"0.00","created_at":"2024-07-08T20:40:30+00:00","currency_code":"USD","expires_at":null,"initial_value":"0.45","name":"Reward Credit","type":"reward","updated_at":"2024-07-08T20:40:30+00:00"}}Return a list of credit accounts.
Return the list of credit accounts linked to the given Rechargecustomer_id
Return the list of credit accounts linked to any of the given Rechargecustomer_ids. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Return the list of credit accounts that expire after the given date (inclusive).
Return the list of credit accounts that expire before the given date (inclusive).
The amount of results. Default is 50 while the maximum is 250.
successful response
curl'https://api.rechargeapps.com/credit_accounts' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"next_cursor":"eyJzdGFydGluZ19iZWZvcmVfaWQiOjQ5ODg2NywibGFzdF92YWx1ZSI6NDk4ODY3LCJzb3J0X2J5IjoiaWQtZGVzYyIsImN1cnNvcl9kaXIiOiJuZXh0In0","previous_cursor":null,"credit_accounts":[{"id":697470,"customer_id":36885098,"available_balance":"0.00","created_at":"2024-07-08T20:40:30+00:00","currency_code":"USD","expires_at":null,"initial_value":"0.45","name":"Reward Credit","type":"reward","updated_at":"2024-07-08T20:40:30+00:00"}]}Create a new credit adjustment for a specific credit account usingcredit_account_id.
The amount of the credit adjustment.
The note for the credit adjustment.
Possible values: debit, credit
The type of the credit adjustment. Accepted values aredebit andcredit.
successful response
curl'https://api.rechargeapps.com/credit_accounts/697470/credit_adjustments' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"amount": "10.00", "note": "Gift card purchase", "type": "debit"}'{"credit_adjustment":[{"id":4866849,"credit_account_id":697470,"amount":"0.45","created_at":"2024-08-08T04:06:37+00:00","created_by":{"resource_id":null,"identifier":"API","type":"external"},"currency_code":"USD","ending_balance":"0.00","note":"Amount related with order Charge Id: 11888235","type":"debit","updated_at":"2024-08-08T04:06:37+00:00"}]}Retrieve credit adjustments associated with specific credit account usingcredit_account_id.
The amount of results. Default is 50 while the maximum is 250.
successful response
curl'https://api.rechargeapps.com/credit_accounts/697470/credit_adjustments' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"next_cursor":null,"previous_cursor":null,"credit_adjustments":[{"id":4866849,"credit_account_id":697470,"amount":"0.45","created_at":"2024-08-08T04:06:37+00:00","currency_code":"USD","ending_balance":"0.00","note":"Amount related with shop order store.myshopify.com Address Id: 169902120 Charge Id: 1125729345","type":"debit","updated_at":"2024-08-08T04:06:37+00:00"},{"id":4719708,"credit_account_id":697470,"amount":"0.45","created_at":"2024-07-08T20:40:31+00:00","currency_code":"USD","ending_balance":"0.45","note":"3% Cash back on curious tomatoes","type":"credit","updated_at":"2024-07-08T20:40:31+00:00"}]}Retrieve a list of credit adjustments.
Return the list of credit adjustments linked to the given Rechargeids. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Return the list of credit adjustments created after the given date.
Return the list of credit adjustments created before the given date.
Only supported value iscustomer. Ifcustomer is included, the response will include the customer object.
The amount of results. Default is 50 while the maximum is 250.
Sort the results by the given field.
Return the list of credit adjustments updated after the given date.
Return the list of credit adjustments updated before the given date.
successful response
curl'https://api.rechargeapps.com/credit_adjustments' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"next_cursor":"eyJzdGFydGluZ19iZWZvcmVfaWQiOjQ4NjY4NDksImxhc3RfdmFsdWUiOjQ4NjY4NDksInNvcnRfYnkiOiJpZC1kZXNjIiwiY3Vyc29yX2RpciI6Im5leHQifQ","previous_cursor":null,"credit_adjustments":[{"id":4866849,"credit_account_id":697470,"amount":"0.45","created_at":"2024-08-08T04:06:37+00:00","created_by":{"resource_id":null,"identifier":"API","type":"external"},"currency_code":"USD","ending_balance":"0.00","note":"Amount related with shop order shop.myshopify.com. Address Id: 169902120 Charge Id: 1125729345","type":"debit","updated_at":"2024-08-08T04:06:37+00:00"}]}TheCustomer object holds account information. Email is unique on theCustomer; no two customers for a store can have the same email.Address is a child of theCustomer object. There can be many childAddresses on a customer, but only one parentCustomer perAddress.
Unique numeric identifier for theCustomer.
An object containing analytics data associated with the customer.
A boolean that indicates whether Recharge credits will be applied to the next recurring charge.
The date and time when the customer was created.
The email address of the customer.
An object containing external ids for the customer record.
Date when first charge was processed for the customer.
The customer’s first name.
A boolean that indicates if the customer has a payment method that is in dunning (failed charge).
Is the payment method valid or not.
The unique string identifier used in a customers portal link.
The customer’s last name.
The customer’s phone number.
The number of active subscriptions on addresses associated with the customer.
The total number of subscriptions created on addresses associated with the customer.
The number of consecutive subscription-related charges processed for this customer, while they retain at least one active subscription. When all subscriptions for this customer are cancelled or expired, this value will reset to zero.
Whether the customer tax exempt or not.
The date and time when the customer was last updated.
{"id":18819267,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"created_at":"2018-11-14T08:40:38+00:00","email":"example_mail@gmail.com","external_customer_id":{"ecommerce":"126576412310131454"},"first_charge_processed_at":null,"first_name":"Jacob","has_payment_method_in_dunning":false,"has_valid_payment_method":false,"hash":"18819267b1f9095be98f13a8","last_name":"Bronowski","phone":"+16175551212","subscriptions_active_count":0,"subscriptions_total_count":1,"tax_exempt":false,"updated_at":"2020-11-14T08:40:38+00:00"}Create a customer in Recharge.
If you plan to add payment information,it must be the tokenized customer representation. We do not accept card data directly. For Stripe users, please make sure it starts with ‘cus’ and not with a 'tok’, as the 'cus’ is prefix for customer token, and 'tok’ is prefix for payment token.
Creating a customer in Recharge will not create the customer on any other platform at this time.write_payment_methods permission is only required when creating customers with payment token information, or updating payment token information on a customer.phone must be in E.164 format, such as+16175551212.
The customer’s email address.
An object containing external ids for the customer record.
The customer’s first name.
The customer’s last name.
The customer’s phone number.
Whether or not the customer is tax exempt.
successful response
curl'https://api.rechargeapps.com/customers' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "first_name": "Niels", "last_name": "Bohr", "email": "fake@example.com"}{"customer":{"id":37657002,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"created_at":"2020-02-19T17:40:07+00:00","email":"fake@example.com","external_customer_id":{"ecommerce":"2879413682227"},"first_charge_processed_at":"2020-02-19T17:40:11+00:00","first_name":"Jane","has_payment_method_in_dunning":false,"has_valid_payment_method":true,"hash":"7e706455cbd13e40","last_name":"Doe","phone":null,"subscriptions_active_count":0,"subscriptions_total_count":0,"subscription_related_charge_streak":0,"tax_exempt":false,"updated_at":"2020-12-17T18:50:39+00:00"}}Retrieve one customer usingcustomer_id.
successful response
curl'https://api.rechargeapps.com/customers/37657002' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"customer":{"id":37657002,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"created_at":"2020-02-19T17:40:07+00:00","email":"fake@example.com","external_customer_id":{"ecommerce":"2879413682227"},"first_charge_processed_at":"2020-02-19T17:40:11+00:00","first_name":"Jane","has_payment_method_in_dunning":false,"has_valid_payment_method":true,"hash":"7e706455cbd13e40","last_name":"Doe","phone":"+16175551212","subscriptions_active_count":0,"subscriptions_total_count":1,"subscription_related_charge_streak":0,"tax_exempt":false,"updated_at":"2020-12-17T18:50:39+00:00"}}Modify an existingCustomer to match the specified parameters.
For US citizens, parameterbilling_zip is required when updating customer’sbilling_country parameter.phone must be in E.164 format, such as+16175551212.
A boolean that indicates whether Recharge credits will be applied to the next recurring charge.
This property is dependent upon the store’s credit settings. If a call is made attempting to update this and the store has recurring redemption turned off or set to automatically redeem, the API will return a 422 response.
Email address of the customer.
An object containing external ids for the customer record.
Customer’s first name.
Customer’s last name.
The customer’s phone number.
Whether or not the customer is tax exempt.
successful response
curl -XPUT'https://api.rechargeapps.com/customers/37657002' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"last_name": "Doe"}'{"customer":{"id":37657002,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"created_at":"2020-02-19T17:40:07+00:00","email":"fake@example.com","external_customer_id":{"ecommerce":"2879413682227"},"first_charge_processed_at":"2020-02-19T17:40:11+00:00","first_name":"Jane","has_payment_method_in_dunning":false,"has_valid_payment_method":true,"hash":"7e706455cbd13e40","last_name":"Doe","phone":"+16175551212","subscriptions_active_count":0,"subscriptions_total_count":1,"tax_exempt":false,"updated_at":"2020-12-17T18:50:39+00:00"}}Customer deletion will automatically cancel and delete all child Address, Subscription, Onetime, etc. resources of that customer to eliminate orphaned child data.
To delete a certain address without deleting the customer you can use the Delete Address endpoint.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/customers/37657002' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Return a list of customers in your store.
GET /customersGET /customers?email=example@email.comGET /customers?hash=143806234a9ff87a8d9eGET /customers?limit=250GET /customers?page=2GET /customers?external_customer_id=98273498If emails contain special characters such as ‘john+doe@example.com’, you will need to encode them in the URLs, i.e.?email=john%2Bdoe@example.com
Returns the user linked to the email address provided.
Gets all customers created before this date.
Gets all customers created after this date.
Returns the user linked to the given recharge customer hash.
Filter customers by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Default: 50
Max: 250
Number of results.
Default: 1
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, usecursor pagination.
Returns the user linked to the givenexternal_customer_id.
Gets all customers updated before this date.
Gets all customers updated after this date.
successful response
curl'https://api.rechargeapps.com/customers' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next_cursor":"next_cursor","previous_cursor":"previous_cursor","customers":[{"id":37657002,"analytics_data":{"utm_params":[{"utm_source":"facebook","utm_medium":"cpc"}]},"created_at":"2020-02-19T17:40:07+00:00","email":"fake@example.com","external_customer_id":{"ecommerce":"2879413682227"},"first_charge_processed_at":"2020-02-19T17:40:11+00:00","first_name":"Jane","has_payment_method_in_dunning":false,"has_valid_payment_method":true,"hash":"7e706455cbd13e40","last_name":"Doe","phone":"+16175551212","subscriptions_active_count":0,"subscriptions_total_count":1,"tax_exempt":false,"updated_at":"2020-12-17T18:50:39+00:00"}]}Returns the list of projected deliveries in a specific interval.
If several filters are passed in parameters, the most restrictive will dominate.
The maximum length of the future delivery interval is 365 days.
The count of delivery objects that should be included that reference projected orders.
Will not return deliveries past 365 days in the future.
The count of days forward to report deliveries on.
Defaults to store setting or 90. Maximum of 365 days.
The end date of the requested delivery schedule.
Cannot be in the past. Cannot exceed 365 days in the future.
successful response
curl -XGET'https://api.rechargeapps.com/customers/37657002/delivery_schedule' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"deliverySchedule":{"customer":{"id":73720164,"email":"test@example.com","first_name":"Aria","last_name":"Beciu"},"deliveries":[{"date":"2022-02-07","orders":[{"id":null,"address_id":79342717,"charge_id":507503288,"line_items":[{"subscription_id":186930285,"external_product_id":{"ecommerce":"1642443555555"},"external_variant_id":{"ecommerce":null},"images":{},"is_skippable":true,"is_skipped":false,"is_prepaid":false,"original_price":"17.00","plan_type":"subscription","product_title":"Organic coffee beans","properties":[{"name":"shipping_interval_unit_type","value":"month"},{"name":"shipping_interval_frequency","value":"1"},{"name":"subscription_id","value":null}],"quantity":1,"subtotal_price":"17.00","unit_price":"17.00","variant_title":"Refill large"}],"order_subtotal":"17.00","payment_method":{"id":769874,"billing_address":{"address1":"90 avenue du Rouergue","address2":null,"city":"Rodez","company":null,"country_code":"FR","first_name":"Diane","last_name":"Farley","phone":null,"province":null,"zip":"12000"},"payment_details":{}},"shipping_address":{"address1":"149 Forest Avenue","address2":null,"city":"New York City","company":null,"country_code":"US","first_name":"Aria","last_name":"Beciu","phone":"1234567890","province":"New York","zip":"10019"}}]}]}}Returns a credit summary for the customer.
successful response
curl -XGET'https://api.rechargeapps.com/customers/37657002/credit_summary' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"credit_summary":{"customer_id":37657002,"total_available_balance":"0.00","currency_code":"USD"}}Discounts can be applied to aCheckout, or can be applied directly to anAddress. Depending on configuration they allow for single use, or recurring discounts. More details on how to add or remove discounts from anAddress can be found atUpdate an address.
Often discounts can be used in combination with webhooks, such that when a specific event occurs, it can apply a discount dependent on custom business logic.
There are various options that can be utilized for discounts such as minimum price, single use, recurring for a set number of charges, or ongoing. You can also set the date from which time the discount will become applicable and when it can no longer be applied to a new subscription.
Unique numeric identifier for the discount in Recharge.
An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.).
A list of channel objects containing information regarding discount behaviors for each.
If you’re on the SCI Platform, checkout channel will not apply during Shopify checkouts.
The code used to apply the discount.
The date and time when the discount was created.
The expiration timestamp of the discount. Past this time theDiscount can no longer be redeemed. Afterends_at thestatus of theDiscount will go fromactive todisabled.
Recurring discounts applied prior to theirends_at time will still apply.
An object containing external ids of the discount.
Discount can be used on checkout for customer that still don’t exist in Recharge database.
The minimum cart subtotal needed for the discount to be applicable.
The date when the discount becomes active.
When not specified on creationstarts_at will default tonull which translates into no restrictions.
Possible values: enabled, disabled, fully_disabled
The status of the discount. Value can be:
*enabled discount is active to be applied
*disabled discount can’t be applied on new purchases. Discount will remain on existing charges to which it has already been applied.
*fully_disabled discount can no longer be applied. In addition,Discount is removed from every queued charge.
disabled andfully_disabled can both be reverted toenabled. However once aDiscount has been updated tofully_disabled it will be removed from allCharges it had been applied to. This removal fromCharges is irreversible.
An object containing limitations on a discount based on usage_counts results
The date and time when the discount was last updated.
The discounted value to be applied.
Possible values: fixed_amount, percentage, shipping
Type of discount mechanic.
{"discount":{"applies_to":{"ids":[],"purchase_item_type":"ALL","resource":null},"channel_settings":{"api":{"can_apply":true},"checkout_page":{"can_apply":true},"customer_portal":{"can_apply":true},"merchant_portal":{"can_apply":true}},"code":"TEST_DISCOUNT","created_at":"2021-04-01T16:13:53+00:00","ends_at":null,"external_discount_id":{"ecommerce":"1642443555555"},"external_discount_source":null,"id":25463058,"prerequisite_subtotal_min":null,"starts_at":null,"status":"enabled","updated_at":"2021-04-13T22:24:59+00:00","usage_limits":{"first_time_customer_restriction":false,"max_subsequent_redemptions":null,"one_application_per_customer":false},"value":"20.00","value_type":"percent"}}Create a new discount.
An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.)
A list of channel objects containing information regarding discount behaviors for each.
* can_apply: a boolean to indicate if the discount may be applied using the associated channel (defaults to true for all channels).
The code used to apply the discount.
The expiration timestamp of the discount. Past this time theDiscount can no longer be redeemed. Afterends_at thestatus of theDiscount will go fromactive todisabled.
Recurring discounts applied prior to theirends_at time will still apply.
The minimum cart subtotal needed for the discount to be applicable.
The date when the discount becomesACTIVE.
When not specified on creationstarts_at will default tonull which translates into no restrictions.
Possible values: enabled, disabled, fully_disabled
The status of the discount.
Sets the limit on the number of times a discount can be used by all customers.
The discounted value to be applied.
Possible values: fixed_amount, percentage, shipping
The discount type.
successful response
curl'https://api.rechargeapps.com/discounts' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "applies_to": { "purchase_item_type": "ALL" }, "channel_settings": { "api": { "can_apply": true }, "checkout_page": { "can_apply": true }, "customer_portal": { "can_apply": true }, "merchant_portal": { "can_apply": true } }, "code": "Discount1", "status": "enabled", "usage_limits": { "first_time_customer_restriction": false, "one_application_per_customer": false }, "value": "100.00", "value_type": "percentage"}'{"discount":{"id":59568555,"applies_to":{"ids":[],"purchase_item_type":"ALL","resource":null},"channel_settings":{"api":{"can_apply":true},"checkout_page":{"can_apply":true},"customer_portal":{"can_apply":true},"merchant_portal":{"can_apply":true}},"code":"Discount1","created_at":"2021-07-26T19:16:17+00:00","ends_at":null,"external_discount_id":{"ecommerce":null},"external_discount_source":null,"prerequisite_subtotal_min":null,"starts_at":null,"status":"enabled","updated_at":"2021-07-26T19:16:17+00:00","usage_limits":{"first_time_customer_restriction":false,"max_subsequent_redemptions":null,"one_application_per_customer":false},"value":"100.00","value_type":"percentage"}}Retrieve a single Recharge Discount
successful response
curl'https://api.rechargeapps.com/discounts/1234567' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"discount":{"id":59568555,"applies_to":{"ids":[],"purchase_item_type":"ALL","resource":null},"channel_settings":{"api":{"can_apply":true},"checkout_page":{"can_apply":true},"customer_portal":{"can_apply":true},"merchant_portal":{"can_apply":true}},"code":"Discount1","created_at":"2021-07-26T19:16:17+00:00","ends_at":null,"external_discount_id":{"ecommerce":null},"external_discount_source":null,"prerequisite_subtotal_min":null,"starts_at":null,"status":"enabled","updated_at":"2021-07-26T19:16:17+00:00","usage_limits":{"first_time_customer_restriction":false,"max_subsequent_redemptions":null,"one_application_per_customer":false},"value":"100.00","value_type":"percentage"}}You can modify an existing discount to match the specified parameters.
An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.)
A list of channel objects containing information regarding discount behaviors for each.
* can_apply: a boolean to indicate if the discount may be applied using the associated channel (defaults to true for all channels).
The code used to apply the discount…
The expiration timestamp of the discount. Past this time theDiscount can no longer be redeemed. Afterends_at thestatus of theDiscount will go fromactive todisabled.
Recurring discounts applied prior to theirends_at time will still apply.
The minimum cart subtotal needed for the discount to be applicable.
The date when the discount becomes active.
Possible values: enabled, disabled, fully_disabled
The status of the discount. Value can be:
*enabled discount is active to be applied
*disabled discount can’t be applied on new purchases. Discount will remain on existing charges to which it has already been applied.
*fully_disabled discount can no longer be applied. In addition,Discount is removed from every queued charge.
disabled andfully_disabled can both be reverted toenabled. However once aDiscount has been updated tofully_disabled it will be removed from allCharges it had been applied to. This removal fromCharges is irreversible.
Sets the limit on the number of times a discount can be used by all customers.
The discounted value to be applied.
Possible values: fixed_amount, percentage, shipping
The discount type.
successful response
curl -XPUT'https://api.rechargeapps.com/discounts/11127406' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "usage_limits": {}, "starts_at": "2021-11-01T00:00:00+00:00"}'{"discount":{"id":59568555,"applies_to":{"ids":[],"purchase_item_type":"ALL","resource":null},"channel_settings":{"api":{"can_apply":true},"checkout_page":{"can_apply":true},"customer_portal":{"can_apply":true},"merchant_portal":{"can_apply":true}},"code":"Discount1","created_at":"2021-07-26T19:16:17+00:00","ends_at":null,"external_discount_id":{"ecommerce":null},"external_discount_source":null,"prerequisite_subtotal_min":null,"starts_at":null,"status":"enabled","updated_at":"2021-07-26T19:16:17+00:00","usage_limits":{"first_time_customer_restriction":false,"max_subsequent_redemptions":null,"one_application_per_customer":false},"value":"100.00","value_type":"percentage"}}Delete a discount
For safety reasons, to delete a discount you will need to set its status tofully_disabled.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/discounts/12081717' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11'{}Return a list of discounts in your store.
GET /discountsGET /discounts?created_at_max=2017-10-01GET /discounts?created_at_max=2017-10-01GET /discounts?created_at_min=2017-10-01GET /discounts?discount_code=DiscountGET /discounts?discount_type=percentageGET /discounts?updated_at_min=2017-10-01Get all discounts created before a specified date.
Get all discounts created after a specified date.
Search for a particular discount code.
Possible values: percentage, fixed_amount, shipping
Filter based on type of discount.
Filter discounts by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Default: 50
Max: 250
Number of results to return.
Default: 1
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, usecursor pagination.
Possible values: enabled, disabled, fully_disabled
Returns all discounts with statusenabled,disabled orfully_disabled.
Get all discounts updated before a specified date.
Get all discounts updated after a specified date.
successful response
curl -XGET'https://api.rechargeapps.com/discounts' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"next_cursor":null,"previous_cursor":null,"discounts":[{"id":59568555,"applies_to":{"ids":[],"purchase_item_type":"ALL","resource":null},"channel_settings":{"api":{"can_apply":true},"checkout_page":{"can_apply":true},"customer_portal":{"can_apply":true},"merchant_portal":{"can_apply":true}},"code":"Discount1","created_at":"2021-07-26T19:16:17+00:00","ends_at":null,"external_discount_id":{"ecommerce":null},"external_discount_source":null,"prerequisite_subtotal_min":null,"starts_at":null,"status":"enabled","updated_at":"2021-07-26T19:16:17+00:00","usage_limits":{"first_time_customer_restriction":false,"max_subsequent_redemptions":null,"one_application_per_customer":false},"value":"100.00","value_type":"percentage"}]}Metafields allow users to add additional information to other resources. They can be used for adding custom fields to objects, and are useful for storing specialized information.
Metafields feature allows to add additional information to other resources. They can be used for adding custom fields to objects, and are useful for storing specialized information.
You can extend the responses of some of these objects by appending theinclude?=metafields as part of yourGET request.
cf.Extending responses for more info.
Unique numeric identifier for the metafield.
The date and time when the metafield was created.
Description of the metafield.
The name of the metafield.
A category or container that differentiates your metadata from other metafields.
Unique numeric identifier of theowner_resource.
Possible values: address, store, customer, subscription, order, charge
Objects which supportMetafields
The date and time when the metafield was last updated.
The content of the metafield.
Possible values: string, integer, json_string
The type of the value parameter.
{"metafield":{"id":33,"created_at":"2018-11-07T14:00:10","description":"customer_phone_number","key":"phone_number","namespace":"personal_info","owner_id":18301938,"owner_resource":"customer","updated_at":"2018-11-07T14:00:10","value":"3103103101","value_type":"integer"}}Creates a metafield for a specific object.
There is a limit of 50 metafields perowner_id.
You need to haveWRITE rights to the resource you want to create aMetafield for.
Description of the metafield.
The name of the metafield.
A category or container that differentiates your metadata from other metafields.
Unique numeric identifier of the owner resource.
Possible values: address, store, customer, subscription, order, charge
The owner of the resource.
The content of the metafield.
Possible values: string, integer, json_string
The type of the value parameter.
successful response
curl'https://api.rechargeapps.com/metafields' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "metafield": { "description": "customer_phone_number", "key": "phone_number", "namespace": "personal_info", "owner_resource": "customer", "owner_id": 18301938, "value_type": "integer", "value": "3103103101" }}'{"metafield":{"id":33,"created_at":"2018-11-07T14:00:10","description":"customer_phone_number","key":"phone_number","namespace":"personal_info","owner_id":18301938,"owner_resource":"customer","updated_at":"2018-11-07T14:00:10","value":"3103103101","value_type":"integer"}}Retrieves a single metafield based on a specified id.
GET /metafields/<metafield_id>subscription_id by using:GET /metafields?owner_resource=subscription&owner_id=<subscription_id>successful response
curl'https://api.rechargeapps.com/metafields/33' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11'{"metafield":{"id":33,"created_at":"2018-11-07T14:00:10","description":"customer_phone_number","key":"phone_number","namespace":"personal_info","owner_id":18301938,"owner_resource":"customer","updated_at":"2018-11-07T14:00:10","value":"3103103101","value_type":"integer"}}Updates a metafield based on a specifiedowner_resource.
Description of the metafield.
Unique numeric identifier of the resource.
Possible values: address, store, customer, subscription, order, charge
The owner of the resource can be one of the following values:address,store,customer,subscription,order,charge. There may be more objects added in the future.
The content of the metafield.
Possible values: string, integer, json_string
The type of the value parameter.
OK: The request was successful, created a new resource, and resource created is in the body.
curl -XPUT'https://api.rechargeapps.com/metafields/33' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -d'{ "metafield": { "description": "phone_number_of_customer", "owner_id": 18293088, "owner_resource": "customer", "value": "0333103133", "value_type": "integer" }}'{"metafield":{"id":33,"created_at":"2018-11-07T14:00:10","description":"customer_phone_number","key":"phone_number","namespace":"personal_info","owner_id":18301938,"owner_resource":"customer","updated_at":"2018-11-07T14:00:10","value":"3103103101","value_type":"integer"}}Delete a metafield based on a specified id.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/metafields/6' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11'{}Retrieves a list of metafields.
GET /metafields?owner_resource=<owner_resource>GET /metafields?owner_resource=subscription&owner_id=<subscription_id>GET /metafields?owner_resource=customer&owner_id=<customer_id>GET /metafields?owner_resource=store&owner_id=<store_id>address,store,customer,subscription,order,chargeGET /metafields?owner_resource=subscription -**owner_id** in the response will be the ID of the subscription.Default: 50
Max: 250
Amount of results.
(default:50) (maximum: 250).
A category or container that differentiates your metadata from other metafields.
Unique numeric identifier of the owner resource.
Possible values: address, store, customer, subscription, order, charge
The owner of the resource can be one of the following values:address,store,customer,subscription,order,charge. There may be more objects added in the future.
Default: 1
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, usecursor pagination.
successful response
curl'https://api.rechargeapps.com/metafields' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -d owner_resource=address \ -d limit=3 -G{"next_cursor":"next_cursor","previous_cursor":"previous_cursor","metafields":[{"id":33,"created_at":"2018-11-07T14:00:10","description":"customer_phone_number","key":"phone_number","namespace":"personal_info","owner_id":18301938,"owner_resource":"customer","updated_at":"2018-11-07T14:00:10","value":"3103103101","value_type":"integer"},{"id":15,"created_at":"2018-11-05T12:59:30","description":"desc lorem ipsum","key":"marjan","namespace":"nmsp2c","owner_id":17868054,"owner_resource":"customer","updated_at":"2018-11-05T15:48:42","value":"5","value_type":"integer"},{"id":9,"created_at":"2018-11-05T12:47:27","description":"desc lorem ipsum","key":"marjan","namespace":"nmspc","owner_id":17868054,"owner_resource":"customer","updated_at":"2018-11-05T12:47:27","value":"5","value_type":"integer"}]}The Customer Notifications resource is used to dispatch email notifications to customers within Recharge. The endpoint uses your configured Recharge email templates, and will dispatch an email to the address associated with the indicatedcustomer_id. Some email templates require variable values, which are sent through the Customer Notifications resource via the template_vars attribute. See below examples for all available template types.
Sends a notification email to the customer with thecustomer_id indicated in the route. To view the upcoming charge email template, visit the Notifications section in your Recharge Merchant Admin Portal.
Identifies the type of the notifications. Value can be email only.
Possible values: upcoming_charge, get_account_access, shopify_update_payment_information
Identifies the type of the email notifications.
An object containing the necessary template variables for this email template type.
successful response
curl'https://api.rechargeapps.com/customers/18819267/notifications' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "type": "email", "template_type": "upcoming_charge", "template_vars":{ "address_id":1234567890, "charge_id":9876543210 }}'{}Onetimes represent non-recurring line items on aQUEUEDCharge.
Unique numeric identifier for theOnetime purchase.
Unique numeric identifier for the address theOnetime Purchase is associated with (cannot be used withnext_charge_scheduled_at)
The time theOnetime item was first created.
Unique numeric identifier for the customer theOnetime purchase is tied to.
An object containing the product id as it appears in external platforms.
An object containing the variant id as it appears in external platforms.
Flag indicating if the the onetime is cancelled.
Date of theOnetime purchase execution.
Cannot be used withadd_to_next_charge
The price of the item before discounts, taxes, or shipping have been applied.
The name of the product in a shop’s catalog.
An array containing key value pairs for any supplementary data.
The number of items in theOnetime purchase.
A unique identifier of the item in the fulfillment.
Flag that is automatically updated totrue when SKU is passed onPOST orPUT.
Whensku_override istrue, thesku on theOnetime will be used to generateCharges andOrders.
Whensku_override isfalse, Recharge will dynamically fetch thesku from the correspondingexternal_platform_variant.
The time theOnetime purchase was last updated.
The name of the variant in a shop’s catalog.
{"onetime":{"id":16909886,"address_id":21317826,"customer_id":18819267,"created_at":"2018-11-14T11:20:05+00:00","external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2018-12-17T00:00:00+00:00","price":null,"product_title":"SuperKiwi ONETIME","properties":[{"name":"grind","value":"drip"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2018-11-14T11:20:05+00:00","variant_title":"Blue star"}}Create a newOnetime.
Unique numeric identifier for the address the one time purchase is associated with.
Instructs to add theOnetime to the next charge scheduled under thisAddress.
Unique numeric identifier of the product in external platform.
Unique numeric identifier of the product variant in external platform.
This will set the charge date of a new Onetime purchase.
Cannot be used withadd_to_next_charge
The price of the product.
The name of the product.
List of properties.
The quantity of the product.
A unique identifier of the item in the fulfillment.
OK: The request was successful, created a new resource, and resource created is in the body.
curl'https://api.rechargeapps.com/onetimes' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "address_id": 45154492, "next_charge_scheduled_at": "2021-12-17", "price": 6, "product_title": "ABC Shirt", "properties": [ { "name": "Color", "value": "Blue" }, { "name": "Size", "value": "Medium" } ], "quantity": 1, "external_variant_id": { "ecommerce": "3844892483" }}'{"onetime":{"id":156155818,"address_id":45154492,"customer_id":40565990,"created_at":"2021-05-24T19:14:25+00:00","external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2021-12-17T05:00:00+00:00","price":"6.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Red"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2021-05-24T19:30:14+00:00","variant_title":"Blue star"}}Retrieve a Onetime.
successful response
curl'https://api.rechargeapps.com/onetimes/16909886' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"onetime":{"id":16909886,"address_id":45154492,"created_at":"2021-05-24T19:14:25+00:00","customer_id":40565990,"external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2021-12-17T05:00:00+00:00","price":"6.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2021-05-24T19:30:14+00:00","variant_title":"Blue star"}}Update an existingOnetime item.
Unique numeric identifier for the address theOnetime Purchase is associated with (cannot be used withnext_charge_scheduled_at)
This will set the charge date of a newOnetime purchase.
The price of the product.
The name of the product.
List of properties.
The quantity of the product.
Unique numeric identifier of the product variant.
A unique alphanumeric identifier of the item in the fulfillment.
The name of the product variant.
successful response
curl -xPUT'https://api.rechargeapps.com/onetimes/16909886' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"quantity": 1}'{"onetime":{"id":16909886,"address_id":45154492,"created_at":"2021-05-24T19:14:25+00:00","customer_id":40565990,"external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2021-12-17T05:00:00+00:00","price":"6.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2021-05-24T19:30:14+00:00","variant_title":"Blue star"}}Delete aOnetime.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/onetimes/16665185' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Returns a list of allOnetime products from store.
Return the onetimes linked to the givenaddress_id.
Return the onetimes linked to the given comma-separated list ofaddress_ids.
Return the onetimes created before the given date.
Return the onetimes created after the given date.
Return the onetimes linked to the given Rechargecustomer_id.
Iftrue the response will include the cancelledOnetimes as well as the others.
Default: 50
Max: 250
The number of results.
Default: 1
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, usecursor pagination.
Return the one time purchases linked to the given external platform productvariant_id.
Return the onetimes updated before the given date.
Return the onetimes updated after the given date.
Comma-separated list of one time purchase ids to filter.
successful response
curl'https://api.rechargeapps.com/onetimes' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next":"next_cursor","previous":"previous_cursor","onetimes":[{"id":16909886,"address_id":45154492,"created_at":"2021-05-24T19:14:25+00:00","customer_id":40565990,"external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2021-12-17T05:00:00+00:00","price":"6.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2021-05-24T19:30:14+00:00","variant_title":"Blue star"}]}An order is created after aCharge is successfully processed. TheOrder contains all the same json data as theCharge. In case of a prepaid order creation, the order will be queued for a particular date and submitted on that date to the external platform.
The unique numeric identifier for the order.
The id of the associatedAddress within Recharge.
The billing address at the time the order was created. SeeAddresses for detailed address information.
An object containing parameters of theCharge.
Details of the access method used by the purchase.
The date when the order was created.
The currency of the payment used to create the order.
Object that contains information about theCustomer.
An array ofDiscounts associated with theOrder.
The cart token as it appears in an external system.
An object containing external order ids.
An object containing the external order numbers.
A boolean representing if thisOrder is generated from a prepaid purchase.
A list ofline_item objects.
Notes associated with theOrder.
An array of name value pairs of note attributes on theOrder.
The date time that the associated charge was processed at.
The date time of when the associated charge is/was scheduled to process.
The shipping address where the order will be shipped. SeeAddresses for detailedAddress information.
An array of shipping lines associated with the order.
Possible values: success, error, queued, cancelled
The status of creating theOrder.
The subtotal price (sum of all line items * their quantity) of the order less discounts.
A comma separated list of tags on theOrder.
An array of tax lines that apply to theOrder.
A boolean indicator of the taxability of theOrder.
The total discounted dollar value of theOrder.
The total cost of duties for the order.
The total price of all line items of theOrder.
The total amount due of theOrder.
The total dollar amount of refunds associated with theOrder.
The total tax due associated with theOrder.
The total weight of the order in grams.
Possible values: checkout, recurring
An indicator of the order’s type.
The date time at which the order was most recently updated.
{"order":{"id":70071255,"address_id":4029306,"billing_address":{"address1":"1933 Manning","address2":"204","city":"los angeles","company":"bootstrap","country_code":"US","first_name":"mike","last_name":"flynn","phone":"3103103101","province":"California","zip":"90025"},"charge":{"id":97376832,"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"}},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2018-11-08T08:08:09+00:00","currency":"usd","customer":{"id":12354,"email":"example@email.com","external_customer_id":{"ecommerce":"382028302"},"hash":"7e706455cbd13e40"},"discounts":[{"id":123456,"code":"TESTCODE10","value":"10.00","value_type":"fixed_amount"}],"external_cart_token":"aeic8101918fs0f8810","external_order_id":{"ecommerce":"123496878536413"},"external_order_number":{"ecommerce":"125"},"hash":"42039120ee0e6cfa5c97805","is_prepaid":false,"line_items":[{"purchase_item_id":365974856,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"456123789"},"external_variant_id":{"ecommerce":"4569876413"},"grams":454,"images":{"large":"https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_large.jpeg","medium":"https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_medium.jpeg","original":"https://cdn.shopify.com/s/files/1/0683/1951/products/milk2.jpeg","small":"https://cdn.shopify.com/s/files/1/0683/1951/products/milk2_small.jpeg"},"original_price":"10.00","properties":[{"name":"grind","value":"drip"},{"name":"size","value":"medium"}],"purchase_item_type":"subscription","quantity":4,"sku":"TOM0001","tax_due":"3.80","tax_lines":[{"price":"0.993","rate":"0.0725","unit_price":"0.331","title":"CA State Tax"},{"price":"0.308","rate":"0.0225","unit_price":"0.102","title":"LA County Tax"}],"taxable":true,"taxable_amount":"10.00","title":"Shirt bundle","total_price":"43.80","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":"next order #3 - Subscription Recurring Order","order_attributes":[{"name":"subscription_cycle_count_min","value":"3"}],"processed_at":null,"scheduled_at":"2022-11-16T00:00:00+00:00","shipping_address":{"address1":"1933 Manning","address2":"204","city":"los angeles","company":"bootstrap","country_code":"US","first_name":"mike","last_name":"flynn","phone":"3103103101","province":"California","zip":"90025"},"shipping_lines":[{"code":"Standard Shipping","price":"4.90","taxable":true,"tax_lines":[{"price":"0.360","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"LA County Tax"}],"title":"Standard Shipping"}],"status":"cancelled","subtotal_price":"40.00","tags":"Prepaid, 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"}],"taxable":true,"total_discounts":"10.00","total_duties":"0.0","total_line_items_price":"40.00","total_price":"38.22","total_refunds":"0.00","total_tax":"3.32","total_weight_grams":454,"type":"recurring","updated_at":"2020-12-20T13:25:52+00:00"}}Retrieve oneOrder using the Rechargeorder_id.
successful response
curl'https://api.rechargeapps.com/orders/70071255' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"order":{"id":210987092,"address_id":42171447,"billing_address":{"address1":"601 SW Washing St.","address2":"","city":"Portland","company":"Fake Company Billing","country_code":"US","first_name":"Fake Billing First","last_name":"Fake Billing Last","phone":"888-888-8888","province":"Oregon","zip":"97205"},"charge":{"id":272382456,"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"}},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2020-12-17T18:50:25+00:00","currency":"usd","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"382028302"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"external_cart_token":"aeic8101918fs0f8810","external_order_id":{"ecommerce":"27117383938"},"external_order_number":{"ecommerce":"1938"},"is_prepaid":false,"line_items":[{"purchase_item_id":63898947,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_lines":[{"price":"0.993","rate":"0.0725","title":"CA State Tax","unit_price":"0.331"},{"price":"0.308","rate":"0.0225","title":"LA County Tax","unit_price":"0.102"}],"taxable":true,"taxable_amount":"10.00","tax_due":"1.30","title":"Shirt bundle","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":"next order in sequence 3","order_attributes":[{"name":"subscription_cycle_count_min","value":"3"}],"processed_at":"2020-12-17T18:50:27+00:00","scheduled_at":"2020-12-17T18:50:27+00:00","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","taxable":true,"tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.00","total_duties":"0.0","total_line_items_price":"10.00","total_price":"14.90","total_refunds":"0.00","total_tax":"10.00","total_weight_grams":454,"type":"recurring","updated_at":"2020-12-17T18:50:27+00:00"}}You may add additionalOrders onto a successCharge if it has existing prepaidOrders by cloning an existingOrder.
Date in future when this order will be sent.
OK: The request was successful, created a new resource, and resource created is in the body.
curl'https://api.rechargeapps.com/orders/70071255/clone' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"scheduled_at": "2022-11-16"}'{"order":{"id":210987092,"address_id":42171447,"billing_address":{"address1":"601 SW Washing St.","address2":"","city":"Portland","company":"Fake Company Billing","country_code":"US","first_name":"Fake Billing First","last_name":"Fake Billing Last","phone":"888-888-8888","province":"Oregon","zip":"97205"},"charge":{"id":272382456,"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"}},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2020-12-17T18:50:25+00:00","currency":"usd","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"382028302"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"external_cart_token":"aeic8101918fs0f8810","external_order_id":{"ecommerce":"27117383938"},"external_order_number":{"ecommerce":"1938"},"is_prepaid":false,"line_items":[{"purchase_item_id":63898947,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_lines":[{"price":"0.993","rate":"0.0725","title":"CA State Tax","unit_price":"0.331"},{"price":"0.308","rate":"0.0225","title":"LA County Tax","unit_price":"0.102"}],"taxable":true,"taxable_amount":"10.00","tax_due":"1.30","title":"Shirt bundle","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":"next order in sequence 3","order_attributes":[{"name":"subscription_cycle_count_min","value":"3"}],"processed_at":"2020-12-17T18:50:27+00:00","scheduled_at":"2020-12-17T18:50:27+00:00","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","taxable":true,"tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.00","total_duties":"0.0","total_line_items_price":"10.00","total_price":"14.90","total_refunds":"0.00","total_tax":"10.00","total_weight_grams":454,"type":"recurring","updated_at":"2020-12-17T18:50:27+00:00"}}Delay a prepaidOrder by one interval
Theid must be for the next queuedOrder for a prepaidSubscription. TheOrder will be delayed by one interval, and all subsequentOrders andCharges will be shifted by the same amount.
successful response
curl -XPOST'https://api.rechargeapps.com/orders/70071255/delay' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"order":{"id":70071255,"address_id":4029306,"created_at":"2022-02-04T23:19:52+00:00","currency":"usd","discounts":[],"error":null,"external_cart_token":null,"is_prepaid":true,"line_items":[{"purchase_item_id":63898947,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_lines":[{"price":"0.993","rate":"0.0725","title":"CA State Tax","unit_price":"0.331"},{"price":"0.308","rate":"0.0225","title":"LA County Tax","unit_price":"0.102"}],"taxable":true,"taxable_amount":"10.00","tax_due":"1.30","title":"Shirt bundle","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":null,"order_attributes":[],"processed_at":null,"scheduled_at":"2023-02-07T05:00:00+00:00","shipping_lines":[{"code":"Standard","price":"4.90","taxable":true,"tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"queued","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"0.00","total_duties":"0.0","total_line_items_price":"10.00","total_price":"14.90","total_refunds":"0.00","total_tax":"10.00","total_weight_grams":454,"type":"recurring","updated_at":"2023-01-05T22:11:46+00:00"}}Updating existingOrder using theorder_id.
Billing address details.
The key values related with customer.
Line item properties can be updated on Prepaid Queued Orders. To change Queued Charges you must change the parent subscription(s) or address.
Important: When updatingline_items, you must provide the entire json block that was inline_items before, as the data provided overrides the entire block and only new parameters will remain.
An object containing external order ids.
The date when the order will be shipped.
Shipping address details.
Possible values: success, error, queued, cancelled
The status of the order
successful response
curl -XPUT'https://api.rechargeapps.com/orders/70071255' \ -H'Content-Type: application/json' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"billing_address": { "city": "Los Angeles", "first_name": "mike", "last_name": "flynn", "zip": "90025" }}'{"order":{"id":210987092,"address_id":42171447,"billing_address":{"address1":"601 SW Washing St.","address2":"","city":"Portland","company":"Fake Company Billing","country_code":"US","first_name":"Fake Billing First","last_name":"Fake Billing Last","phone":"888-888-8888","province":"Oregon","zip":"97205"},"charge":{"id":272382456,"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"}},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2020-12-17T18:50:25+00:00","currency":"usd","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"382028302"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"external_cart_token":"aeic8101918fs0f8810","external_order_id":{"ecommerce":"27117383938"},"external_order_number":{"ecommerce":"1938"},"is_prepaid":false,"line_items":[{"purchase_item_id":63898947,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_lines":[{"price":"0.725","rate":"0.0725","title":"CA State Tax","unit_price":"0.331"},{"price":"0.225","rate":"0.0225","title":"LA County Tax","unit_price":"0.102"}],"taxable":true,"taxable_amount":"10.00","tax_due":"0.95","title":"Shirt bundle","total_price":"10.95","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":"next order in sequence 3","order_attributes":[{"name":"subscription_cycle_count_min","value":"3"}],"processed_at":"2020-12-17T18:50:27+00:00","scheduled_at":"2020-12-17T18:50:27+00:00","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","taxable":true,"tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.00","tags":"Subscription, Subscription Recurring Order","tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"taxable":true,"total_discounts":"10.00","total_line_items_price":"10.00","total_price":"5.37","total_refunds":"0.00","total_tax":"0.47","total_weight_grams":454,"type":"recurring","updated_at":"2020-12-17T18:50:27+00:00"}}You can delete a scheduled order.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/orders/70071255' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Returns a list of orders.
GET /ordersGET /orders?customer_id=123GET /orders?address_id=4587216GET /orders?charge_id=45678542GET /orders?created_at_min=2016-05-18&created_at_max=2016-06-18Filter orders by address.
GET /orders/?address_id=123 will return all orders for the givenaddress_id.
Filter orders by charge.
GET /orders/?charge_id=123 will return all orders for the givencharge_id.
Show orders created before the given date.
Show orders created after the given date.
Filter orders by customer.
GET /orders/?customer_id=123 will return all orders for the givencustomer_id
Filter orders by external_customer_id.
Filter orders by external_order_id.
Filter orders by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Default: 50
Max: 250
The number of results.
Default: 1
The page to show. Default is 1.
Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, usecursor pagination.
Show orders scheduled before the given date.
Show orders scheduled after the given date.
Filter orders with/without external_order_id.
Possible values: success, queued, error, refunded, skipped
Filter orders by status.
Possible values: checkout, recurring
Filter orders by type.
GET /api/orders/?type=recurring will return all orders for the given type.
Filter orders by subscription or onetime.
Show orders updated before the given date.
Show orders updated after the given date.
successful response
curl'https://api.rechargeapps.com/orders' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'limit=3' -G{"next":"next_cursor","previous":"previous_cursor","orders":[{"id":210987092,"address_id":42171447,"billing_address":{"address1":"601 SW Washing St.","address2":"","city":"Portland","company":"Fake Company Billing","country_code":"US","first_name":"Fake Billing First","last_name":"Fake Billing Last","phone":"888-888-8888","province":"Oregon","zip":"97205"},"charge":{"id":272382456,"external_transaction_id":{"payment_processor":"ch_1HzWElJ2zqHvZRd1TWKFFqDR"}},"client_details":{"browser_ip":"192.168.0.1","user_agent":"safari webkit"},"created_at":"2020-12-17T18:50:25+00:00","currency":"usd","customer":{"id":37657002,"email":"test@test.com","external_customer_id":{"ecommerce":"382028302"},"hash":"7e706455cbd13e40"},"discounts":[{"id":12345,"code":"TESTCODE10","value":10,"value_type":"fixed_amount"}],"error":null,"external_cart_token":"aeic8101918fs0f8810","external_order_id":{"ecommerce":"27117383938"},"external_order_number":{"ecommerce":"1938"},"is_prepaid":false,"line_items":[{"purchase_item_id":63898947,"external_inventory_policy":"decrement_obeying_policy","external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"999999999999"},"grams":454,"images":{"large":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg","medium":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg","original":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg","small":"https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"},"original_price":"10.00","properties":[{"name":"Color","value":"Blue"}],"purchase_item_type":"subscription","quantity":1,"sku":"TOM0001","tax_lines":[{"price":"0.993","rate":"0.0725","title":"CA State Tax","unit_price":"0.331"},{"price":"0.308","rate":"0.0225","title":"LA County Tax","unit_price":"0.102"}],"taxable":true,"taxable_amount":"10.00","tax_due":"1.30","title":"Shirt bundle","total_price":"11.30","unit_price":"10.00","unit_price_includes_tax":false,"variant_title":"Blue t-shirts"}],"note":"next order in sequence 3","order_attributes":[{"name":"subscription_cycle_count_min","value":"3"}],"processed_at":"2020-12-17T18:50:27+00:00","scheduled_at":"2020-12-17T18:50:27+00:00","shipping_address":{"address1":"1030 Barnum Ave","address2":"Suite 101","city":"Stratford","company":"Fake Company","country_code":"US","first_name":"Fake First","last_name":"Fake Last","phone":"999-999-9999","province":"Connecticut","zip":"06614"},"shipping_lines":[{"code":"Standard","price":"4.90","taxable":true,"tax_lines":[{"price":"0.355","rate":"0.0725","title":"CA State Tax"},{"price":"0.110","rate":"0.0225","title":"Los Angeles County Tax"}],"title":"Standard"}],"status":"success","subtotal_price":"10.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"}],"taxable":true,"total_discounts":"10.00","total_duties":"0.0","total_line_items_price":"10.00","total_price":"14.90","total_refunds":"0.00","total_tax":"10.00","total_weight_grams":454,"type":"recurring","updated_at":"2020-12-17T18:50:27+00:00"}]}ThePayment Method object holds payment and billing information. ACustomer may be associated with manyPayment Methods, and anAddresses record must be associated with at least onePayment_method.
Important - If you see the following error when accessing Payment Methods endpoints: “You do not have sufficient permissions (scopes) for this object”, the token you are using has not been configured with correct access permissions. Update the token to have “Read access” or “Read and Write access” depending on your use case.
The Payment Method object holds payment and billing information. ACustomer may be associated with many payment methods, and anAddresses record must be associated with at least onePayment Method.
The unique payment method id for a customer.
The Rechargecustomer_id.
The date and time when the payment method was created.
If this is the defaultPayment_method for theCustomer.
Customer must have 1 and only 1 default paymentPayment_method.
Details about the specific payment method
Those details will vary based on thepayment_type
Possible values: CREDIT_CARD, PAYPAL, APPLE_PAY, GOOGLE_PAY, SEPA_DEBIT
The type of payment this is.
If passed, must also be accompanied by one ofstripe_customer_token,paypal_customer_token orauthorizedotnet_customer_token inprocessor_payment_method_token.
The customer token at the processor.
Possible values: stripe, braintree, authorize, shopify_payments, mollie
This will impact validation on billing_details.
Currently,shopify_payments is in read-only mode and can only be managed by Shopify.
The payment token at the processor.
Possible values: unvalidated, valid, invalid, empty
State of thePayment Method.
The status reason for the payment method.
Often used wheninvalid to provide background details in invalidity.
Last time thePayment_method was updated.
An object with the customer’s address information.
{"payment_method":{"id":1234567,"customer_id":62459147,"billing_address":{"address1":"123 Washington Street","address2":"Suite 101","city":"Los Angeles","company":"Recharge","country":"United States","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"1234567890","province":"California","zip":"90210"},"created_at":"2018-11-14T09:00:01","default":true,"payment_details":{"brand":"visa","exp_month":12,"exp_year":2021,"last4":1234},"payment_type":"CREDIT_CARD","processor_customer_token":"cus_AB3ebcBaL6pCx9","processor_name":"stripe","processor_payment_method_token":"pm_1LdKdfj2zqHvUId1uGheBEHy","retry_date":null,"status":null,"status_reason":null,"taxable":true,"updated_at":"2018-11-14T09:00:01"}}Create a Payment Method in Recharge.
The Rechargecustomer_id.
If this is the defaultPayment Method for the customer, customer must have 1 and only 1 defaultPayment Method.
Possible values: CREDIT_CARD, PAYPAL, APPLE_PAY, GOOGLE_PAY, SEPA_DEBIT
The type of payment.
The customer token at the processor.
On Stripe this begins withcus_.
Possible values: stripe, braintree, authorize, shopify_payments, mollie
This will impact validation on billing_details.
Currently,shopify_payments is in read-only mode and can only be managed by Shopify.
The payment token at the processor.
An object with the customer’s address information.
Whether charges associated with this payment method should be retried. Iftrue then charges with previous payment-related errors will be set to retry during the next automated processing.
OK: The request was successful, created a new resource, and resource created is in the body.
curl'https://api.rechargeapps.com/payment_methods' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "customer_id": 62824147, "default": true, "payment_type": "CREDIT_CARD", "processor_customer_token": "cus_JGYtLWi2HS8ymD", "processor_name": "stripe", "processor_payment_method_token": "pm_34jdshjs"}'{"payment_method":{"id":1234567,"customer_id":62459147,"billing_address":{"address1":"123 Washington Street","address2":"Suite 101","city":"Los Angeles","company":"Recharge","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"1234567890","province":"California","zip":"90210"},"created_at":"2018-11-14T09:00:01","default":true,"payment_details":{"brand":"visa","exp_month":12,"exp_year":2021,"last4":"1234"},"payment_type":"CREDIT_CARD","processor_customer_token":"cus_AB3457BaL90Cx9","processor_name":"stripe","processor_payment_method_token":"pm_1LdKdfj2zqHvUId1uGheBEHy","status":null,"status_reason":null,"updated_at":"2018-11-14T09:00:01"}}Retrieve an existingPayment Method using the RechargePayment Methodid.
successful response
curl'https://api.rechargeapps.com/payment_methods/1234567' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"payment_method":{"id":1234567,"customer_id":62459147,"billing_address":{"address1":"123 Washington Street","address2":"Suite 101","city":"Los Angeles","company":"Recharge","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"1234567890","province":"California","zip":"90210"},"created_at":"2018-11-14T09:00:01","default":true,"payment_details":{"brand":"visa","exp_month":12,"exp_year":2021,"last4":"1234"},"payment_type":"CREDIT_CARD","processor_customer_token":"cus_AB3457BaL90Cx9","processor_name":"stripe","processor_payment_method_token":"pm_1LdKdfj2zqHvUId1uGheBEHy","status":null,"status_reason":null,"updated_at":"2018-11-14T09:00:01"}}Modify an existingPayment Method.
If this is the defaultPayment Method for theCustomer.
Customer must have 1 and only 1 default paymentPayment_method.
Possible values: stripe, braintree, authorize, shopify_payments, mollie
This will impact validation on billing_details.
Currently,shopify_payments is in read-only mode and can only be managed by Shopify.
An object with the customer’s address information.
successful response
curl -XPUT'https://api.rechargeapps.com/payment_methods/1234567' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"default": true}'{"payment_method":{"id":1234567,"customer_id":62459147,"billing_address":{"address1":"123 Washington Street","address2":"Suite 101","city":"Los Angeles","company":"Recharge","country_code":"US","first_name":"Jane","last_name":"Doe","phone":"1234567890","province":"California","zip":"90210"},"created_at":"2018-11-14T09:00:01","default":true,"payment_details":{"brand":"visa","exp_month":12,"exp_year":2021,"last4":"1234"},"payment_type":"CREDIT_CARD","processor_customer_token":"cus_AB3457BaL90Cx9","processor_name":"stripe","processor_payment_method_token":"pm_1LdKdfj2zqHvUId1uGheBEHy","status":null,"status_reason":null,"updated_at":"2018-11-14T09:00:01"}}Permanently delete aPayment Method.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl --XDELETE'https://api.rechargeapps.com/payment_methods/1234567' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Return a list of payment methods in your store.
GET /payment_methodsGets allPayment methods for this customer.
successful response
curl'https://api.rechargeapps.com/payment_methods' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"payment_methods":[{"id":1234567,"billing_address":{"address1":"123 Washington Street","address2":"Suite 101","city":"Los Angeles","company_name":"Acme Corp","country_code":"US","name":"Jane Doe","phone":"1234567890","province":"California","zip":"90210"},"created_at":"2018-11-14T09:00:01","customer_id":999123999,"default":true,"payment_details":[{"brand":"visa","exp_month":12,"exp_year":2021,"last4":1234}],"payment_type":"CREDIT_CARD","processor_customer_token":"cus_AB3ebcBaL6pCx9","processor_name":"stripe","processor_payment_method_token":"pm_123123","updated_at":"2018-11-14T09:00:01"}]}ThePlans resource is used to create and configure the transactional options for theProduct (subscription, prepaid, and onetime purchase options) in Recharge.
ThePlan object is used to create and configure the transactional options for theProducts in Recharge.
Current transactional options are: subscription, prepaid and onetime.
Important -Updating/modifying plans in 2021-11 will impact /products in 2021-01.These are not cross compatible. Proceed with caution.
Unique numeric identifier for thePlan.
An object containing the availability of the plan through various supported channels.
The time the plan was created.
If deleted, the time the plan was deleted.
The discount amount applied to the productprice when purchased through thisPlan.
AllPlans for a product must have the same discount amount.
Possible values: percentage
Used in combination with discount amount to determine the discount applied on a product price when purchased through thisPlan.
The id of the selling plan group as it appears in external platforms.
The id of the selling plan as it appears in external platforms.
The name of the selling plan as it appears in external platforms.
An object containing the product id as it appears in external platforms.
An array of variant ids as they appear in external platforms.
Default: false
Whether this plan applies to specific variants of the product
The number indicating the order which the plan will be in a list of related plans.
An object containing the various subscription preferences associated with this plan.
The title of the plan.
AllPlans for a product must have the sametitle.
Possible values: subscription, prepaid, onetime
The type of the plan.
Products with aprepaid plan cannot have plans of other types.
The time the plan was last updated.
{"plan":{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","deleted_at":null,"discount_amount":"30.00","discount_type":"percentage","external_plan_group_id":"77695091010","external_plan_id":"690103779650","external_plan_name":"1 week subscription","external_product_id":{"ecommerce":"2103271587891"},"external_variant_ids":[],"has_variant_restrictions":false,"sort_order":1,"subscription_preferences":{"apply_cutoff_date_to_checkout":false,"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":null,"interval_unit":"day","order_day_of_month":1,"order_day_of_week":null,"order_interval_frequency":30},"title":"Jarred Pickles","type":"subscription","updated_at":"2021-07-27T19:07:34+00:00"}}Create aPlan for aProduct in Recharge.
MultiplePlans may exist for anyProduct, see thePlan object for restrictions.
An object containing the availability of the plan through various supported channels.
The discount amount applied to the product price when purchased through this plan. All plans for a product must have the same discount amount.
AllPlans for a product must have the same discount amount.
Possible values: percentage
Used in combination with discount amount to determine the discount applied on a product price when purchased through this plan. (accepts: percentage)
An object containing the product id as it appears in external platforms.
The number indicating the order which the plan will be in a list of related plans.
An object containing the various subscription preferences associated with this plan.
The title of the plan.
AllPlans for a product must have the sametitle.
Possible values: subscription, prepaid, onetime
The type of the plan. Products with a prepaid plan cannot have plans of other types.
successful response
curl'https://api.rechargeapps.com/plans' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "discount_amount": "10", "discount_type": "percentage", "external_product_id": { "ecommerce": "2103271587891" }, "sort_order": 1, "subscription_preferences": { "charge_interval_frequency": 30, "expire_after_specific_number_of_charges": 6, "interval_unit": "day", "order_day_of_month": 1, "order_interval_frequency": 30 } "title": "Concert T-Shirt", "type": "subscription",}'{"plan":{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","deleted_at":null,"discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":1,"subscription_preferences":{"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_day_of_week":null,"order_interval_frequency":30},"title":"Concert TShirt","type":"subscription","updated_at":"2021-07-27T19:07:34+00:00"}}Update an existing Plan.
An object containing the availability of the plan through various supported channels.
The discount amount applied to the product price when purchased through this plan. All plans for a product must have the same discount amount.
AllPlans for a product must have the same discount amount.
Possible values: percentage
Used in combination with discount amount to determine the discount applied on a product price when purchased through this plan.
An object containing the product id as it appears in external platforms.
The number indicating the order which the plan will be in a list of related plans.
An object containing the various subscription preferences associated with this plan.
The title of the plan.
successful response
curl -xPUT'https://api.rechargeapps.com/plans/16909886' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"discount_amount": "12.0","title": "Concert T-Shirt"}'{"plan":{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","deleted_at":null,"discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":1,"subscription_preferences":{"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_day_of_week":null,"order_interval_frequency":30},"title":"Concert TShirt","type":"subscription","updated_at":"2021-07-27T19:07:34+00:00"}}Delete a plan.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/plans/321654' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Returns a list of all plans fromStore.
Default: 50
Max: 250
The number of results.
Default: 1
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, usecursor pagination.
Return thePlans linked to theProduct record in Recharge with the indicatedexternal_product_id
Filter plans by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
Return the plans updated before the given date.
Return the plans updated after the given date.
Possible values: subscription, prepaid, onetime
Return the plans that are of a specific type.
successful response
curl'https://api.rechargeapps.com/plans' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"plans":[{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","deleted_at":null,"discount_amount":null,"discount_type":null,"external_product_id":{"ecommerce":"2103271587891"},"sort_order":1,"subscription_preferences":{"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":null,"interval_unit":"day","order_day_of_month":1,"order_day_of_week":null,"order_interval_frequency":30},"title":"Jarred Pickles","type":"subscription","updated_at":"2021-07-27T19:07:34+00:00"}]}Bulk create new plans.
There is a limit of 20 plans per request.
An array of plans to be created.
successful response
curl'https://api.rechargeapps.com/products/2103271587891/plans-bulk' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "plans": [ { "discount_amount": "10", "discount_type": "percentage", "sort_order": 1, "title": "Concert T-Shirt", "type": "subscription", "subscription_preferences": { "charge_interval_frequency": 30, "expire_after_specific_number_of_charges": 6, "interval_unit": "day", "order_day_of_month": 1, "order_interval_frequency": 30 } }, { "discount_amount": "10", "discount_type": "percentage", "sort_order": 2, "title": "Concert T-Shirt", "type": "subscription", "subscription_preferences": { "charge_interval_frequency": 60, "expire_after_specific_number_of_charges": 6, "interval_unit": "day", "order_day_of_month": 1, "order_interval_frequency": 60 } } ] }'{"plans":[{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":1,"title":"Concert T-Shirt","type":"subscription","subscription_preferences":{"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_interval_frequency":30},"updated_at":"2021-07-27T19:07:34+00:00"},{"id":88238,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":2,"title":"Concert T-Shirt","type":"subscription","subscription_preferences":{"charge_interval_frequency":60,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_interval_frequency":60},"updated_at":"2021-07-27T19:07:34+00:00"}]}Bulk update existing plans.
There is a limit of 20 plans per request.
An array of plans to be updated. Must provide ID for each plan.
successful response
curl -XPUT'https://api.rechargeapps.com/products/2103271587891/plans-bulk' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "plans": [ { "id": 88237, "title": "Updated T-Shirt" }, { "id": 88238, "title": "Updated T-Shirt" } ] }'{"plans":[{"id":88237,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":1,"title":"Concert T-Shirt","type":"subscription","subscription_preferences":{"charge_interval_frequency":30,"cutoff_day_of_month":null,"cutoff_day_of_week":null,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_interval_frequency":30},"updated_at":"2021-07-27T19:07:34+00:00"},{"id":88238,"channel_settings":{"api":{"display":true},"checkout_page":{"display":true},"customer_portal":{"display":true},"merchant_portal":{"display":true}},"created_at":"2021-07-27T19:07:34+00:00","discount_amount":"10","discount_type":"percentage","external_product_id":{"ecommerce":"2103271587891"},"sort_order":2,"title":"Concert T-Shirt","type":"subscription","subscription_preferences":{"charge_interval_frequency":60,"expire_after_specific_number_of_charges":6,"interval_unit":"day","order_day_of_month":1,"order_interval_frequency":60},"updated_at":"2021-07-27T19:07:34+00:00"}]}Bulk delete existing plans.
There is a limit of 20 plans per request.
An array of plans to be deleted. Must provide ID for each plan.
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -XDELETE'https://api.rechargeapps.com/products/2103271587891/plans-bulk' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "plans": [ { "id": 88237 }, { "id": 88238 } ] }'{}Representation of the Products from your catalog in Recharge.
Unique numeric identifier of the product record in Recharge. The primary id of the record.
The brand name of the product.
The date and time at which the product was created in an external product catalog.
The date and time at which the product was updated in an external product catalog.
An array of urls for various sizes of image files.
An array of options for the product record, such as size, color, etc.
The datetime at which the product became available for purchase. To make the product available, this should be set in the past.
Indicator of shipping requirement.
Dictates the default for the variants. Can be overriden at the variant level.
The title of the product.
An array of variants of the product.
If your PIM does not use variants, create a single variant product.
The vendor of the product.
{"brand":"Recharge","description":"A cotton shirt with the Recharge logo","external_created_at":"2021-01-01T00:00:00+00:00","external_product_id":"5","external_updated_at":"2021-01-01T00:00:00+00:00","images":[{"small":"https:...","medium":"https:...","large":"https:...","original":"https:...","sort_order":2}],"options":[{"name":"Size","position":0,"values":[{"label":"small","position":0},{"label":"medium","position":1},{"label":"large","position":2}]}],"published_at":"2021-01-01:00:00+00:00","requires_shipping":true,"title":"Recharge Logo Shirt","variants":[{"external_variant_id":" 9","dimensions":{"weight":1234.5},"image":{"small":"https:....jpeg","medium":"https:....jpeg","large":"https:....jpeg","original":"https:....jpeg"},"option_values":[{"label":"small"}],"requires_shipping":true,"sku":"CLO123","title":"Recharge Logo Shirt - Small","taxable":true,"tax_code":"CLOTHING","prices":{"compare_at_price":"14.22","unit_price":"12.22"}}],"vendor":"Recharge Apparel Store"}Create a new product in your Recharge Product Catalog. After adding the record, subscription preferences may be added using the Products page of Recharge Admin Portal or you can use thePlans resource currently inAlpha.
Unique numeric identifier of the product record in Recharge. The primary id of the record.
The brand name of the product.
The date and time at which the product was created in an external product catalog.
The date and time at which the product was updated in an external product catalog.
An array of urls for various sizes of image files.
small is the default picture shown on the checkout. Ifsmall is not present we renderoriginal. Please note for better rendering we advise you populatesmall.
An array of options for the product record, such as size, color, etc.
The date and time at which the product became available for purchase. To make the product available, this should be set in the past.
Indicator of shipping requirement. Iftrue the product associated to the variant needs to be shipped.
This is usually false for digital goods.
The title of the product.
An array of variants of the product.
If your PIM does not use variants, create a single variant product.
The vendor of the product.
successful response
curl'https://api.rechargeapps.com/products' \ -H'X-Recharge-Version: 2021-11' -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "external_product_id": "10", "brand": "Recharge", "description": "A cotton shirt with the Recharge logo", "images": [ { "small": "https:...", "medium": "https:...", "large": "https:...", "original": "https:...", "sort_order": 2 } ], "options": [ { "name": "Size", "position": 0, "values": [ {"label": "small", "position": 0}, {"label": "medium", "position": 1}, {"label": "large", "position": 2} ] } ], "published_at": "2021-01-01:00:00+00:00", "requires_shipping": true, "title": "Recharge Logo Shirt", "variants": [ { "external_variant_id": "9", "dimensions": { "weight": 1234.5 }, "image": { "small": "https:...", "medium": "https:...", "large": "https:...", "original": "https:..." }, "option_values": [ { "label": "small" } ], "sku": "CLO123", "title": "Recharge Logo Shirt - Small", "taxable": true, "tax_code": "CLOTHING", "prices": { "compare_at_price": "14.22", "unit_price": "12.22" } } ], "vendor": "Recharge Apparel Store"}'{"product":{"brand":"Recharge","description":"A cotton shirt with the Recharge logo","external_created_at":"2021-01-01T00:00:00+00:00","external_product_id":"10","external_updated_at":"2021-01-01T00:00:00+00:00","images":[{"large":"https:...","medium":"https:...","original":"https:...","small":"https:...","sort_order":2}],"options":[{"name":"Size","position":0,"values":[{"label":"small","position":0},{"label":"medium","position":1},{"label":"large","position":2}]}],"published_at":"2021-01-01T00:00:00+00:00","requires_shipping":true,"title":"Recharge Logo Shirt","variants":[{"dimensions":{"weight":1234.5,"weight_unit":"lb"},"external_variant_id":"9","image":{"large":"https:...","medium":"https:...","original":"https:...","small":"https:..."},"option_values":[{"label":"small"}],"prices":{"compare_at_price":"14.22","unit_price":"12.22"},"sku":"CLO123","tax_code":"CLOTHING","taxable":true,"title":"Recharge Logo Shirt - Small","requires_shipping":true}],"vendor":"Recharge Apparel Store"}}Retrieves aProduct from store’s product catalog using theexternal_product_id as lookup id.
successful response
curl'https://api.rechargeapps.com/products/10' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"product":{"brand":"Recharge","description":"A cotton shirt with the Recharge logo","external_created_at":"2021-01-01T00:00:00+00:00","external_product_id":"10","external_updated_at":"2021-01-01T00:00:00+00:00","images":[{"large":"https:...","medium":"https:...","original":"https:...","small":"https:...","sort_order":2}],"options":[{"name":"Size","position":0,"values":[{"label":"small","position":0},{"label":"medium","position":1},{"label":"large","position":2}]}],"published_at":"2021-01-01T00:00:00+00:00","requires_shipping":true,"title":"Recharge Logo Shirt","variants":[{"dimensions":{"weight":1234.5,"weight_unit":"lb"},"external_variant_id":"9","image":{"large":"https:...","medium":"https:...","original":"https:...","small":"https:..."},"option_values":[{"label":"small"}],"prices":{"compare_at_price":"14.22","unit_price":"12.22"},"sku":"CLO123","tax_code":"CLOTHING","taxable":true,"title":"Recharge Logo Shirt - Small","requires_shipping":true}],"vendor":"Recharge Apparel Store"}}Update an existing product.
The brand name of the product.
The date and time at which the product was created in an external product catalog.
The date and time at which the product was updated in an external product catalog.
An array of urls for various sizes of image files.
An array of options for the product record, such as size, color, etc.
The datetime at which the product became available for purchase. To make the product available, this should be set in the past.
Indicator of shipping requirement. Iftrue the product associated to the variant needs to be shipped.
This is usuallyfalse for digital goods.
The title of the product.
An array of variants of the product.
If your PIM does not use variants, create a single variant product.
The vendor of the product.
successful response
curl -XPUT'https://api.rechargeapps.com/products/1327844' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "brand": "Recharge", "variants": [ { "external_variant_id": "101", "dimensions": { "weight": 1234.5 }, "image": { "small": "https:...", "medium": "https:...", "large": "https:...", "original": "https:..." }, "option_values": [{ "label": "small" }], "sku": "CLO123", "title": "Small Recharge Logo Shirt", "taxable": true, "tax_code": "CLOTHING", "prices": { "compare_at_price": "14.22", "unit_price": "12.22" } }, { "external_variant_id": "102", "dimensions": { "weight": 1234.5 }, "image": { "small": "https:...", "medium": "https:...", "large": "https:...", "original": "https:..." }, "option_values": [{ "label": "medium" }], "sku": "CLO124", "title": "Medium Recharge Logo Shirt", "taxable": true, "tax_code": "CLOTHING", "prices": { "compare_at_price": "14.22", "unit_price": "12.22" } } ]}'{"product":{"brand":"Recharge","description":"A cotton shirt with the Recharge logo","external_created_at":"2021-01-01T00:00:00+00:00","external_product_id":"10","external_updated_at":"2021-01-01T00:00:00+00:00","images":[{"large":"https:...","medium":"https:...","original":"https:...","small":"https:...","sort_order":2}],"options":[{"name":"Size","position":0,"values":[{"label":"small","position":0},{"label":"medium","position":1},{"label":"large","position":2}]}],"published_at":"2021-01-01T00:00:00+00:00","requires_shipping":true,"title":"Recharge Logo Shirt","variants":[{"dimensions":{"weight":1234.5,"weight_unit":"lb"},"external_variant_id":"9","image":{"large":"https:...","medium":"https:...","original":"https:...","small":"https:..."},"option_values":[{"label":"small"}],"prices":{"compare_at_price":"14.22","unit_price":"12.22"},"sku":"CLO123","tax_code":"CLOTHING","taxable":true,"title":"Recharge Logo Shirt - Small","requires_shipping":true}],"vendor":"Recharge Apparel Store"}}Delete product fromStore.
successful response
curl -XDELETE'https://api.rechargeapps.com/products/509780' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}List products from store’s product catalog.
Filter products by external product ids.
GET /products/?external_product_ids=123,223 will return all products with the associatedexternal_product_ids.
successful response
curl'https://api.rechargeapps.com/products' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"next_cursor":null,"previous_cursor":null,"products":[{"brand":"Recharge","description":"A cotton shirt with the Recharge logo","external_created_at":null,"external_product_id":"10","external_updated_at":"2021-07-21T17:25:46+00:00","images":[{"large":"https:...","medium":"https:...","original":"https:...","small":"https:...","sort_order":2}],"options":[{"name":"Size","position":0,"values":[{"label":"small","position":0},{"label":"medium","position":1},{"label":"large","position":2}]}],"published_at":"2021-01-01T00:00:00+00:00","requires_shipping":true,"title":"Recharge Logo Shirt","variants":[{"dimensions":{"weight":1234.5,"weight_unit":"lb"},"external_variant_id":"101","image":{"large":"https:...","medium":"https:...","original":"https:...","small":"https:..."},"option_values":[{"label":"small"}],"prices":{"compare_at_price":"14.22","unit_price":"12.22"},"sku":"CLO123","tax_code":"CLOTHING","taxable":true,"title":"Small Recharge Logo Shirt","requires_shipping":true},{"dimensions":{"weight":1234.5,"weight_unit":"lb"},"external_variant_id":"102","image":{"large":"https:...","medium":"https:...","original":"https:...","small":"https:..."},"option_values":[{"label":"medium"}],"prices":{"compare_at_price":"14.22","unit_price":"12.22"},"sku":"CLO124","tax_code":"CLOTHING","taxable":true,"title":"Medium Recharge Logo Shirt","requires_shipping":true}],"vendor":"Recharge Apparel Store"}]}The store endpoint includes ReCharge settings and other store specific information.
The store endpoint includes Recharge settings and other store specific information.
Unique number identifier of the store.
Checkout logo url.
Checkout platform.
Date and time when the store is created.
Currency of the store.
Related guides:Supported currencies
Customer Portal Base URL.
Default API version.
E-mail address of the store owner.
Enabled currencies the store sells in.
Currency symbol used for enabled currencies the store sells in.
A ledger of currencies that the store no longer sells in. If a currency is present in both the enabled_presentment_currencies and disabled_currencies_historical ledger it is because it was disabled at one point in time but is now enabled.
External platform connected to Recharge.
Will be one ofshopify,big_commerce,headless, ormagento
Unique identifier of the store on the external platform.
Merchant portal base URL.
Name of the store.
Phone number of the store owner.
Timezone of the store.
The date and time when the address was last updated.
Weight unit for the store.
{"store":{"id":89559201,"checkout_logo_url":null,"checkout_platform":"recharge","created_at":"2020-07-15T00:00:00+00:00","currency":"USD","customer_portal_base_url":null,"default_api_version":"2021-01","email":"email@email.com","external_platform":"shopify","identifier":"store-id","merchant_portal_base_url":null,"name":"store-name","phone":"5555555555","enabled_presentment_currencies":["USD"],"enabled_presentment_currencies_symbols":[{"currency":"USD","location":"before","suffix":"","symbol":"$"}],"disabled_currencies_historical":[],"timezone":{"iana_name":"America/New_York","name":"(GMT-05:00) Eastern Time (US & Canada)"},"updated_at":"2020-07-15T00:00:00+00:00","weight_unit":"g"}}Retrieve store details.
successful response
curl'https://api.rechargeapps.com/store' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"store":{"id":4797,"checkout_logo_url":null,"checkout_platform":"recharge","created_at":"2020-04-22T00:20:52+00:00","currency":"USD","customer_portal_base_url":null,"default_api_version":"2021-01","email":"email@email.com","enabled_presentment_currencies":["USD"],"enabled_presentment_currencies_symbols":[{"currency":"USD","location":"before","suffix":"","symbol":"$"}],"disabled_currencies_historical":[],"external_platform":"custom","identifier":"store-id","merchant_portal_base_url":null,"name":"store-name","province":"Connecticut","phone":"5555555555","timezone":{"iana_name":"America/New_York","name":"(GMT-05:00) Eastern Time (US & Canada)"},"updated_at":"2020-04-25T00:20:52+00:00","weight_unit":"g"}}Subscriptions are individual items a customer receives on a recurring basis.
ASubscription is aProduct added to anAddress.
Subscriptions are individual items a customer benefit from on a recurring basis.
These fields are deprecated, however they will not be removed from this API version.product_title is deprecated. Usetitle instead.shipping_date is deprecated. Usescheduled_at instead.shopify_id is deprecated. Useshopify_order_id instead.address_is_active is deprecated. Please ignore, not an applicable field.
Unique numeric identifier for the subscription.
Unique numeric identifier for the address the subscription is associated with.
Unique numeric identifier for the customer the subscription is tied to.
An object used to contain analytics data such as utm parameters.
Reason provided for cancellation.
Additional comment for cancellation. Maximum length is 1024 characters.
The time the subscription was cancelled.
Max: 1000
The number of units (specified inorder_interval_unit) between eachCharge. For example,order_interval_unit=month andcharge_interval_frequency=3, indicate charge every 3 months.
Charges must use the same unit types as orders.
The time the subscription was created.
Set the number of charges until subscription expires.
An object containing the product id as it appears in external platforms.
An object containing the variant id as it appears in external platforms.
Retrievestrue if there is queued charge. Otherwise, retrievesfalse.
Value is set totrue if it is a prepaid item.
Value is set totrue if it is not a prepaid item
Value is set totrue if it is not a prepaid item and if in Customer portal settings swap is allowed for customers.
Retrievestrue if charge has an error max retries reached. Otherwise, retrievesfalse.
Date of the next charge for the subscription.
The set day of the month order is created. Default is that there isn’t a strict day of the month when the order is created.
This is only applicable to subscriptions withorder_interval_unit:“month”.
The set day of the week order is created. Default is that there isn’t a strict day of the week order is created.
This is only applicable to subscriptions withorder_interval_unit = “week”.
Value of 0 equals to Monday, 1 to Tuesday etc.
Max: 1000
The number of units (specified inorder_interval_unit) between each order. For example, order_interval_unit=month and order_interval_frequency=3, indicate order every 3 months. Max value: 1000
Possible values: day, week, month
The frequency unit used to determine when a subscription’s order is created.
The presentment currency of the subscription.
The price of the item before discounts, taxes, or shipping have been applied.
The name of the product in a store’s catalog.
A list of line item objects, each one containing information about the subscription. Custom key-value pairs can be installed here, they will appear on the connected queued charge and after it is processed on the order itself.
The number of items in the subscription.
A unique identifier of the item in the fulfillment. In cases where SKU is blank, it will be dynamically pulled whenever it is used.
Flag that is automatically updated totrue when SKU is passed on create or update. Whensku_override istrue, the SKU on the subscription will be used to generate charges and orders. Whensku_override isfalse, Recharge will dynamically fetch the SKU from the corresponding external platform variant.
Possible values: active, cancelled, expired
The status of the subscription.
EXPIRED - This status occurs when the maximum number of charges for a product has been reached.
The date time at which the purchase_item record was last updated.
The name of the variant in a shop’s catalog.
{"subscription":{"id":89559201,"address_id":48563471,"customer_id":43845860,"analytics_data":{"utm_params":[]},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":"30","created_at":"2021-02-25T21:27:19+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"2103271587891"},"external_variant_id":{"ecommerce":"18261278883891"},"has_queued_charges":true,"is_prepaid":true,"is_skippable":false,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2020-07-15","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":15,"order_interval_unit":"day","presentment_currency":"USD","price":5,"product_title":"Powder Milk 50.00% Off Auto renew","properties":[{"name":"Colour","value":"White"},{"name":"Package Material","value":"Paper"}],"quantity":3,"sku":null,"sku_override":false,"status":"active","updated_at":"2020-07-10T10:30:51+00:00","variant_title":"1 / Powder"}}When creating a subscription via API,order_interval_frequency andcharge_interval_frequency values do not necessarily need to match the values set in the respectivePlans. The product, however, does need to have at least onePlan in order to be added to a subscription.
Unique numeric identifier of the customer’s address.
The number of units, specified inorder_interval_unit, between each charge.
The number of charges until the subscription expires.
This will set the first charge date of a new subscription.
This is populated when order_interval_unit has value “month”. Default value is 0.
This is populated when order_interval_unit has value “week”.
The number of units, specified in order_interval_unit, between each order.
Possible values: day, week, month
The frequency unit used to determine when a subscription order is created.
A Recharge Plan id that provides interval information. Automatically fills the following properties from the plan if they were not provided directly: charge_interval_frequency, expire_after_specific_number_of_charges, order_day_of_month, order_day_of_week, order_interval_frequency, order_interval_unit.
The price of the product.
The name of the product.
A list of key/value pairs representing properties of the subscription.
The quantity of the product.
Unique numeric identifier of the product id.
Unique numeric identifier of the product variant id.
Possible values: active, cancelled, expired
Default is set toactive.
successful response
curl'https://api.rechargeapps.com/subscriptions' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "address_id": 48563471, "charge_interval_frequency": "30", "next_charge_scheduled_at": "2021-12-17", "order_interval_frequency": "30", "order_interval_unit": "day", "properties": [ { "name": "Colour", "value": "Yellow" }, { "name": "Bottle Material", "value": "Glass" } ], "external_variant_id": { "ecommerce": "32165284380775" }, "quantity": 3}'{"subscription":{"id":63898947,"address_id":48563471,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":30,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32165284380775"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-12-17","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":30,"order_interval_unit":"day","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}Retrieve a subscription using the Rechargesubscription_id.
successful response
curl'https://api.rechargeapps.com/subscriptions/27363808' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"subscription":{"id":63898947,"address_id":48563471,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":30,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32165284380775"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-12-17","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":30,"order_interval_unit":"day","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}Update an existing subscription.
Updating parameters likefrequency,charge_interval_frequency,order_interval_frequency,order_interval_unit will cause our algorithm to automatically recalculate the next charge date (next_charge_scheduled_at). If you want to change the next charge date (next_charge_scheduled_at) we recommend you to update these parameters first.
When updating subscriptionstatus attribute fromcancelled toactive, following attributes will be set to null:cancelled_at,cancellation_reason andcancellation_reason_comments
When updatingorder_interval_unit ORorder_interval_frequency ORcharge_interval_frequency all three parameters are required.
Controls whether theQUEUED charges linked to the subscription should be regenerated upon subscription update. By default the flag is set tofalse which will delay charge regeneration 5 seconds. This enables running multiple calls to perform changes and receive responses much faster since the API won’t wait for a charge regeneration to complete. Setting this parameter totrue will cause charge regeneration to complete before returning a response.
If set toTrue, updates will also be applied toCANCELLED subscriptions. Ifnull orFalse, onlyACTIVE subscriptions will be updated.
Max: 1000
The number of units (specified in order_interval_unit) between each charge. Required when updating order_interval_unit.
WARNING: This update will remove skipped and manually changed charges.
The number of charges until subscription expires.
Unique number identifier of the product variant in your external platform.
The day of the month the order is created on.
WARNING: this update will remove skips and manually changed charges.
The day of the week the order is created on.
WARNING: this update will remove skips and manually changed charges.
The number of units (specified in order_interval_unit) between each order. Required when updating order_interval_unit.
WARNING: This update will remove skipped and manually changed charges.
Possible values: day, week, month
The frequency unit used to determine when a subscription order is created.
WARNING: This update will remove skipped and manually changed charges.
A Recharge Plan id that provides interval information. Automatically fills the following properties from the plan if they were not provided directly: charge_interval_frequency, expire_after_specific_number_of_charges, order_day_of_month, order_day_of_week, order_interval_frequency, order_interval_unit.
The price of the item before discounts, taxes, or shipping has been applied.
The name of the product.
A list of key/value pairs representing properties of the subscription.
The number of items in the subscription.
A unique identifier of the item in the fulfillment.
Flag is automatically updated totrue when SKU is passed on create or update. Whensku_override istrue, the SKU on the subscription will be used to generate charges and orders.
Whensku_override isfalse, Recharge will dynamically fetch the sku from the corresponding external platform variant.
Flag instructing to pull theprice from the product variant passed.
You need to pass the variant_id underexternal_variant_id.ecommerce and set this attribute totrue in the request for the flag to work.
The name of the product variant.
successful response
curl -XPUT'https://api.rechargeapps.com/subscriptions/27363808' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{ "quantity": 4}'{"subscription":{"id":63898947,"address_id":48563471,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":30,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32165284380775"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-12-17","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":30,"order_interval_unit":"day","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}We now have a feature for deleting a subscription.
When your store setting indicates that cancellation emails should be sent, this value determines if the email should be sent for the specified subscription cancellation.
If set totrue, cancellation emails will be sent for the specified subscription cancellations. If set tofalse, cancellation emails will not be sent.
successful response
curl -XDELETE'https://api.rechargeapps.com/subscriptions/27363808' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{}Returns a list of all your subscriptions.
GET /subscriptionsGET /subscriptions?created_at_min=2018-10-10&created_at_max=2019-10-16GET /subscriptions?customer_id=<customer_id>Return the subscriptions linked to the givenaddress_id.
Not compatible withaddress_ids.
Return the subscriptions linked to the givenaddress_ids.
Accepts a comma separated list of address_ids as value.
Not compatible withaddress_id
Return the subscriptions created before the given date.
Return the subscriptions created after the given date.
Return either the next or previous page of subscriptions usingnext_cursor orprevious_cursor attributes in the response.
Return the subscriptions linked to the given Recharge customer id.
Return the subscriptions linked to the given external_variant_id
Comma-separated list ofsubscription_ids to filter
Default: 50
Max: 250
The number of results.
Default: 1
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, usecursor pagination.
Possible values: active, cancelled, expired
Return the subscriptions with specified status.
Return the subscriptions updated before the given date.
Return the subscriptions updated after the given date.
successful response
curl'https://api.rechargeapps.com/subscriptions' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"next_cursor":"next_cursor","previous_cursor":"previous_cursor","subscriptions":[{"id":63898947,"address_id":42171447,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":1,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":5,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32165284380775"},"has_queued_charges":false,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-12-17","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":1,"order_interval_unit":"month","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}]}Update an existing subscription’s next charge date.
If there are two active subscriptions with the sameaddress_id, and you update theirnext_charge_date parameters to match, their charges will get merged into a new charge with a newid
The next charge date desired.
successful response
curl'https://api.rechargeapps.com/subscriptions/27363808/set_next_charge_date' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"date": "2021-08-05"}'{"subscription":{"id":27363808,"address_id":42171447,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":1,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32309455192167"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-08-05","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":1,"order_interval_unit":"month","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}New
Update an existing subscription’s address.
Unique id of the address that need to be associated with subscription.
The next charge date desired.
successful response
curl'https://api.rechargeapps.com/subscriptions/27363808/change_address' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -d'{"address_id": 23397943}'{"subscription":{"id":27363808,"address_id":42171447,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":1,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32309455192167"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-08-05","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":1,"order_interval_unit":"month","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}Cancel an active subscription.
An involuntary subscription cancelled due to max retries reached will trigger the charge/max_retries_reached webhook.
Reason for subscription cancellation.
Cancellation reason comment. Maximum length is 1024 characters.
If set tofalse, subscription cancelled email will not be sent to customer and store owner. Note: even if set to True, there are some conditions where an email will not be sent. They are: inactive subscription_cancellation email template, customer or subscription was created on the same day, subscription is for a membership, email already sent for this subscription in the last 24 hours, customer has other active subscriptions or onetimes
successful response
curl'https://api.rechargeapps.com/subscriptions/27363808/cancel' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"cancellation_reason": "other reason"}'{"subscription":{"id":27363808,"address_id":42171447,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":1,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32309455192167"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-08-05","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":1,"order_interval_unit":"month","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}Activate a cancelled subscription.
When activating subscription, following attributes will be set to null:cancelled_at,cancellation_reason andcancellation_reason_comments.
successful response
curl'https://api.rechargeapps.com/subscriptions/27363808/activate' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{}'{"subscription":{"id":27363808,"address_id":42171447,"customer_id":37657002,"analytics_data":{"utm_params":{"utm_source":"facebook","utm_medium":"cpc"}},"cancellation_reason":null,"cancellation_reason_comments":null,"cancelled_at":null,"charge_interval_frequency":1,"created_at":"2020-02-19T17:40:09+00:00","expire_after_specific_number_of_charges":null,"external_product_id":{"ecommerce":"4381728735283"},"external_variant_id":{"ecommerce":"32309455192167"},"has_queued_charges":true,"is_prepaid":false,"is_skippable":true,"is_swappable":false,"max_retries_reached":false,"next_charge_scheduled_at":"2021-08-05","order_day_of_month":null,"order_day_of_week":null,"order_interval_frequency":1,"order_interval_unit":"month","presentment_currency":"USD","price":"10.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"},{"name":"Size","value":"Large"}],"quantity":1,"sku":"TOM0001","sku_override":false,"status":"active","updated_at":"2020-02-19T17:40:10+00:00","variant_title":"Blue star"}}Gift a skippedSubscription to a recipient.
A list containing theSubscription IDs to be skipped.
An object that contains information associated with the giftee’s Address
successful response
invalid data passed to the endpoint
curl'https://api.rechargeapps.com/subscriptions/skip_gift' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{"recipient_address": { "address1": "1776 Washington Street", "address2": "", "city": "Los Angeles", "company": "Recharge", "country_code": "US", "first_name": "John", "last_name": "Doe", "phone": "5551234567", "province": "California", "zip": "90404", "email": "fake@example.com" },"purchase_item_ids": [27363808, 27363809]}'{"onetimes":[{"id":16909886,"address_id":45154492,"created_at":"2021-05-24T19:14:25+00:00","customer_id":40565990,"external_product_id":{"ecommerce":"4950280863846"},"external_variant_id":{"ecommerce":"32139793137766"},"is_cancelled":false,"next_charge_scheduled_at":"2021-12-17T05:00:00+00:00","price":"6.00","product_title":"ABC Shirt","properties":[{"name":"Color","value":"Blue"}],"quantity":1,"sku":"TOM0001","sku_override":false,"updated_at":"2021-05-24T19:30:14+00:00","variant_title":"Blue star"}]}Webhooks are a mechanism for reacting to specific events that are triggered in the Recharge system.
For example, a checkout completion, a customer activation or subscription cancellation. Webhooks will deliver you the data of the specific event in real-time. This data can be used to custom code logic behind automated subscription management, dashboards creation, discounts applying…
When a webhook is triggered, the payload will be identical to the payload you would receive from another API endpoint.
For example, a webhook on subscription/created will be identical to the payload for retrieving a subscription by ID from the Recharge API.
There are a lot of things that can be done via Webhooks: It can be used to collect all kinds of data from our API and then create a custom Dashboard to show how much and when your customers are buying in real time, or use all this data to do Analytics of some kind in order to create a better customer experience. Webhooks can be used as a “Trigger” on your backend to update subscription products.
If you have some kind of a Subscription where you want to change the Product that the customer gets every month, you can do it by waiting for an order/created webhook on your backend, and when it fires you can make an API call to change the Product of that subscription or the next shipping date, etc.
200 OK response. Any response outside of the200 range will let Recharge know that you didn’t receive your webhook. Recharge has implemented a 5 second time-out period. We wait 5 seconds, if our system doesn’t get a response in that period we consider that request as failed. Our system will try 20 times to send the same webhook over the next 2 days, if the request fails every time our system will delete this webhook. At this moment our system is logging those deleted webhooks.Please note that the store domain header has changed to X-Recharge-External-Platform-Domain
Related guides: Extending webhook responses
These topics are deprecated, however they will not be removed from this API version:checkout/completed.
Unique numeric identifier for the webhook.
The URI where the webhook should send thePOST request when the event occurs.
Possible values: addresses, collections, customer, metafields
List of objects set to enrich the webhook payload. cf.extending responses
The event that will trigger the webhook.
The version of the API used to populate the body of the webhook. If not set, this will default to the store’s default API version.
{"webhook":{"id":19451,"address":"https://request.in/foo","included_objects":[],"topic":"subscription/created","version":"2021-11"}}The list of all available webhooks.
Related guides:Webhook payload examples
| Object | Topics | Scope Required |
|---|---|---|
Address | address/createdaddress/updated | read_customers |
Async_batch | async_batch/processed | read_batches |
BundleSelection | bundle_selection/createdbundle_selection/updatedbundle_selection/deleted | read_subscriptions |
Customer | customer/activatedcustomer/createdcustomer/deactivatedcustomer/payment_method_updatedcustomer/updatedcustomer/deleted | read_customers |
Charge | charge/createdcharge/failedcharge/max_retries_reachedcharge/paidcharge/refundedcharge/uncapturedcharge/upcomingcharge/updatedcharge/deleted | read_orders |
Checkout | checkout/createdcheckout/completedcheckout/processedcheckout/updatedNote: Deprecated and not available for the Shopify integration with Shopify hosted Checkout (aka SCI) | read_orders |
Gift Purchase | gift_purchase/createdgift_purchase/redeemed | read_gift_purchases |
Onetime | onetime/createdonetime/deletedonetime/updated | read_subscriptions |
Order | order/cancelledorder/createdorder/deletedorder/processedorder/payment_capturedorder/upcomingorder/updatedorder/success | read_orders |
Plan | plan/createdplan/deletedplan/updated | read_plans |
Subscription | subscription/activatedsubscription/cancelledsubscription/createdsubscription/deletedsubscription/skippedsubscription/removed_from_skipped_chargesubscription/updatedsubscription/unskippedsubscription/swappedsubscription/paused | read_subscriptions |
Store | store/updated | read_store |
Recharge | recharge/uninstalled | store_info |
Create a webhook. Currently, only the API can be used to create a webhook.
To register a webhook endpoint for a specific object, you will need to have read permissions for that object on your Recharge API token. For example, if you want to register a webhook for subscription/created, you will need theread_subscriptions permissions.
Each API token can register a maximum of 10 webhooks of the same topic.
Related guides:Webhook payload examples
Related guides: Extending webhook responses
The URI where the webhook should send thePOST request when the event occurs.
Possible values: addresses, collections, customer, metafields
List of objects set to enrich the webhook payload. cf.extending responses
The event that will trigger the webhook.
The version of the API used to populate the body of the webhook. If not set, this will default to the store’s default API version.
successful response
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ -XPOST'https://api.rechargeapps.com/webhooks' \ --data'{"address": "https://request.in/foo", "topic": "subscription/created", "version": "2021-11"}'{"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}Retrieve a webhook using the Recharge webhook id.
successful response
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ -XGEThttps://api.rechargeapps.com/webhooks/19451{"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}Modifies an existingWebhook to match the specified parameters.
Related guides: Extending webhook responses
The URI where the webhook should send the POST request when the event occurs.
Possible values: addresses, collections, customer, metafields
List of objects set to enrich the webhook payload. cf.extending responses
The event that will trigger the webhook.
The version of the API used to populate the body of the webhook.
successful response
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ -XPUT'https://api.rechargeapps.com/webhooks/958' \ --data'{"address": "https://request.in/foo"}'{"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}Delete aWebhook
Content Deleted: The server has successfully fulfilled the request and deleted the desired object and there is no content to send in the response body.
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ -XDELETE'https://api.rechargeapps.com/webhooks/958'{}Returns all the webhooks of the given store that are owned by the current requesting client (note that a a private token shows all of the store’s webhooks, an integration token only shows that integration’s webhooks).
successful response
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ -XGET'https://api.rechargeapps.com/webhooks'{"webhooks":[{"id":19451,"address":"https://request.in/foo","included_objects":[],"topic":"subscription/created","version":"2021-11"},{"id":19453,"address":"https://request.in/foo","included_objects":[],"topic":"subscription/cancelled","version":"2021-11"}]}In order to test webhook connectivity, you can trigger the dispatch of a test webhook with our webhook test endpoint. Sending a POST request to the webhook endpoint containing a webhook id will dispatch an empty webhook body to the specified webhook’s destination url.
successful response
curl -i -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -H'Content-Type: application/json' \ -H'Accept: application/json' \ --data'{}' -XPOSThttps://api.rechargeapps.com/webhooks/<webhook_id>/test{}Here you will find what specific action triggers a given webhook.
To use these webhooks your API Token must have read permissions forCustomers enabled (read_customer ).
| Topic | Explanation |
|---|---|
address/created | This will trigger when you create an address via API, or when you go through the checkout with a particular address for the first time with the same customer. |
address/updated | This will trigger when you update an address via API, or when you update the address via UI. It will also trigger whenever a subscription has been activated or cancelled. |
To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).
| Topic | Explanation |
|---|---|
bundle_selection/created | This will trigger when a new selection is created for a Bundle subscription. |
bundle_selection/updated | This will trigger when a Bundle Selection is succesfully updated. |
bundle_selection/deleted | This will trigger when a Bundle Selection is deleted. |
To use these webhooks your API Token must have read permissions forOrders enabled (read_orders ).
| Topic | Explanation |
|---|---|
charge/created | This will trigger when a charge is created. |
charge/failed | This will trigger every time we try to process a charge and it fails due to various reasons (insufficient funds, invalid CC info, expired CC, etc.) on both API and UI. |
charge/max_retries_reached | This will trigger after we attempt to process a charge 8 times, and it failed every time due to various CC issues. This can be triggered on both UI (manually retry a charge 8 times and fail) and API. |
charge/paid | This will trigger when a charge is successfully processed, both manually via UI and automatic recurring charge. This will not trigger on the checkout itself. |
charge/refunded | This will trigger when a charge is successfully refunded, either partially or in full. It will fire if a charge has been refunded both manually via UI and through an API request. |
charge/upcoming | This will trigger X days before the upcoming charge is scheduled. The default is 3 days but your store specific setting can be verified on the Notification Settings page in the description of the Upcoming charge customer notification. |
charge/updated | This will trigger when applying a discount, a change to charge that recalculates shipping rates as well as if next_charge_date is updated on charge endpoint charges/<charge_id>/change_next_charge_date. |
charge/deleted | This will trigger when a subscription is cancelled and upcoming charges are deleted. |
To use these webhooks your API Token must have read permissions forOrders enabled (read-orders ).
| Topic | Explanation |
|---|---|
checkout/created | This will trigger when a checkout is successfully created. |
checkout/completed | Will be deprecated. |
checkout/processed | This will trigger when a checkout is successfully processed. |
checkout/updated | This will trigger when a checkout is successfully updated. |
To use these webhooks your API Token must have read permissions forCustomers enabled (read_customers ).
| Topic | Explanation |
|---|---|
customer/activated | This will trigger when you activate* a customer * activating means that you have added a subscription to a customer who didn’t have an active subscription previously. |
customer/created | This will trigger when you create a customer via API or go through the checkout with a particular email address for a first time customer. |
customer/deactivated | This will trigger when the last subscription a customer had expires, so he no longer has ANY active subscriptions (which means there are no QUEUED charges/orders for this customer). |
customer/payment_method_updated | This will trigger only* when you update the payment_token from the UI * We are working on triggering this when you do the update from the API as well. |
customer/updated | This will trigger when you update a customer via both API and UI. |
customer/deleted | This will trigger when you delete a customer via both API and UI. |
To use these webhooks your API Token must have read permissions forGifts enabled (read_gift_purchases ).
| Topic | Explanation |
|---|---|
gift_purchase/created | This will trigger when a gift purchase record is created, typically via a gift item purchased. |
gift_purchase/redeemed | This will trigger when a gift product is redeemed by the gift receiver. |
To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).
| Topic | Explanation |
|---|---|
onetime/created | This will trigger when you create a one time product via API. |
onetime/deleted | This will trigger when you delete a one time product via API. |
onetime/updated | This will trigger when you update a one time product via API. |
To use these webhooks your API Token must have read permissions forOrders enabled (read_orders ).
| Topic | Explanation |
|---|---|
order/created | This will trigger when an order is created (when a charge is successfully processed) * In case of prepaid Orders the order/created webhooks will be fired for each prepaid order that is created. This occurs on the date the order is scheduled at. |
order/deleted | This will trigger when an order is deleted. |
order/processed | This will trigger when the order is processed (when an order goes from statusqueued to statussuccess). This will not trigger on checkout. |
order/upcoming | This will trigger X days before a QUEUED (prepaid) order is scheduled to be processed. The default is 3 days. |
order/updated | This will trigger when an order is updated. |
To use these webhooks your API Token must have read permissions forPlans enabled (read_plans ).
| Topic | Explanation |
|---|---|
plan/created | This will trigger when a plan is created by one of the following methods: via API, via Merchant portal or when using the2021-01Products endpoint. |
plan/deleted | This will trigger when a plan is deleted by one of the following methods: via API, via Merchant portal or when using the2021-01Products endpoint. |
plan/updated | This will trigger when a plan is updated by one of the following methods: via API, via Merchant portal or when using the2021-01Products endpoint… |
To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).
| Topic | Explanation |
|---|---|
subscription/activated | This will trigger when you activate a subscription via API or UI. |
subscription/cancelled | This will trigger when you cancel a subscription via API or UI. An involuntary subscription cancelled due to max retries reached will only trigger the charge/max_retries_reached webhook and not the subscription/cancelled webhook. |
subscription/created | This will trigger when you create a subscription via API or when you go through the checkout on UI. |
subscription/deleted | This will trigger when you delete a subscription via API or UI. |
subscription/paused | This will trigger when a customer pauses a subscription from within the customer portal. |
subscription/removed_from_skipped_charge | This will trigger when the system removes a subscription from a customer’s skipped charge due to a rescheduled queued charge or subscription frequency change. The payload also includes relevant data from the affected charge object. |
subscription/skipped | This will trigger when you skip a subscription within a charge, meaning that you only skip a particular subscription (the subscription_id you send in the body) in that charge if there are multiple subscriptions related to that charge. |
subscription/swapped | This will trigger when you swap a subscription product for a given address to a different product or product variation API or UI. |
subscription/unskipped | This will trigger when you unskip a subscription within a charge, meaning you only unskip a particular subscription (the subscription_id you send in the body) in that charge if there are multiple subscriptions related to that charge. |
subscription/updated | This will trigger when you update a subscription via API (PUT method) or when you update the subscription via UI. This will also trigger when you update next charge date on Customer Portal, or when you change it using subscription endpointsubscriptions/ <subscription_id>set_next_charge_date. |
To use these webhooks your API Token must have read permissions forStore enabled (read_store ).
| Topic | Explanation |
|---|---|
app/uninstalled | This will trigger when you uninstall OAuth app on your store. |
recharge/uninstalled | This will trigger when Recharge is uninstalled. |
store/updated | This will trigger when and update has been made to the store. |
Webhooks created through the API can be verified by calculating a digital signature. Each Webhook request includes an X-Recharge-Hmac-Sha256 header which is generated using the API Client Secret, along with the data sent in the request.
API Client Secret is not the same as your API token and it can be found at:
Recharge Dashboard—>Integrations—>API Tokens—>Click on your token
Edit API Token page will appear and there you will find API Client Secret
The request_body must be in JSON string format. Validation will fail even if one space is lost in process of JSON string generation.
Then use code similar to the example by adapting it to the programming language that you are using for your project.
Related guides:Example code for validating webhooks
The Async batches API can be used for processing large volumes of operations asynchronously, in order to reduce aggregate processing time and network traffic when interacting with many unique objects. For example, a user can leverage async_batches to create 1000 discounts with only 3 API requests.
As shown in the diagram below, the necessary steps to create and process a batch are:
1. Create an async_batch with the desired batch_type
2. Add tasks (individual operations) to your batch. You can add up to 1,000 tasks with each request, up to 10,000 tasks per batch.
3. Submit the batch for processing. Until a batch is submitted for processing, no tasks are attempted.
4. You may retrieve the batch to view progress details while it processes, or register for theasync_batch/processed webhook to receive immediate notification of batch completion.
5. Page through the tasks in the batch to view results of each completed or failed task.
Related guides:Examples of Async batches
Async batch contains all the setups information and status update of a batch of operation to be performed collectively.
Batches will only leverage resources from the same version they are created in. e.g. a batch created with2021-11 will only process tasks from the2021-11 version.
Unique identifier of the batch, used for adding tasks to a batch and to initiate batch processing
Possible values: discount_create, discount_update, discount_delete, bulk_plans_create, bulk_plans_update, bulk_plans_delete, onetime_create, onetime_delete
Indicates the object type and operation required for all tasks in a batch
Indicates the date and time that processing was completed for a batch
Indicates the date and time a batch was created
Indicates the number of failed tasks in a batch, during or after processing
Indicates the status of the batch. Available statuses are not_started, processing, completed, failed
Indicates the date and time that a batch was triggered to process
Indicates the number of successful tasks in a batch, during or after processing.
Indicates the total number of tasks in a batch
Indicates the date and time at which a batch was last updated
Indicates the API version of the batch.
read-only field
{"async_batch":{"id":19,"batch_type":"discount_create","closed_at":null,"created_at":"2022-02-17T08:52:10+00:00","deleted_at":null,"fail_task_count":0,"status":"not_started","submitted_at":null,"success_task_count":0,"total_task_count":0,"updated_at":"2022-02-17T08:52:10+00:00","version":"2021-11"}}In order to create, retrieve, or process batches, the API token requires the write_batches permission. Additional permissions are required, dependent upon the indicated batch_type. For example, for a batch type of discount_create, the API token requires the write_discounts permission.
Create a new batch, and indicate the desired outcome of the batch using batch_type.
CAUTION
Async batches and their tasks will only be retained in Recharge for one month after batch creation.
Available batch types
The async_batches API supports many functions, each identified as a batch_type. Typically, the task body for a batch_type will be representative of a single request to our standard endpoints, however, some variations may be present.
Related guides:Examples of Async Batches
Batches will only leverage resources from the same version they are created in. e.g. a batch created with2021-11 will only process tasks from the2021-11 version.
Possible values: discount_create, discount_update, discount_delete, bulk_plans_create, bulk_plans_update, bulk_plans_delete, onetime_create, onetime_delete
Desired batch type
successful response
curl -i -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -H"Accept: application/json" \ -H"Content-Type: application/json" \ -XPOST'https://api.rechargeapps.com/async_batches' \ --data'{ "batch_type": "desired_batch_type"}'{"async_batch":{"id":19,"batch_type":"discount_create","closed_at":null,"created_at":"2022-10-12T20:16:09+00:00","deleted_at":null,"fail_task_count":0,"status":"not_started","submitted_at":null,"success_task_count":0,"total_task_count":0,"updated_at":"2022-10-12T20:16:09+00:00","version":"2021-11"}}Retrieve a batch using the Recharge batch id. A batch can be retrieved during processing to evaluate batch progress.
## HTTP request examplesGET /async_batches/<batch_id>
successful response
curl -i -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -H"Accept: application/json" \ -H"Content-Type: application/json" \ -XGET'https://api.rechargeapps.com/async_batches/16'{"async_batch":{"id":19,"batch_type":"discount_create","closed_at":null,"created_at":"2022-10-12T20:16:09+00:00","deleted_at":null,"fail_task_count":0,"status":"not_started","submitted_at":null,"success_task_count":0,"total_task_count":0,"updated_at":"2022-10-12T20:16:09+00:00","version":"2021-11"}}Returns a list of all your async_batches.
successful response
curl -i -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -H"Accept: application/json" \ -H"Content-Type: application/json" \ -XGET'https://api.rechargeapps.com/async_batches'{"async_batches":[{"id":20,"batch_type":"discount_delete","closed_at":null,"created_at":"2022-10-12T20:16:09+00:00","deleted_at":null,"fail_task_count":0,"status":"not_started","submitted_at":null,"success_task_count":0,"total_task_count":40,"updated_at":"2022-10-12T20:16:09+00:00","version":"2021-11"},{"id":19,"batch_type":"discount_update","closed_at":null,"created_at":"2022-10-12T20:16:09+00:00","deleted_at":null,"fail_task_count":0,"status":"not_started","submitted_at":null,"success_task_count":0,"total_task_count":0,"updated_at":"2022-10-12T20:16:09+00:00","version":"2021-11"},{"id":16,"batch_type":"discount_create","closed_at":"2022-10-12T20:16:09+00:00","created_at":"2022-10-12T20:16:09+00:00","deleted_at":null,"fail_task_count":0,"status":"completed","submitted_at":"2022-10-12T20:16:09+00:00","success_task_count":2000,"total_task_count":2000,"updated_at":"2022-10-12T20:16:09+00:00","version":"2021-11"}]}Until a batch is submitted for processing, no tasks are attempted. Once you have ensured the tasks in a batch are ready for processing, you can submit for processing using this endpoint and the associated batch id.
Webhooks - Batches process quickly, and may result in Recharge dispatching many webhooks at a high rate. Ensure any systems subscribed to resulting webhooks are capable of handling such load.
successful response
curl -XPOST'https://api.rechargeapps.com/async_batches/21/process' \ -H'X-Recharge-Version: 2021-11' \ -H'Content-Type: application/json' \ -H'X-Recharge-Access-Token: your_api_token' \ -d'{}'{"async_batch":{"id":21,"batch_type":"discount_create","closed_at":null,"created_at":"2022-06-05T10:53:36+00:00","deleted_at":null,"fail_task_count":0,"status":"processing","submitted_at":"2022-06-05T10:54:54+00:00","success_task_count":0,"total_task_count":10,"updated_at":"2022-06-05T10:54:54+00:00","version":"2021-11"}}Most commonly, the response from listing tasks on an async_batch id will be identical to the body of a singular request to standard Recharge API endpoints. However, in some instances there are variations from the standard list task response body. See below for examples corresponding to each batch_type.
Related guides:Examples of async batches
Indicates the batch that the task is contained by
This object contains the body of a standard API request. For example, when creating discounts with a discount_create batch, this parameter contains a standard body for POST /discounts
Indicates the date and time a task was completed
Indicates the date and time that a task was created and added to the batch
Indicates the date and time that a task was deleted from the batch
Unique identifier for the task within a batch
Indicates the date and time a task was queued for processing within batch processing
Contains the individual response body for the task
Indicates the date and time a task was processed
Possible values: pending, processing, failed, success
Indicates the status of the task within a batch.
Indicates the date and time a task was most recently updated
A batch contains operations of similar type (indicated by batch_type), called tasks. A task is typically representative of a single API request, with a body parameter containing the standard request body for the associated batch_type. A single request to add tasks may contain up to 1,000 tasks, and a batch may contain up to 10,000 tasks.
##HTTP examplesPOST /async_batches/<batch_id>/tasks
Batches will only leverage resources from the same version they are created in. e.g. a batch created with2021-11 will only process tasks from the2021-11 version.
Indicates the batch that the task is contained by
This object contains the body of a standard API request. For example, when creating discounts with a discount_create batch, this parameter contains a standard body for POST /discounts
Indicates the date and time a task was completed
Indicates the date and time that a task was created and added to the batch
Indicates the date and time that a task was deleted from the batch
Unique identifier for the task within a batch
Indicates the date and time a task was queued for processing within batch processing
Contains the individual response body for the task
Indicates the date and time a task was processed
Possible values: pending, processing, failed, success
Indicates the status of the task within a batch.
Indicates the date and time a task was most recently updated
successful response
curl -i -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -H"Accept: application/json" \-H"Content-Type: application/json" \-XPOSThttps://api.rechargeapps.com/async_batches/21/tasks \--data'{ "tasks": [ { "body": { "code": "indexing", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "maroon", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "web services", "value": 100, "discount_type": "shipping", "duration": "forever", "status": "enabled" } }, { "body": { "code": "PCI", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "Cheese", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "overriding", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "bandwidth-monitored", "value": 100, "discount_type": "shipping", "duration": "forever", "status": "enabled" } }, { "body": { "code": "Falkland Islands (Malvinas)", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "Computer", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } }, { "body": { "code": "digital", "discount_type": "shipping", "duration": "forever", "status": "enabled", "value": 100 } } ]}'{"count":10}Returns a list of all tasks in the indicated batch, using batch id. For batches with many tasks, pagination is supported when listing tasks. Use this function to evaluate the task-level results of a batch during, or after processing. Task results will be contained in theresults object of each task.
Filter tasks by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
successful response
curl -i -H'X-Recharge-Access-Token: your_api_token' \ -H'X-Recharge-Version: 2021-11' \ -H"Accept: application/json" \-H"Content-Type: application/json" \-XGEThttps://api.rechargeapps.com/async_batches/16/tasks{"next_cursor":null,"previous_cursor":null,"async_batch_tasks":[{"id":1490831511,"batch_id":765278,"body":{"code":"Computer","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831510,"batch_id":765278,"body":{"code":"Falkland Islands (Malvinas)","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831509,"batch_id":765278,"body":{"code":"bandwidth-monitored","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831508,"batch_id":765278,"body":{"code":"overriding","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831507,"batch_id":765278,"body":{"code":"Cheese","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831506,"batch_id":765278,"body":{"code":"PCI","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831505,"batch_id":765278,"body":{"code":"web services","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831504,"batch_id":765278,"body":{"code":"maroon","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"},{"id":1490831503,"batch_id":765278,"body":{"code":"indexing","discount_type":"shipping","duration":"forever","status":"enabled","value":100},"completed_at":null,"created_at":"2022-02-17T06:40:53+00:00","deleted_at":null,"queued_at":null,"result":null,"started_at":null,"status":"pending","updated_at":"2022-02-17T06:40:53+00:00"}]}This resource allows a caller to inspect basic information regarding thetoken in use. It will only return a single object related to the callingtoken ( ie - a call withapi_token.id=1 will only return information regardingapi_token.id=1.
Details of the client which generated the token.
If the API token was generated by an OAuth app, the object will contain associated client information.
If the API token was generated by the merchant, the object will reflect thename prefaced by ‘[Private App]’ andcontact_email of the token.
If the API Token was generated by an Oauth app, an object containing associated client information.
The email associated with the API Token record.
For tokens created via OAuth App the contact can benull
The name of the API Token as created by merchant.
A list of scopes on the API Token.
{"client":{"name":"PARTNER","contact_email":"ed@partner.com"},"contact_email":"jbluhm@example.com","name":"token name","scopes":["read_shop","write_payments"]}Retrieve token details.
successful response
curl'https://api.rechargeapps.com/token_information' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"token_information":{"client":{"name":"PARTNER","contact_email":"ed@partner.com"},"contact_email":"jbluhm@example.com","name":"token name","scopes":["read_store","write_payment_methods"]}}This resource allows a caller to inspect basic information regarding the staff accounts in the store.
AnAccount record represents a staff account details for theStore. OneStore can have many staff’s account.
Unique numeric identifier for theAccount.
The unique numeric identifier of the user associated to theAccount.
There can only be oneAccount per user perStore.
The date and time when theAccount was created.
The date and time the user was last invited to open theirAccount
null for the store creator.
If an invite to open anAccount is re-issued for a user,invited_at will hold the timestamp of the most recent invite sent.
Flags whether this user is the store owner.
AStore can have multiple owners.
{"account":{"id":3315125,"user_id":2057785,"created_at":"2021-07-20T09:10:19+00:00","invited_at":"2021-07-18T09:10:19+00:00","is_owner":false}}Retrieves an account for the store.
successful response
curl'https://api.rechargeapps.com/accounts/331512' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token'{"account":{"id":3315125,"user_id":2057785,"created_at":"2021-07-20T09:10:19+00:00","invited_at":"2021-07-18T09:10:19+00:00","is_owner":false}}Returns all accounts associated to the store.
successful response
curl'https://api.rechargeapps.com/accounts' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"accounts":[{"id":3315125,"user_id":2057785,"created_at":"2021-07-20T09:10:19+00:00","invited_at":"2021-07-18T09:10:19+00:00","is_owner":false},{"id":3316125,"user_id":2056785,"created_at":"2021-05-20T09:10:19+00:00","invited_at":null,"is_owner":true}]}This resource allows a caller to inspect recent events in the store.
Pro plan
AnEvent record represents an action that took place at a point in time.
Unique numeric identifier for theEvent.
The unique numeric identifier of the object associated with theEvent.
The unique numeric identifier of the customer associated with theEvent.
This value can benull for events not directly associated with a customer.
The date and time when theEvent was created.
The resource type of the object associated with theEvent, e.g. ‘customer’ or ‘subscription’
The action describing theEvent, e.g. ‘created’ or ‘updated’
The short description that summarizes theEvent.
A list of objects describing attributes that were changed during theEvent.
An object containing details about the origin of theEvent.
A list of objects passed explicitly to a Recharge API call that created theEvent.
This field will only be populated on events created using the Recharge API.
{"event":{"id":7160141294,"object_id":362310818,"customer_id":36885098,"created_at":"2023-05-31T14:16:07","object_type":"subscription","verb":"updated","description":"Updated subscription #362310818","updated_attributes":[{"attribute":"price","previous_value":"12.00","value":"15.00"},{"attribute":"quantity","previous_value":"3","value":"5"}],"source":{"account_id":null,"api_token_id":987654321,"api_token_name":"Subscription API token","account_email":null,"origin":"api","user_type":null},"custom_attributes":[{"key":"ab_testing_flag","value":"a"}]}}Returns all events associated with the store. The Events API is limited to events that occurred in the last 7 days
Granting theread_events scope to a token will expose some details about other Recharge API resources via the Events API.
Show events that occurred after a certain date
Show events that occurred before a certain date
Filter events by specificobject_type, such asaddress,customer, orsubscription.
For a full list of available object types, refer to the list below.
Show events with a specificobject_id. This filter should be used with theobject_type filter.
Show events with a specificverb or comma-separated list ofverbs
Show events related to a specificcustomer using the customer’s primary identifier
Filter events by specific source origin.
Available origins:api,customer_portal,merchant_portal,recharge_process,external_platform.
successful response
curl'https://api.rechargeapps.com/events' \ -H'X-Recharge-Version: 2021-11' \ -H'X-Recharge-Access-Token: your_api_token' \ -d limit=3 -G{"events":[{"id":7160141294,"object_id":362310818,"customer_id":36885098,"created_at":"2023-05-31T14:16:07","object_type":"subscription","verb":"updated","description":"Updated subscription #362310818","updated_attributes":[{"attribute":"price","previous_value":"12.00","value":"15.00"},{"attribute":"quantity","previous_value":"3","value":"5"}],"source":{"account_id":null,"api_token_id":987654321,"api_token_name":"Subscription API token","account_email":null,"origin":"api","user_type":null},"custom_attributes":[{"key":"ab_testing_flag","value":"a"}]}]}