Movatterモバイル変換


[0]ホーム

URL:


API Reference

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



API and Platforms compatibility

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:


TagCheckout solutionEcommerce platform
BigCommerceRecharge hostedBigCommerce
CustomRecharge hosted or API-firstCustom
RCSRecharge hostedShopify
SCIShopify hostedShopify

You may also come across other tags specifying regional restrictions (e.g. USA Only) or new releases (e.g. Alpha, Beta).



Intro image
Base URL
https://api.rechargeapps.com

Authentication

Recharge 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.


API Token Scopes

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:

WriteRead
read_accounts
write_batchesread_batches
write_customersread_customers
write_discountsread_discounts
read_events
write_notifications
write_ordersread_orders
write_payment_methodsread_payment_methods
write_plansread_plans
write_productsread_products
write_subscriptionsread_subscriptions
read_store
read_credit_accounts
read_credit_adjustments
GET /
curl -i -H'X-Recharge-Access-Token: your_api_token'-X GET

Versioning

All 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 VersionsRelease notes
2021-112021-11release notes
2021-01

Responses

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.

Extending responses

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.

ResourceEndpointsWebhook topicsSupportedinclude valuesSupportedincluded_objects values
AddressesGET /addresses
GET /addresses/{id}
address/created
address/updated
charge_activities
customer
discount
payment_methods
subscriptions
customer
payment_methods
ChargesGET /charges
GET /charges/{id}
charge/created
charge/failed
charge/max_retries_reached
charge/paid
charge/refunded
charge/uncaptured
charge/upcoming
charge/updated
charge/deleted
charge_activities (beta)
customer
metafields
payment_methods
customer
metafields
payment_methods
CustomersGET /customers
GET /customers/{id}
customer/activated
customer/created
customer/deactivated
customer/payment_method_updated
customer/updated
customer/deleted
addresses
metafields
payment_methods
subscriptions
addresses
metafields
payment_methods
OrdersGET /orders
GET /orders/{id}
order/cancelled
order/created
order/deleted
order/processed
order/payment_captured
order/upcoming
order/updated
order/success
customer
metafields
subscriptions
customer
metafields
Payment MethodsGET /payment_methods
GET /payment_methods/{id}
addressesaddresses
SubscriptionsGET /subscriptions
GET /subscriptions/{id}
subscription/activated
subscription/cancelled
subscription/created
subscription/deleted
subscription/skipped
subscription/updated
subscription/unskipped
subscription/paused
address
charge_activities
customer
metafields
bundle_product
bundle_selections
customer
metafields

Cursor Pagination

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>


Retrieving total number of records

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.

Example Request
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"

Sorting

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.


ResourceSupportedsort_by_values
AddressDefault:id-desc
Options:id-ascid-descupdated_at-ascupdated_at-desc
Async BatchDefault:id-desc
Options:id-ascid-desccreated_at-asccreated_at-desc
ChargeDefault:id-asc
Options:id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-descscheduled_at-ascscheduled_at-desc
CustomerDefault:id-desc
Options:id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc
DiscountDefault:id-desc
Options:id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc
MetafieldDefault:id-desc
Options:id-ascid-descupdated_at-ascupdated_at-desc
OnetimeDefault:id-desc
Options:id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc
OrderDefault:id-desc
Options:id-ascid-descupdated_at-ascupdated_at-descprocessed_at-ascprocessed_at-descscheduled_at-ascscheduled_at-desc
PlanDefault:id-desc
Options:id-ascid-descupdated_at-ascupdated_at-desc
SubscriptionDefault:id-desc
Options:id-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc
WebhookDefault:id-desc
Options:id-ascid-desc

Addresses

An Addresses record represents a shipping address. Each customer can have multiple addresses. Subscriptions are a child object of an address.

Endpoints
POST
/addresses
GET
/addresses/{id}
PUT
/addresses/{id}
DELETE
/addresses/{id}
GET
/addresses
POST
/addresses/merge
POST
/addresses/{id}/charges/skip
Expand

The address object

An Addresses record represents a shipping address. Each customer can have multiple addresses. Subscriptions are a child object of an address.

Attributes
  • id
    integer

    Unique numeric identifier for theAddress.

  • payment_method_id
    integer

    Unique numeric identifier for thePayment Method associated to theAddress.

  • address1
    string

    The street associated with theAddress.

  • address2
    string

    Any additional information associated with theAddress.

  • city
    string

    The city associated with the address.

  • company
    string

    The company associated with the address.

  • country_code
    string

    2-letter country code.

  • customer_id
    integer

    Unique numeric identifier for the customer associated with the address.

  • discounts
    array

    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.

    Show object attributes
  • first_name
    string

    The customer’s first name associated with the address.

  • last_name
    string

    The customer’s last name associated with the address.

  • order_attributes
    array

    Replaces cart_attributes. Extra information that is added to the order.

    Show object attributes
  • order_note
    string

    Notes to be added to all orders associated with the address.

  • phone
    string

    The phone number associated with the address.

  • presentment_currency
    string

    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.

  • province
    string

    The state or province associated with the address.

  • shipping_lines_conserved
    array

    Shipping rates that have previously been overridden viashipping_lines_override but are currently inactive.

    Show object attributes
  • shipping_lines_override
    array

    Used when shipping rates need to be overridden.

    If this parameter has valuenull, rates will be fetched whenCharge is created or regenerated

    Show object attributes
  • zip
    string

    The zip or postal code associated with the address.

  • created_at
    datetime

    The date and time when the address was created.

  • updated_at
    datetime

    The date and time when the address was last updated.

Error related attributes
    More Attributes
      The address object
      {"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 an address

      Create a new address for a customer.

      Scopes: write_customers
      Body Parameters
      • customer_id
        integer
        * Required

        Unique numeric identifier for the customer associated with the address.

      • address1
        string
        * Required

        The street associated with theAddress. Minimum length is 1 character.

      • address2
        string

        Any additional information associated with the shipping address.

      • city
        string
        * Required

        The city associated with the shipping address.

      • company
        string

        The company associated with the shipping address.

      • country_code
        string
        * Required

        2-letter country code.

        Check if the store supports shipping to this country. This is set by the merchant in their Shipping Settings page.

      • first_name
        string
        * Required

        The customer’s first name associated with the address. Minimum length is 1 character.

      • last_name
        string
        * Required

        The customer’s last name associated with the address. Minimum length is 1 character.

      • order_attributes
        array

        Extra information that is added to the order.

        Show object attributes
      • order_note
        string

        Notes to be added to all orders associated with the address.

      • payment_method_id
        integer

        Payment method id for thePayment_method to be associated to this address.

      • phone
        string
        * Required

        The phone number associated with the address. Must be included in the request schema but can be an empty string.

      • presentment_currency
        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.

      • province
        string
        * Required

        The state or province associated with the address. Check if country requires a provinceCOUNTRIES_REQUIRING_PROVINCE.

      • shipping_lines_override
        array

        Used when shipping rates need to be overridden. If this parameter has valuenull, rates will be fetched when a relatedCharge is created or regenerated

        Show object attributes
      • zip
        string
        * Required

        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.

      More Parameters
        Responses
        • 201

          OK: The request was successful, created a new resource, and resource created is in the body.

          Show response object
        POST
        /addresses
        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"}'
        Response
        {"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"}}

        Retrieve an address

        Retrieves address for customer based on specified address id.

        Scopes: read_customers
        Responses
        • 200

          successful response

          Show response object
        GET
        /addresses/{id}
        curl'https://api.rechargeapps.com/addresses/21317826' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
        Response
        {"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"}}

        Update an address

        Updates an existing address to match the specified parameters.

        Example: remove discounts from an address

        To remove all discounts from an address, set thediscounts 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.

        Scopes: write_customers
        Body Parameters
        • address1
          string

          The street associated with theAddress. Minimum length is 1 character.

        • address2
          string

          Any additional information associated with the shipping address.

        • city
          string

          The city associated with the shipping address. Minimum length is 1 character.

        • company
          string

          The company associated with the shipping address.

        • country_code
          string

          2-letter country code.

          Check if thestore supports shipping to this country. This is set by the merchant in their Shipping Settings page.

        • discounts
          array

          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.

          Show object attributes
        • first_name
          string

          The customer’s first name associated with the address. Minimum length is 1 character.

        • last_name
          string

          The customer’s last name associated with the address. Minimum length is 1 character.

        • order_attributes
          array

          Extra information that is added to the order.

          Show object attributes
        • order_note
          string

          Notes to be added to all orders associated with the address.

        • payment_method_id
          integer

          Payment method id for thePayment_method to be associated to this address.

        • phone
          string

          The phone number associated with the address. Must be included in the request schema but can be an empty string.

        • province
          string

          The state or province associated with the address. Check if country requires a provinceCOUNTRIES_REQUIRING_PROVINCE.

        • shipping_lines_override
          array

          Used when shipping rates need to be overridden. If this parameter has valuenull, rates will be fetched when a relatedCharge is created or regenerated.

          Show object attributes
        • zip
          string

          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.

        More Parameters
          Responses
          • 200

            successful response

            Show response object
          PUT
          /addresses/{id}
          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"}'
          Response
          {"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"}}

          Delete an address

          It is possible to delete certain addresses from the store using API.

          OnlyAddresses with no activeSubscriptions can be deleted.

          Scopes: write_customers
          Responses
          • 204

            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.

            Show response object
          DELETE
          /addresses/{id}
          curl -XDELETE'https://api.rechargeapps.com/addresses/38700614'\  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
          Response
          {}

          List addresses

          Returns all addresses from the store, or addresses for the user given in the parameter.

          HTTP examples


          GET /addresses

          GET /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.

          Scopes: read_customers
          Query Parameters
          • created_at_max
            datetime

            Returns addresses created before the given time.

          • created_at_min
            datetime

            Returns addresses created after the given time.

          • customer_id
            integer

            Unique identifier of the customer.

          • discount_code
            string

            Returns addresses that have the provided discount_code.

          • discount_id
            string

            Returns addresses that have the provided discount_id.

          • ids
            string

            Filter addresses by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

          • limit
            string

            Default: 50

            Max: 250

            The amount of results. Default is 50 while the maximum is 250.

          • page
            string
            *Deprecated

            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.

          • updated_at_max
            string

            Returns addresses updated before the given date.

          • updated_at_min
            string

            Returns addresses updated after the given time.

          • is_active
            boolean

            Returns active addresses.

          More Parameters
            Responses
            • 200

              successful response

              Show response object
            GET
            /addresses
            curl'https://api.rechargeapps.com/addresses' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
            Response
            {"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"}]}

            Merge addresses

            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.

            Scopes: write_customers
            Body Parameters
            • delete_source_addresses
              boolean

              Indicates whether source addresses should be deleted.

            • next_charge_date
              string

              Specifies the next charge date of the associated subscriptions on the target address.

            • target_address
              object
              * Required

              The address all of the subscriptions should be moved to.

              Show object attributes
            • source_addresses
              array
              * Required

              The list of addresses that the subscriptions should move from.

            More Parameters
              Responses
              • 200

                successful response

                Show response object
              POST
              /addresses/merge
              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}]}'
              Response
              {"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 future charge

              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.

              Scopes: write_orders
              Body Parameters
              • date
                datetime
                * Required

                The date in the future of theCharge to be skipped.

                This date must be within the delivery schedules of theCustomer.

              • subscription_ids
                array
                * Required

                A list containing theSubscription IDs to be skipped.

              More Parameters
                Responses
                • 200

                  successful response

                  Show response object
                • 404

                  theAddress withid does not exist

                  Show response object
                • 422

                  invalid data passed to the endpoint

                  Show response object
                POST
                /addresses/{id}/charges/skip
                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]}'
                Response
                {"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"}}

                Bundle Selections

                Pro plan

                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.

                Endpoints
                GET
                /bundle_selections
                GET
                /bundle_selections/{id}
                POST
                /bundle_selections
                PUT
                /bundle_selections/{id}
                DELETE
                /bundle_selections/{id}
                Expand

                The bundle selection object

                Pro plan

                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).

                Attributes
                • id
                  integer

                  The unique numeric identifier for theBundleSelection.

                • bundle_variant_id
                  integer

                  The ID of theBundleVariant associated with theBundleSelection.

                • purchase_item_id
                  integer

                  The ID of thePurchaseItem associated with theBundleSelection.

                • created_at
                  datetime

                  The date and time when the contents were selected.

                • external_product_id
                  string

                  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.

                • external_variant_id
                  string

                  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.

                • items
                  array

                  A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.

                  Show object attributes
                • updated_at
                  datetime

                  The date and time at which theBundleSelection was most recently updated.

                Error related attributes
                  More Attributes
                    The bundle selection object
                    {"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"}}

                    List bundle selections

                    Pro plan

                    Returns a list ofBundleSelections.

                    HTTP request examples


                    GET /bundle_selections?purchase_item_ids=:purchase_item_id_1,:purchase_item_id_2

                    GET /bundle_selections?bundle_variant_ids=:bundle_variant_id_1,:bundle_variant_id_2

                    GET /bundle_selections?limit=1

                    GET /bundle_selections?limit=1&page=2

                    GET /bundle_selections?sort_by=updated_at-desc

                    ReturnedBundleSelections 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.

                    Scopes: read_subscriptions
                    Query Parameters
                    • purchase_item_ids
                      string

                      FilterBundleSelections bySubscription orOnetime ID.

                      If passing multiple values, must be comma separated. Non-integer values will result in a422 error.

                    • bundle_variant_ids
                      string

                      FilterBundleSelections byBundleVariants.

                      If passing multiple values, must be comma separated. Non-integer values will result in a422 error.

                    • limit
                      string

                      Default: 50

                      Max: 250

                      The amount of results.

                    • page
                      string
                      *Deprecated

                      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_by
                      string

                      Sort listedBundleSelections in a specific order.
                      Available sort options:id-asc,id-desc,updated_at-asc,updated_at-desc.

                    • active_purchase_items
                      boolean

                      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.

                    More Parameters
                      Responses
                      • 200

                        successful response

                        Show response object
                      GET
                      /bundle_selections
                      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
                      Response
                      {"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 a bundle selection

                      Pro plan

                      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.

                      Scopes: read_subscriptions
                      Responses
                      • 200

                        successful response

                        Show response object
                      • 404

                        theBundleSelection withbundle_selection_id does not exist

                        Show response object
                      GET
                      /bundle_selections/{id}
                      curl'https://api.rechargeapps.com/bundle_selections/100714428' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                      Response
                      {"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 a bundle selection

                      Pro plan

                      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.

                      Scopes: write_subscriptions
                      Body Parameters
                      • purchase_item_id
                        integer
                        * Required

                        The ID of thePurchaseItem associated with theBundleSelection.

                      • plan_id
                        integer

                        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.

                      • items
                        array
                        * Required

                        A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.

                        Show object attributes
                      More Parameters
                        Responses
                        • 200

                          successful response

                          Show response object
                        • 422

                          missing required field or invalid items passed

                          Show response object
                        POST
                        /bundle_selections
                        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    }  ]}'
                        Response
                        {"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"}}

                        Update a bundle selection

                        Pro plan

                        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.

                        Scopes: write_subscriptions
                        Body Parameters
                        • purchase_item_id
                          integer

                          The ID of thePurchaseItem associated with theBundleSelection.

                        • plan_id
                          integer

                          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.

                        • items
                          array

                          A list ofitem objects, each containing information about a distinct product selected as part of the Bundle.

                        More Parameters
                          Responses
                          • 200

                            successful response

                            Show response object
                          • 404

                            theBundleSelection withbundle_selection_id does not exist

                            Show response object
                          • 422

                            invalid items passed

                            Show response object
                          PUT
                          /bundle_selections/{id}
                          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    }  ]}'
                          Response
                          {"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 a bundle selection

                          Pro plan

                          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.

                          Scopes: write_subscriptions
                          Responses
                          • 204

                            theBundleSelection has been removed and there is no content to send back in the response body.

                            Show response object
                          • 404

                            theBundleSelection withid does not exist

                            Show response object
                          DELETE
                          /bundle_selections/{id}
                          curl -XDELETE'https://api.rechargeapps.com/bundle_selections/100714428' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                          Response
                          {}

                          Charges

                          A charge is the representation of a financial transaction linked to the purchase of an item (past or future). It can be a transaction that was processed already or the representation of an upcoming transaction. 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).

                          Endpoints
                          GET
                          /charges/{id}
                          GET
                          /charges
                          POST
                          /charges/{id}/apply_discount
                          POST
                          /charges/{id}/remove_discount
                          POST
                          /charges/{id}/skip
                          POST
                          /charges/{id}/unskip
                          POST
                          /charges/{id}/refund
                          POST
                          /charges/{id}/process
                          POST
                          /charges/{id}/capture_payment
                          POST
                          /charges/{id}/add_free_gift
                          POST
                          /charges/{id}/remove_free_gift
                          Expand

                          The charge object

                          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.

                          Attributes
                          • id
                            integer

                            The unique numeric identifier for theCharge.

                          • address_id
                            integer

                            The ID of the shippingAddress tied to theCharge.

                          • analytics_data
                            object

                            An object containing analytics data associated with theCharge.

                            Show object attributes
                          • billing_address
                            object

                            All the billing information related to the charge.

                            Show object attributes
                          • client_details
                            object

                            Details of the access method used by the purchaser.

                            Show object attributes
                          • created_at
                            datetime

                            The date and time when the transaction was created.

                          • currency
                            string

                            The code of the currency for thisCharge, such asUSD.

                            Related guides:Supported currencies

                          • customer
                            object

                            An object containingCustomer information associated with thisCharge.

                            Show object attributes
                          • discounts
                            array

                            An array ofDiscounts associated with theCharge.

                            Show object attributes
                          • external_order_id
                            object

                            An object containing the associated external order ID.

                            Show object attributes
                          • external_transaction_id
                            object

                            An object containing the associated external transaction ID.

                            Show object attributes
                          • line_items
                            array

                            A list ofline_item objects, each containing information about a distinct purchase item.

                            Show object attributes
                          • note
                            string

                            Notes associated with theCharge.

                          • order_attributes
                            array

                            An array of name-value pairs of order attributes on theCharge.

                            Show object attributes
                          • orders_count
                            integer

                            The number ofOrders generated from thisCharge (>1 for prepaidSubscriptions).

                          • payment_processor
                            string

                            The payment processor used for thisCharge.

                          • processed_at
                            datetime

                            The date and time when the transaction was processed.

                          • scheduled_at
                            date

                            The date time of when theCharge is/was scheduled to process.

                          • shipping_address
                            object

                            The shippingAddress of theCharge.

                            Show object attributes
                          • shipping_lines
                            array

                            An array of shipping lines associated with theCharge.

                            Show object attributes
                          • status
                            string

                            Possible values:   success,   error,   queued,   skipped,   refunded,   partially_refunded,   pending_manual_payment,   pending

                            The status of theCharge.

                          • subtotal_price
                            string

                            The combined price of allline_items without taxes and shipping.

                          • tags
                            string

                            A comma-separated list of tags on theCharge.

                          • tax_lines
                            array

                            An array of tax lines that apply to theCharge.

                            Show object attributes
                          • taxable
                            boolean

                            A boolean indicator of the taxability of theCharge.

                          • taxes_included
                            boolean

                            Whether taxes are included in the order subtotal.

                          • total_discounts
                            string

                            The sum of theDiscounts applied to theCharge.

                          • total_line_items_price
                            string

                            The total price of all line items of theCharge.

                          • total_price
                            string

                            The sum of all the prices of all the items in theCharge, taxes and discounts included (must be positive).

                          • total_refunds
                            string

                            The sum of all refunds that were applied to theCharge.

                          • total_tax
                            string

                            The total tax due associated with theCharge.

                          • total_weight_grams
                            integer

                            The total weight of theCharge’s line items in grams.

                          • type
                            string

                            Possible values:   checkout,   recurring

                            An indicator of theCharge’s type, either checkout or recurring.

                          • updated_at
                            datetime

                            The date time at which theCharge was most recently updated.

                          Error related attributes
                          • error
                            string

                            Error reason as sentence text (typically returned direct from the payment processor). e.g."error": "Customer needs to update credit card"

                          • error_type
                            string

                            Structured reason why the charge failed such asCUSTOMER_NEEDS_TO_UPDATE_CARD.

                          • charge_attempts
                            integer

                            Shows how many times an attempt to charge was placed.

                          • external_variant_id_not_found
                            boolean

                            Indicates if Recharge was able to find theexternal_variant_id from theCharge.

                          • retry_date
                            date

                            The date when the next attempt will be placed.

                          More Attributes
                          • has_uncommited_changes
                            boolean

                            Specifies whether theCharge is scheduled for a regeneration (if theSubscription related to the charge was updated in the last 5 seconds usingcommit=false).

                          The charge object
                          {"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 a charge

                          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)

                          Scopes: read_orders
                          Responses
                          • 200

                            successful response

                            Show response object
                          GET
                          /charges/{id}
                          curl'https://api.rechargeapps.com/charges/377749210' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                          Response
                          {"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"}}

                          List charges

                          Returns a list ofCharges.

                          HTTP request examples


                          GET /charges?address_id=:address_id

                          GET /charges?created_at_min=2016-05-18&created_at_max=2016-06-18

                          GET /charges?customer_id=:customer_id

                          GET /charges?discount_code=10PERCENTOFF

                          GET /charges?discount_id=:discount_id

                          GET /charges?external_order_id=:external_order_id

                          GET /charges?ids=1123551,262667345,12341535

                          GET /charges?purchase_item_id=:purchase_item_id

                          GET /charges?scheduled_at=2016-06-18

                          GET /charges?scheduled_at_min=2016-05-18&scheduled_at_max=2016-06-18

                          GET /charges?sort_by=id-desc

                          GET /charges?status=queued

                          GET /charges?status=queued,refunded,partially_refunded

                          GET /charges?updated_at_min=2016-05-18&updated_at_max=2016-06-18

                          GET /charges?processed_at_min=2022-01-18&processed_at_max=2022-02-18

                          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 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.

                          Scopes: read_orders
                          Query Parameters
                          • address_id
                            string

                            FilterCharges byAddress.

                          • created_at_max
                            string

                            ShowCharges created before the given date.

                          • created_at_min
                            string

                            ShowCharges created after the given date.

                          • customer_id
                            string

                            FilterCharges byCustomer.

                          • discount_code
                            string

                            ListCharges that contain the givendiscount_code.

                          • discount_id
                            string

                            ListCharges that contain the givendiscount_id.

                          • external_order_id
                            string

                            FilterCharges by the associated order ID in the external e-commerce platform.

                          • ids
                            string

                            FilterCharges by ID.

                            If passing multiple values, must be comma separated. Non-integer values will result in a422 error.

                          • limit
                            string

                            Default: 50

                            Max: 250

                            The amount of results.

                          • page
                            string
                            *Deprecated

                            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.

                          • purchase_item_id
                            string

                            FilterCharges by aSubscription orOnetime ID.

                          • purchase_item_ids
                            string

                            FilterCharges by a comma-separated list ofSubscription orOnetime IDs.

                          • scheduled_at
                            string

                            FilterCharges by specific scheduled charge date.

                          • scheduled_at_max
                            string

                            ShowCharges scheduled to be processed before the given date.

                          • scheduled_at_min
                            string

                            ShowCharges scheduled to be processed after the given date.

                          • sort_by
                            string

                            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.

                          • status
                            string

                            Filter charges by status.
                            Available status:success,queued,error,refunded,partially_refunded,skipped,pending_manual_payment,pending.

                          • updated_at_max
                            string

                            Show charges updated before the given date.

                          • updated_at_min
                            string

                            Show charges updated after the given date.

                          • processed_at_min
                            string

                            Show charges processed after, and including, the given date.

                          • processed_at_max
                            string

                            Show charges processed before, and including, the given date.

                          More Parameters
                            Responses
                            • 200

                              successful response

                              Show response object
                            GET
                            /charges
                            curl'https://api.rechargeapps.com/charges' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                            Response
                            {"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"}]}

                            Apply a discount

                            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.

                            Scopes: write_orders
                            Body Parameters
                            • discount_code
                              string

                              Code of theDiscount you want to apply to aCharge.

                            • discount_id
                              integer

                              ID of theDiscount you want to apply to aCharge.

                            More Parameters
                              Responses
                              • 200

                                successful response

                                Show response object
                              POST
                              /charges/{id}/apply_discount
                              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"}'
                              Response
                              {"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 a discount

                              Remove aDiscount from aCharge without destroying theDiscount.

                              HTTP request examples


                              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.

                              Scopes: write_orders
                              Responses
                              • 200

                                successful response

                                Show response object
                              POST
                              /charges/{id}/remove_discount
                              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'{}'
                              Response
                              {"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 a charge

                              Skip aCharge.

                              Scopes: write_orders
                              Responses
                              • 200

                                successful response

                                Show response object
                              POST
                              /charges/{id}/skip
                              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]}'
                              Response
                              {"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 a charge

                              Unskip aCharge.

                              Scopes: write_orders
                              Responses
                              • 200

                                successful response

                                Show response object
                              • 422

                                Unprocessable

                                Show response object
                              POST
                              /charges/{id}/unskip
                              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]}'
                              Response
                              {"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 a charge

                              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.

                              Scopes: write_orders write_payment_methods
                              Body Parameters
                              • amount
                                string
                                * Required

                                Amount of money that will be refunded. It can be fully or partially refunded.

                              • full_refund
                                boolean

                                If this parameter has valuetrue, theCharge will be totally refunded.

                              • retry
                                boolean

                                If this parameter has valuetrue andfull_refund has valuetrue, theCharge will be retried. Thestatus on theCharge will be returned as “error”.

                              • error
                                string

                                If theretry parameter has valuetrue, this value is required. Valid values are “insufficient_inventory”.

                              • error_type
                                string

                                If theretry parameter has valuetrue, this value is required.

                              More Parameters
                                Responses
                                • 200

                                  successful response

                                  Show response object
                                POST
                                /charges/{id}/refund
                                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}'
                                Response
                                {"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"}}

                                Process a charge

                                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.

                                Scopes: write_payments
                                Responses
                                • 200

                                  successful response

                                  Show response object
                                POST
                                /charges/{id}/process
                                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'{}'
                                Response
                                {"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"}}

                                Capture a charge

                                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.

                                Capture Window


                                You can only capture payment onCharges 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.

                                As a result, Recharge provides acharge/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.

                                Scopes: write_customers write_orders write_payment_methods write_subscriptions
                                Responses
                                • 200

                                  Charge captured successfully

                                  Show response object
                                • 400

                                  Bad Request

                                  Show response object
                                • 404

                                  Not Found

                                  Show response object
                                • 422

                                  Unprocessable

                                  Show response object
                                POST
                                /charges/{id}/capture_payment
                                curl'https://api.rechargeapps.com/charges/100714428/capture_payment' \  -H'Content-Type: application/json' \  -H'X-Recharge-Access-Token: your_api_token' \  -d'{}'
                                Response
                                {"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"}}

                                Add a free gift

                                Endpoint for addingFree Gift to an existing queuedCharge.

                                You can provideexternal_variant_id to add to theCharge.

                                Scopes: write_orders write_free_gifts
                                Body Parameters
                                • free_gifts
                                  array

                                  List ofFree Gifts you want to add to aCharge.

                                  Show object attributes
                                • conserve_on_skip
                                  boolean

                                  Whether to conserve theFree Gift on a skipped charge.

                                More Parameters
                                  Responses
                                  • 200

                                    Free gift added to charge

                                    Show response object
                                  • 422

                                    Unprocessable

                                    Show response object
                                  POST
                                  /charges/{id}/add_free_gift
                                  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}'
                                  Response
                                  {"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"}}

                                  Remove a free gift

                                  Endpoint for removing a free gift from an existing queuedCharge.

                                  You can provideexternal_variant_ids to remove from theCharge.

                                  Scopes: write_orders write_free_gifts
                                  Body Parameters
                                  • external_variant_ids
                                    array

                                    List ofExternalVariant IDs of free gifts you want to remove from aCharge.

                                  More Parameters
                                    Responses
                                    • 200

                                      Free gift removed from charge

                                      Show response object
                                    POST
                                    /charges/{id}/remove_free_gift
                                    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"]}'
                                    Response
                                    {"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

                                    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.

                                    Endpoints
                                    POST
                                    /checkouts
                                    GET
                                    /checkouts/{token}
                                    POST
                                    /checkouts
                                    PUT
                                    /checkouts/{token}
                                    GET
                                    /checkouts/{token}/shipping_rates
                                    POST
                                    /checkouts/{token}/charge
                                    Expand

                                    The checkout object

                                    Checkouts resource allows you to create, update, and process a checkout programmatically. Shipping cost and sales tax determination are automatic functions of the Recharge Checkout resource.

                                    TheCheckout endpoints are only available for BigCommerce and Custom.Checkouts on Shopify must go through Shopify.

                                    Attributes
                                    • charge_id
                                      integer

                                      ID for theCharge resulting from processing theCheckout.

                                    • analytics_data
                                      object

                                      Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.

                                      Show object attributes
                                    • applied_discounts
                                      array

                                      Discount details, populated once theDiscount has been applied successfully to theCheckout.

                                      Show object attributes
                                    • applied_shipping_rate
                                      object

                                      Shipping rates details, populated once the rates have been selected and applied successfully to theCheckout.

                                      Show object attributes
                                    • available_shipping_rates
                                      array

                                      Shipping rates available for the shipping address provided in theCheckout.

                                      Checkout object must contain theshipping_address before theavailable_shipping_rates are populated.

                                      Show object attributes
                                    • billing_address
                                      object

                                      BillingAddress for theCheckout.

                                      Show object attributes
                                    • completed_at
                                      datetime

                                      Timestamp for when theCheckout was processed.

                                    • created_at
                                      datetime

                                      Timestamp for when theCheckout was created.

                                    • currency
                                      string

                                      Currency of theCheckout.

                                    • email
                                      string

                                      Email address for theCustomer.

                                    • external_checkout_id
                                      string

                                      External checkout reference, if one exists.

                                    • external_checkout_source
                                      string

                                      External checkout platform, if one exists.

                                    • external_customer_id
                                      object

                                      External customer reference, if one exists.

                                      Show object attributes
                                    • external_transaction_id
                                      object

                                      The ID of the associated transaction in a payment processor system (like Stripe).

                                      Show object attributes
                                    • line_items
                                      array

                                      A list of items included in theCheckout

                                      quantity andexternal_variant_id are required parameters inline_items.

                                      Show object attributes
                                    • note
                                      string

                                      Custom note.

                                    • notification_preferences
                                      object

                                      Notification preferences for theCustomer.

                                      Show object attributes
                                    • order_attributes
                                      array

                                      List of name-value pairs for custom attributes.

                                      Show object attributes
                                    • payment_processor
                                      string

                                      Name of the payment processor.

                                    • requires_shipping
                                      boolean

                                      Whether or not theCheckout contains items that require shipping.

                                    • shipping_address
                                      object

                                      ShippingAddress for theCheckout.

                                      Show object attributes
                                    • shipping_lines
                                      object

                                      Details of shipping rate, cost…

                                      Show object attributes
                                    • subtotal_price
                                      string

                                      Value of theCheckout minus shipping and tax.

                                    • tax_lines
                                      array

                                      Array oftax_line objects.

                                      Show object attributes
                                    • taxable
                                      boolean

                                      Whether theCheckout contains items that are taxable.

                                    • taxes_included
                                      boolean

                                      Whether the tax is included in the price of the items.

                                    • token
                                      string

                                      Unique token for theCheckout.

                                    • total_price
                                      string

                                      Full price of theCheckout including shipping and tax.

                                    • total_tax
                                      string

                                      Tax charged on theCheckout.

                                    • updated_at
                                      datetime

                                      Timestamp for the latestCheckout update.

                                    Error related attributes
                                      More Attributes
                                        The checkout object
                                        {"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 a checkout

                                        Create aCheckout

                                        TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.

                                        Scopes: write_checkouts
                                        Query Parameters
                                        • get_shipping_rates
                                          boolean

                                          If specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout creation.

                                        More Parameters
                                          Body Parameters
                                          • analytics_data
                                            object

                                            Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.

                                            Show object attributes
                                          • applied_discounts
                                            array

                                            Discount to apply to theCheckout.

                                            Show object attributes
                                          • applied_shipping_rate
                                            object

                                            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.

                                            Show object attributes
                                          • custom_shipping_rate_options
                                            array

                                            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.

                                            Show object attributes
                                          • billing_address
                                            object

                                            BillingAddress for theCheckout.

                                            Show object attributes
                                          • currency
                                            string

                                            Currency of theCheckout.

                                          • email
                                            string

                                            Email address for theCustomer.

                                          • external_checkout_id
                                            string

                                            External checkout reference, if one exists.

                                          • external_checkout_source
                                            string

                                            External checkout platform, if one exists.

                                          • external_transaction_id
                                            object

                                            The ID of the associated transaction in a payment processor system (like Stripe).

                                            Show object attributes
                                          • line_items
                                            array
                                            * Required

                                            A list of items included in theCheckout

                                            quantity andexternal_variant_id are required parameters inline_items.

                                            Show object attributes
                                          • note
                                            string

                                            Custom note.

                                          • order_attributes
                                            array

                                            List of name-value pairs for custom attributes.

                                            Show object attributes
                                          • shipping_address
                                            object

                                            ShippingAddress for theCheckout.

                                            Show object attributes
                                          More Parameters
                                            Responses
                                            • 200

                                              successful response

                                              Show response object
                                            POST
                                            /checkouts
                                            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"  }}'
                                            Response
                                            {"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

                                            Retrieve a checkout.

                                            TheCheckout endpoints are only available for BigCommerce and Custom. Checkouts on Shopify must go through Shopify.

                                            Scopes: read_checkouts
                                            Responses
                                            • 200

                                              successful response

                                              Show response object
                                            GET
                                            /checkouts/{token}
                                            curl'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005' \  -H'X-Recharge-Access-Token: your_api_token' \  -H'X-Recharge-Version: 2021-11'
                                            Response
                                            {"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"}}

                                            Update a checkout

                                            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.

                                            Scopes: write_checkouts
                                            Query Parameters
                                            • get_shipping_rates
                                              boolean

                                              If specified as a query parameter, shipping rates will be retrieved and will allow providing applied_shipping_rate upon checkout update.

                                            More Parameters
                                              Body Parameters
                                              • analytics_data
                                                array

                                                Urchin Tracking Module (UTM) parameters are used for online marketing campaigns.

                                                Show object attributes
                                              • applied_shipping_rate
                                                object

                                                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

                                                Show object attributes
                                              • billing_address
                                                object

                                                Billing address for the checkout.

                                                Show object attributes
                                              • buyer_accepts_marketing
                                                boolean

                                                Does the buyer accept marketing, newsletters etc.

                                              • discount_code
                                                string

                                                Discount code to be used on the checkout, e.g. “DISCOUNT20”.

                                              • currency
                                                string

                                                Currency of theCheckout.

                                              • email
                                                string

                                                Email address for the customer.

                                              • external_checkout_id
                                                string

                                                Represents the external cart token.

                                              • external_checkout_source
                                                string

                                                Represents the source forexternal_checkout_id.

                                              • line_items
                                                array

                                                quantity,product_id andvariant_id are required parameters in line_items.

                                                Show object attributes
                                              • note
                                                string

                                                Note attribute used to store custom notes.

                                              • partial_shipping
                                                boolean

                                                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

                                              • order_attributes
                                                array

                                                Structured custom notes.

                                                Show object attributes
                                              • phone
                                                string

                                                Customer phone number.

                                              • shipping_address
                                                object

                                                Shipping address for the checkout.

                                                When using mobile payment options, insufficient shipping address data is available until payment intent, which causes validation errors when updating the checkout object.

                                                Related guides:Checkout mobile payment

                                                Show object attributes
                                              • shipping_line
                                                array

                                                Shipping lines.

                                                Show object attributes
                                              More Parameters
                                                Responses
                                                • 200

                                                  successful response

                                                  Show response object
                                                PUT
                                                /checkouts/{token}
                                                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    }  ]}'
                                                Response
                                                {"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"}}

                                                Retrieve shipping rates

                                                You can retrieve all shipping rates for a specific checkout.

                                                Scopes: read_checkouts
                                                Responses
                                                • 200

                                                  successful response

                                                  Show response object
                                                GET
                                                /checkouts/{token}/shipping_rates
                                                curl'https://api.rechargeapps.com/checkouts/6a7c36a1213a4d7fb746e6588fa55005/shipping_rates' \  -H'X-Recharge-Access-Token: your_api_token' \  -H'X-Recharge-Version: 2021-11'
                                                Response
                                                {"shipping_rates":[{"checkout":{"subtotal_price":"22.50","total_price":"42.40","total_tax":"0.00"},"code":"Standard","delivery_range":null,"description":null,"handle":"shopify-Standard-19.90","name":"Standard","phone_required":false,"price":"19.90","title":"Standard"}]}

                                                Process a checkout

                                                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

                                                Scopes: write_checkouts
                                                Body Parameters
                                                • payment_processor
                                                  string
                                                  * Required

                                                  Possible values:   stripe,   braintree,   authorize

                                                  The name of payment processor.

                                                • payment_token
                                                  string
                                                  * Required

                                                  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.

                                                • payment_type
                                                  string

                                                  Possible values:   CREDIT_CARD,   PAYPAL,   APPLE_PAY,   GOOGLE_PAY,   SEPA_DEBIT

                                                  The payment type used for theCheckout.

                                                More Parameters
                                                  Responses
                                                  • 200

                                                    successful response

                                                    Show response object
                                                  POST
                                                  /checkouts/{token}/charge
                                                  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"}'
                                                  Response
                                                  {"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

                                                  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…).

                                                  Endpoints
                                                  POST
                                                  /collections
                                                  GET
                                                  /collections/{id}
                                                  PUT
                                                  /collections/{id}
                                                  DELETE
                                                  /collections/{id}
                                                  GET
                                                  /collections
                                                  GET
                                                  /collection_products
                                                  POST
                                                  /collections/{id}/collection_products-bulk
                                                  DELETE
                                                  /collections/{id}/collection_products-bulk
                                                  Expand

                                                  The collection object

                                                  Attributes
                                                  • id
                                                    integer

                                                    Unique numeric identifier for theCollection.

                                                  • created_at
                                                    datetime

                                                    The date and time when theCollection was created.

                                                  • description
                                                    string

                                                    TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.

                                                  • sort_order
                                                    string

                                                    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.

                                                  • title
                                                    string

                                                    The title of theCollection. A short descriptive definition of theCollection.

                                                  • type
                                                    string

                                                    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.

                                                  • updated_at
                                                    datetime

                                                    The date and time when theCollection was last updated.

                                                  Error related attributes
                                                    More Attributes
                                                      The collection object
                                                      {"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 a collection

                                                      Create aCollection in Recharge.

                                                      Scopes: write_products
                                                      Body Parameters
                                                      • description
                                                        string
                                                        * Required

                                                        TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.

                                                      • sort_order
                                                        string

                                                        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.

                                                      • title
                                                        string
                                                        * Required

                                                        The title of theCollection. A short descriptive definition of theCollection.

                                                      More Parameters
                                                        Responses
                                                        • 200

                                                          successful response

                                                          Show response object
                                                        POST
                                                        /collections
                                                        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"}
                                                        Response
                                                        {"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 a collection

                                                        Retrieve oneCollection usingcollection_id.

                                                        Scopes: read_products
                                                        Responses
                                                        • 200

                                                          successful response

                                                          Show response object
                                                        • 404

                                                          Not found

                                                          Show response object
                                                        GET
                                                        /collections/{id}
                                                        curl'https://api.rechargeapps.com/collections/134157' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                        Response
                                                        {"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"}}

                                                        Update a collection

                                                        Modify an existingCollection to match the specified parameters.

                                                        Scopes: write_products
                                                        Body Parameters
                                                        • description
                                                          string

                                                          TheCollection description. Used to store a detailed explanation of theCollection content and its purpose.

                                                        • sort_order
                                                          string

                                                          Possible values:   id-asc,   id-desc,   title-asc,   title-desc,   created-asc,   created-desc

                                                          The order in which theProducts in the collection should appear.

                                                        • title
                                                          string

                                                          The title of theCollection. A short descriptive definition of theCollection.

                                                        More Parameters
                                                          Responses
                                                          • 200

                                                            successful response

                                                            Show response object
                                                          • 404

                                                            Not found

                                                            Show response object
                                                          • 415

                                                            Unprocessable entity

                                                            Show response object
                                                          PUT
                                                          /collections/{id}
                                                          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"}'
                                                          Response
                                                          {"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 a collection

                                                          Delete aCollection

                                                          For safety and good UX, you can only delete aCollection if it is not in use in the Customer Portal

                                                          Scopes: write_products
                                                          Responses
                                                          • 204

                                                            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.

                                                            Show response object
                                                          • 404

                                                            Not found

                                                            Show response object
                                                          DELETE
                                                          /collections/{id}
                                                          curl -XDELETE'https://api.rechargeapps.com/collections/134129' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                          Response
                                                          {}

                                                          List collections

                                                          Return a list ofCollections in your store.

                                                          HTTP request examples



                                                          GET /collections

                                                          GET /collections?title=Cats

                                                          Scopes: read_products
                                                          Query Parameters
                                                          • title
                                                            string

                                                            The title of theCollection. A short descriptive definition of theCollection.

                                                          More Parameters
                                                            Responses
                                                            • 200

                                                              successful response

                                                              Show response object
                                                            GET
                                                            /collections
                                                            curl'https://api.rechargeapps.com/collections' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                            Response
                                                            {"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"}]}

                                                            List collections products

                                                            Return a list of the product ids included inCollections in your store.

                                                            HTTP request examples



                                                            GET /collection_products

                                                            GET /collection_products?collection_id=134157

                                                            Scopes: read_products
                                                            Query Parameters
                                                            • collection_id
                                                              integer

                                                              The id of theCollection for which you want to see the products.

                                                            More Parameters
                                                              Responses
                                                              • 200

                                                                successful response

                                                                Show response object
                                                              • 422

                                                                Errors. Unprocessable entity.

                                                                Show response object
                                                              GET
                                                              /collection_products
                                                              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
                                                              Response
                                                              {"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 collection products

                                                              Add products to aCollection in Recharge.

                                                              Scopes: write_products
                                                              Body Parameters
                                                              • collection_products
                                                                array
                                                                * Required

                                                                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.

                                                                Show object attributes
                                                              More Parameters
                                                                Responses
                                                                • 201

                                                                  successful response

                                                                  Show response object
                                                                • 422

                                                                  unprocessable entity

                                                                  Show response object
                                                                • 500

                                                                  internal server error. (often the external_product_id entered does not exist)

                                                                  Show response object
                                                                POST
                                                                /collections/{id}/collection_products-bulk
                                                                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"      }    ]}'
                                                                Response
                                                                {"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"}]}

                                                                Delete collection products

                                                                Removes products from aCollection in Recharge.

                                                                Scopes: write_products
                                                                Body Parameters
                                                                • collection_products
                                                                  array
                                                                  * Required

                                                                  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.

                                                                  Show object attributes
                                                                More Parameters
                                                                  Responses
                                                                  • 204

                                                                    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.

                                                                    Show response object
                                                                  • 404

                                                                    Not found

                                                                    Show response object
                                                                  DELETE
                                                                  /collections/{id}/collection_products-bulk
                                                                  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"      }    ]}'
                                                                  Response
                                                                  {}

                                                                  Credits

                                                                  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.

                                                                  Endpoints
                                                                  POST
                                                                  /credit_accounts
                                                                  GET
                                                                  /credit_accounts/{id}
                                                                  PUT
                                                                  /credit_accounts/{id}
                                                                  GET
                                                                  /credit_accounts
                                                                  POST
                                                                  /credit_accounts/{id}/credit_adjustments
                                                                  GET
                                                                  /credit_accounts/{id}/credit_adjustments
                                                                  GET
                                                                  /credit_adjustments
                                                                  Expand

                                                                  The credit account object

                                                                  Attributes
                                                                  • id
                                                                    integer

                                                                    Unique numeric identifier for the Credit Account

                                                                  • customer_id
                                                                    integer

                                                                    Unique numeric identifier for thecustomer associated with thecredit_account.

                                                                  • available_balance
                                                                    string

                                                                    The dollar amount of available credit in the credit account, in the associated Store’s default currency as configured in Recharge

                                                                  • created_at
                                                                    datetime

                                                                    The date and time at which the credit account was created.

                                                                  • currency_code
                                                                    string

                                                                    The currency code for the credit account.

                                                                  • expires_at
                                                                    datetime

                                                                    The date and time at which the credit account expires, and can no longer be adjusted.

                                                                  • initial_value
                                                                    string

                                                                    The initial value of the credit account at the time of creation.

                                                                  • name
                                                                    string

                                                                    The name of the credit account

                                                                  • type
                                                                    string

                                                                    The type of the credit account. Accepted values arerewards andmanual.

                                                                  • updated_at
                                                                    datetime

                                                                    The date and time at which the credit account was last updated.

                                                                  Error related attributes
                                                                    More Attributes
                                                                      The credit account object
                                                                      {"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 credit account

                                                                      Create a new credit account.

                                                                      Scopes: write_credit_accounts
                                                                      Body Parameters
                                                                      • customer_id
                                                                        integer
                                                                        * Required

                                                                        The ID of the customer to create the credit account for.

                                                                      • expires_at
                                                                        datetime

                                                                        The date and time at which the credit account expires, and can no longer be adjusted.

                                                                      • initial_value
                                                                        string

                                                                        The initial value of the credit account at the time of creation.

                                                                      • name
                                                                        string
                                                                        * Required

                                                                        The name of the credit account.

                                                                      • type
                                                                        string
                                                                        * Required

                                                                        The type of the credit account. Accepted values arereward andmanual.

                                                                      More Parameters
                                                                        Responses
                                                                        • 200

                                                                          successful response

                                                                          Show response object
                                                                        POST
                                                                        /credit_accounts
                                                                        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'
                                                                        Response
                                                                        {"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 a credit account

                                                                        Retrieve one credit account usingcredit_account_id.

                                                                        Scopes: read_credit_accounts
                                                                        Responses
                                                                        • 200

                                                                          successful response

                                                                          Show response object
                                                                        GET
                                                                        /credit_accounts/{id}
                                                                        curl'https://api.rechargeapps.com/credit_accounts/697470' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                        Response
                                                                        {"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

                                                                        Update a credit account name, expiration date or assign to a customer.

                                                                        Scopes: write_credit_accounts
                                                                        Body Parameters
                                                                        • name
                                                                          string

                                                                          The name of the credit account.

                                                                        • customer_id
                                                                          string

                                                                          The ID of the customer to assign the credit account to.

                                                                        • expires_at
                                                                          datetime

                                                                          The date and time at which the credit account expires, and can no longer be adjusted.

                                                                        More Parameters
                                                                          Responses
                                                                          • 200

                                                                            successful response

                                                                            Show response object
                                                                          PUT
                                                                          /credit_accounts/{id}
                                                                          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'
                                                                          Response
                                                                          {"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"}}

                                                                          List credit accounts

                                                                          Return a list of credit accounts.

                                                                          Scopes: read_credit_accounts
                                                                          Query Parameters
                                                                          • customer_id
                                                                            string

                                                                            Return the list of credit accounts linked to the given Rechargecustomer_id

                                                                          • customer_ids
                                                                            string

                                                                            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

                                                                          • expires_at_min
                                                                            datetime

                                                                            Return the list of credit accounts that expire after the given date (inclusive).

                                                                          • expires_at_max
                                                                            datetime

                                                                            Return the list of credit accounts that expire before the given date (inclusive).

                                                                          • limit
                                                                            string

                                                                            The amount of results. Default is 50 while the maximum is 250.

                                                                          More Parameters
                                                                            Responses
                                                                            • 200

                                                                              successful response

                                                                              Show response object
                                                                            GET
                                                                            /credit_accounts
                                                                            curl'https://api.rechargeapps.com/credit_accounts' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                            Response
                                                                            {"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 credit adjustment

                                                                            Create a new credit adjustment for a specific credit account usingcredit_account_id.

                                                                            Scopes: write_credit_adjustments
                                                                            Body Parameters
                                                                            • amount
                                                                              string
                                                                              * Required

                                                                              The amount of the credit adjustment.

                                                                            • note
                                                                              string

                                                                              The note for the credit adjustment.

                                                                            • type
                                                                              string
                                                                              * Required

                                                                              Possible values:   debit,   credit

                                                                              The type of the credit adjustment. Accepted values aredebit andcredit.

                                                                            More Parameters
                                                                              Responses
                                                                              • 200

                                                                                successful response

                                                                                Show response object
                                                                              POST
                                                                              /credit_accounts/{id}/credit_adjustments
                                                                              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"}'
                                                                              Response
                                                                              {"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"}]}

                                                                              List Credit Adjustments for a Credit Account

                                                                              Retrieve credit adjustments associated with specific credit account usingcredit_account_id.

                                                                              Scopes: read_credit_adjustments
                                                                              Query Parameters
                                                                              • limit
                                                                                string

                                                                                The amount of results. Default is 50 while the maximum is 250.

                                                                              More Parameters
                                                                                Responses
                                                                                • 200

                                                                                  successful response

                                                                                  Show response object
                                                                                GET
                                                                                /credit_accounts/{id}/credit_adjustments
                                                                                curl'https://api.rechargeapps.com/credit_accounts/697470/credit_adjustments' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                Response
                                                                                {"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"}]}

                                                                                List credit adjustments

                                                                                Retrieve a list of credit adjustments.

                                                                                Scopes: read_credit_adjustments
                                                                                Query Parameters
                                                                                • ids
                                                                                  string

                                                                                  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

                                                                                • created_at_min
                                                                                  string

                                                                                  Return the list of credit adjustments created after the given date.

                                                                                • created_at_max
                                                                                  string

                                                                                  Return the list of credit adjustments created before the given date.

                                                                                • include
                                                                                  string

                                                                                  Only supported value iscustomer. Ifcustomer is included, the response will include the customer object.

                                                                                • limit
                                                                                  string

                                                                                  The amount of results. Default is 50 while the maximum is 250.

                                                                                • string

                                                                                  Sort the results by the given field.

                                                                                • updated_at_min
                                                                                  string

                                                                                  Return the list of credit adjustments updated after the given date.

                                                                                • updated_at_max
                                                                                  string

                                                                                  Return the list of credit adjustments updated before the given date.

                                                                                More Parameters
                                                                                  Responses
                                                                                  • 200

                                                                                    successful response

                                                                                    Show response object
                                                                                  GET
                                                                                  /credit_adjustments
                                                                                  curl'https://api.rechargeapps.com/credit_adjustments' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                  Response
                                                                                  {"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"}]}

                                                                                  Customers

                                                                                  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.

                                                                                  Endpoints
                                                                                  POST
                                                                                  /customers
                                                                                  GET
                                                                                  /customers/{id}
                                                                                  PUT
                                                                                  /customers/{id}
                                                                                  DELETE
                                                                                  /customers/{id}
                                                                                  GET
                                                                                  /customers
                                                                                  GET
                                                                                  /customers/{id}/delivery_schedule
                                                                                  GET
                                                                                  /customers/{id}/credit_summary
                                                                                  Expand

                                                                                  The customer object

                                                                                  Attributes
                                                                                  • id
                                                                                    integer

                                                                                    Unique numeric identifier for theCustomer.

                                                                                  • analytics_data
                                                                                    object

                                                                                    An object containing analytics data associated with the customer.

                                                                                    Show object attributes
                                                                                  • apply_credit_to_next_recurring_charge
                                                                                    boolean

                                                                                    A boolean that indicates whether Recharge credits will be applied to the next recurring charge.

                                                                                  • created_at
                                                                                    datetime

                                                                                    The date and time when the customer was created.

                                                                                  • email
                                                                                    string

                                                                                    The email address of the customer.

                                                                                  • external_customer_id
                                                                                    object

                                                                                    An object containing external ids for the customer record.

                                                                                    Show object attributes
                                                                                  • first_charge_processed_at
                                                                                    datetime

                                                                                    Date when first charge was processed for the customer.

                                                                                  • first_name
                                                                                    string

                                                                                    The customer’s first name.

                                                                                  • has_payment_method_in_dunning
                                                                                    boolean

                                                                                    A boolean that indicates if the customer has a payment method that is in dunning (failed charge).

                                                                                  • has_valid_payment_method
                                                                                    boolean

                                                                                    Is the payment method valid or not.

                                                                                  • hash
                                                                                    string

                                                                                    The unique string identifier used in a customers portal link.

                                                                                  • last_name
                                                                                    string

                                                                                    The customer’s last name.

                                                                                  • phone
                                                                                    string

                                                                                    The customer’s phone number.

                                                                                  • subscriptions_active_count
                                                                                    integer

                                                                                    The number of active subscriptions on addresses associated with the customer.

                                                                                  • subscriptions_total_count
                                                                                    integer

                                                                                    The total number of subscriptions created on addresses associated with the customer.

                                                                                  • subscription_related_charge_streak
                                                                                    integer

                                                                                    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.

                                                                                  • tax_exempt
                                                                                    boolean

                                                                                    Whether the customer tax exempt or not.

                                                                                  • updated_at
                                                                                    datetime

                                                                                    The date and time when the customer was last updated.

                                                                                  Error related attributes
                                                                                    More Attributes
                                                                                      The customer object
                                                                                      {"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

                                                                                      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.

                                                                                      Scopes: write_customers write_payment_methods
                                                                                      Body Parameters
                                                                                      • email
                                                                                        string
                                                                                        * Required

                                                                                        The customer’s email address.

                                                                                      • external_customer_id
                                                                                        object

                                                                                        An object containing external ids for the customer record.

                                                                                        Show object attributes
                                                                                      • first_name
                                                                                        string
                                                                                        * Required

                                                                                        The customer’s first name.

                                                                                      • last_name
                                                                                        string
                                                                                        * Required

                                                                                        The customer’s last name.

                                                                                      • phone
                                                                                        string

                                                                                        The customer’s phone number.

                                                                                      • tax_exempt
                                                                                        boolean

                                                                                        Whether or not the customer is tax exempt.

                                                                                      More Parameters
                                                                                        Responses
                                                                                        • 200

                                                                                          successful response

                                                                                          Show response object
                                                                                        POST
                                                                                        /customers
                                                                                        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"}
                                                                                        Response
                                                                                        {"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 a customer

                                                                                        Retrieve one customer usingcustomer_id.

                                                                                        Scopes: read_customers
                                                                                        Responses
                                                                                        • 200

                                                                                          successful response

                                                                                          Show response object
                                                                                        GET
                                                                                        /customers/{id}
                                                                                        curl'https://api.rechargeapps.com/customers/37657002' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                        Response
                                                                                        {"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"}}

                                                                                        Update a customer

                                                                                        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.

                                                                                        Scopes: write_customers
                                                                                        Body Parameters
                                                                                        • apply_credit_to_next_recurring_charge
                                                                                          boolean

                                                                                          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
                                                                                          string

                                                                                          Email address of the customer.

                                                                                        • external_customer_id
                                                                                          object

                                                                                          An object containing external ids for the customer record.

                                                                                          Show object attributes
                                                                                        • first_name
                                                                                          string

                                                                                          Customer’s first name.

                                                                                        • last_name
                                                                                          string

                                                                                          Customer’s last name.

                                                                                        • phone
                                                                                          string

                                                                                          The customer’s phone number.

                                                                                        • tax_exempt
                                                                                          boolean

                                                                                          Whether or not the customer is tax exempt.

                                                                                        More Parameters
                                                                                          Responses
                                                                                          • 200

                                                                                            successful response

                                                                                            Show response object
                                                                                          PUT
                                                                                          /customers/{id}
                                                                                          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"}'
                                                                                          Response
                                                                                          {"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"}}

                                                                                          Delete a customer

                                                                                          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.

                                                                                          Scopes: write_customers
                                                                                          Responses
                                                                                          • 204

                                                                                            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.

                                                                                            Show response object
                                                                                          DELETE
                                                                                          /customers/{id}
                                                                                          curl -XDELETE'https://api.rechargeapps.com/customers/37657002' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                          Response
                                                                                          {}

                                                                                          List customers

                                                                                          Return a list of customers in your store.

                                                                                          HTTP request examples



                                                                                          GET /customers

                                                                                          GET /customers?email=example@email.com

                                                                                          GET /customers?hash=143806234a9ff87a8d9e

                                                                                          GET /customers?limit=250

                                                                                          GET /customers?page=2

                                                                                          GET /customers?external_customer_id=98273498

                                                                                          If 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

                                                                                          Scopes: read_customers
                                                                                          Query Parameters
                                                                                          • email
                                                                                            string

                                                                                            Returns the user linked to the email address provided.

                                                                                          • created_at_max
                                                                                            string

                                                                                            Gets all customers created before this date.

                                                                                          • created_at_min
                                                                                            string

                                                                                            Gets all customers created after this date.

                                                                                          • hash
                                                                                            string

                                                                                            Returns the user linked to the given recharge customer hash.

                                                                                          • ids
                                                                                            string

                                                                                            Filter customers by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

                                                                                          • limit
                                                                                            string

                                                                                            Default: 50

                                                                                            Max: 250

                                                                                            Number of results.

                                                                                          • page
                                                                                            string
                                                                                            *Deprecated

                                                                                            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.

                                                                                          • external_customer_id
                                                                                            string

                                                                                            Returns the user linked to the givenexternal_customer_id.

                                                                                          • updated_at_max
                                                                                            string

                                                                                            Gets all customers updated before this date.

                                                                                          • updated_at_min
                                                                                            string

                                                                                            Gets all customers updated after this date.

                                                                                          More Parameters
                                                                                            Responses
                                                                                            • 200

                                                                                              successful response

                                                                                              Show response object
                                                                                            GET
                                                                                            /customers
                                                                                            curl'https://api.rechargeapps.com/customers' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                            Response
                                                                                            {"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"}]}

                                                                                            Retrieve a customer delivery schedule

                                                                                            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.

                                                                                            Scopes: read_customers
                                                                                            Query Parameters
                                                                                            • delivery_count_future
                                                                                              integer

                                                                                              The count of delivery objects that should be included that reference projected orders.

                                                                                              Will not return deliveries past 365 days in the future.

                                                                                            • future_interval
                                                                                              integer

                                                                                              The count of days forward to report deliveries on.

                                                                                              Defaults to store setting or 90. Maximum of 365 days.

                                                                                            • date_max
                                                                                              string

                                                                                              The end date of the requested delivery schedule.

                                                                                              Cannot be in the past. Cannot exceed 365 days in the future.

                                                                                            More Parameters
                                                                                              Responses
                                                                                              • 200

                                                                                                successful response

                                                                                                Show response object
                                                                                              GET
                                                                                              /customers/{id}/delivery_schedule
                                                                                              curl -XGET'https://api.rechargeapps.com/customers/37657002/delivery_schedule' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                              Response
                                                                                              {"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"}}]}]}}

                                                                                              Retrieve a customer's credit summary

                                                                                              Returns a credit summary for the customer.

                                                                                              Scopes: read_credit_summary
                                                                                              Responses
                                                                                              • 200

                                                                                                successful response

                                                                                                Show response object
                                                                                              GET
                                                                                              /customers/{id}/credit_summary
                                                                                              curl -XGET'https://api.rechargeapps.com/customers/37657002/credit_summary' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                              Response
                                                                                              {"credit_summary":{"customer_id":37657002,"total_available_balance":"0.00","currency_code":"USD"}}

                                                                                              Discounts

                                                                                              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.

                                                                                              Endpoints
                                                                                              POST
                                                                                              /discounts
                                                                                              GET
                                                                                              /discounts/{id}
                                                                                              PUT
                                                                                              /discounts/{id}
                                                                                              DELETE
                                                                                              /discounts/{id}
                                                                                              GET
                                                                                              /discounts
                                                                                              Expand

                                                                                              The discount object

                                                                                              Attributes
                                                                                              • id
                                                                                                integer

                                                                                                Unique numeric identifier for the discount in Recharge.

                                                                                              • applies_to
                                                                                                object

                                                                                                An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.).

                                                                                                Show object attributes
                                                                                              • channel_settings
                                                                                                object

                                                                                                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.

                                                                                                Show object attributes
                                                                                              • code
                                                                                                string

                                                                                                The code used to apply the discount.

                                                                                              • created_at
                                                                                                datetime

                                                                                                The date and time when the discount was created.

                                                                                              • ends_at
                                                                                                datetime

                                                                                                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.

                                                                                              • external_discount_id
                                                                                                object

                                                                                                An object containing external ids of the discount.

                                                                                                Show object attributes
                                                                                              • first_time_customer_restriction
                                                                                                boolean

                                                                                                Discount can be used on checkout for customer that still don’t exist in Recharge database.

                                                                                              • prerequisite_subtotal_min
                                                                                                string

                                                                                                The minimum cart subtotal needed for the discount to be applicable.

                                                                                              • starts_at
                                                                                                datetime

                                                                                                The date when the discount becomes active.

                                                                                                When not specified on creationstarts_at will default tonull which translates into no restrictions.

                                                                                              • status
                                                                                                string

                                                                                                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.

                                                                                              • usage_limits
                                                                                                object

                                                                                                An object containing limitations on a discount based on usage_counts results

                                                                                                Show object attributes
                                                                                              • updated_at
                                                                                                datetime

                                                                                                The date and time when the discount was last updated.

                                                                                              • value
                                                                                                string

                                                                                                The discounted value to be applied.

                                                                                              • value_type
                                                                                                string

                                                                                                Possible values:   fixed_amount,   percentage,   shipping

                                                                                                Type of discount mechanic.

                                                                                              Error related attributes
                                                                                                More Attributes
                                                                                                  The discount object
                                                                                                  {"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 discount

                                                                                                  Create a new discount.

                                                                                                  Body Parameters
                                                                                                  • applies_to
                                                                                                    object

                                                                                                    An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.)

                                                                                                    Show object attributes
                                                                                                  • channel_settings
                                                                                                    object

                                                                                                    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).

                                                                                                    Show object attributes
                                                                                                  • code
                                                                                                    string
                                                                                                    * Required

                                                                                                    The code used to apply the discount.

                                                                                                  • ends_at
                                                                                                    datetime

                                                                                                    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.

                                                                                                  • prerequisite_subtotal_min
                                                                                                    integer

                                                                                                    The minimum cart subtotal needed for the discount to be applicable.

                                                                                                  • starts_at
                                                                                                    datetime

                                                                                                    The date when the discount becomesACTIVE.

                                                                                                    When not specified on creationstarts_at will default tonull which translates into no restrictions.

                                                                                                  • status
                                                                                                    string

                                                                                                    Possible values:   enabled,   disabled,   fully_disabled

                                                                                                    The status of the discount.

                                                                                                  • usage_limits
                                                                                                    object

                                                                                                    Sets the limit on the number of times a discount can be used by all customers.

                                                                                                    Show object attributes
                                                                                                  • value
                                                                                                    string
                                                                                                    * Required

                                                                                                    The discounted value to be applied.

                                                                                                  • value_type
                                                                                                    string
                                                                                                    * Required

                                                                                                    Possible values:   fixed_amount,   percentage,   shipping

                                                                                                    The discount type.

                                                                                                  More Parameters
                                                                                                    Responses
                                                                                                    • 201

                                                                                                      successful response

                                                                                                      Show response object
                                                                                                    POST
                                                                                                    /discounts
                                                                                                    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"}'
                                                                                                    Response
                                                                                                    {"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 discount

                                                                                                    Retrieve a single Recharge Discount

                                                                                                    Responses
                                                                                                    • 200

                                                                                                      successful response

                                                                                                      Show response object
                                                                                                    GET
                                                                                                    /discounts/{id}
                                                                                                    curl'https://api.rechargeapps.com/discounts/1234567' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                    Response
                                                                                                    {"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"}}

                                                                                                    Update a discount

                                                                                                    You can modify an existing discount to match the specified parameters.

                                                                                                    Body Parameters
                                                                                                    • applies_to
                                                                                                      object

                                                                                                      An object encompassing data that limits discount application on the basis of an associated record (such as customer, products, etc.)

                                                                                                      Show object attributes
                                                                                                    • channel_settings
                                                                                                      object

                                                                                                      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).

                                                                                                      Show object attributes
                                                                                                    • code
                                                                                                      string

                                                                                                      The code used to apply the discount…

                                                                                                    • ends_at
                                                                                                      datetime

                                                                                                      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.

                                                                                                    • prerequisite_subtotal_min
                                                                                                      integer

                                                                                                      The minimum cart subtotal needed for the discount to be applicable.

                                                                                                    • starts_at
                                                                                                      datetime

                                                                                                      The date when the discount becomes active.

                                                                                                    • status
                                                                                                      string

                                                                                                      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.

                                                                                                    • usage_limits
                                                                                                      object

                                                                                                      Sets the limit on the number of times a discount can be used by all customers.

                                                                                                      Show object attributes
                                                                                                    • value
                                                                                                      string

                                                                                                      The discounted value to be applied.

                                                                                                    • value_type
                                                                                                      string

                                                                                                      Possible values:   fixed_amount,   percentage,   shipping

                                                                                                      The discount type.

                                                                                                    More Parameters
                                                                                                      Responses
                                                                                                      • 200

                                                                                                        successful response

                                                                                                        Show response object
                                                                                                      PUT
                                                                                                      /discounts/{id}
                                                                                                      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"}'
                                                                                                      Response
                                                                                                      {"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

                                                                                                      Delete a discount
                                                                                                      For safety reasons, to delete a discount you will need to set its status tofully_disabled.

                                                                                                      Responses
                                                                                                      • 204

                                                                                                        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.

                                                                                                        Show response object
                                                                                                      DELETE
                                                                                                      /discounts/{id}
                                                                                                      curl -XDELETE'https://api.rechargeapps.com/discounts/12081717' \  -H'X-Recharge-Access-Token: your_api_token' \  -H'X-Recharge-Version: 2021-11'
                                                                                                      Response
                                                                                                      {}

                                                                                                      List discounts

                                                                                                      Return a list of discounts in your store.

                                                                                                      HTTP request examples


                                                                                                      GET /discounts

                                                                                                      GET /discounts?created_at_max=2017-10-01

                                                                                                      GET /discounts?created_at_max=2017-10-01

                                                                                                      GET /discounts?created_at_min=2017-10-01

                                                                                                      GET /discounts?discount_code=Discount

                                                                                                      GET /discounts?discount_type=percentage

                                                                                                      GET /discounts?updated_at_min=2017-10-01

                                                                                                      Query Parameters
                                                                                                      • created_at_max
                                                                                                        string

                                                                                                        Get all discounts created before a specified date.

                                                                                                      • created_at_min
                                                                                                        string

                                                                                                        Get all discounts created after a specified date.

                                                                                                      • discount_code
                                                                                                        string

                                                                                                        Search for a particular discount code.

                                                                                                      • value_type
                                                                                                        string

                                                                                                        Possible values:   percentage,   fixed_amount,   shipping

                                                                                                        Filter based on type of discount.

                                                                                                      • ids
                                                                                                        string

                                                                                                        Filter discounts by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

                                                                                                      • limit
                                                                                                        string

                                                                                                        Default: 50

                                                                                                        Max: 250

                                                                                                        Number of results to return.

                                                                                                      • page
                                                                                                        string
                                                                                                        *Deprecated

                                                                                                        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.

                                                                                                      • status
                                                                                                        string

                                                                                                        Possible values:   enabled,   disabled,   fully_disabled

                                                                                                        Returns all discounts with statusenabled,disabled orfully_disabled.

                                                                                                      • updated_at_max
                                                                                                        string

                                                                                                        Get all discounts updated before a specified date.

                                                                                                      • updated_at_min
                                                                                                        string

                                                                                                        Get all discounts updated after a specified date.

                                                                                                      More Parameters
                                                                                                        Responses
                                                                                                        • 200

                                                                                                          successful response

                                                                                                          Show response object
                                                                                                        GET
                                                                                                        /discounts
                                                                                                        curl -XGET'https://api.rechargeapps.com/discounts' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                        Response
                                                                                                        {"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

                                                                                                        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.

                                                                                                        Endpoints
                                                                                                        POST
                                                                                                        /metafields
                                                                                                        GET
                                                                                                        /metafields/{id}
                                                                                                        PUT
                                                                                                        /metafields/{id}
                                                                                                        DELETE
                                                                                                        /metafields/{id}
                                                                                                        GET
                                                                                                        /metafields
                                                                                                        Expand

                                                                                                        The metafield object

                                                                                                        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.

                                                                                                        Attributes
                                                                                                        • id
                                                                                                          integer

                                                                                                          Unique numeric identifier for the metafield.

                                                                                                        • created_at
                                                                                                          datetime

                                                                                                          The date and time when the metafield was created.

                                                                                                        • description
                                                                                                          string

                                                                                                          Description of the metafield.

                                                                                                        • key
                                                                                                          string

                                                                                                          The name of the metafield.

                                                                                                        • namespace
                                                                                                          string

                                                                                                          A category or container that differentiates your metadata from other metafields.

                                                                                                        • owner_id
                                                                                                          string

                                                                                                          Unique numeric identifier of theowner_resource.

                                                                                                        • owner_resource
                                                                                                          string

                                                                                                          Possible values:   address,   store,   customer,   subscription,   order,   charge

                                                                                                          Objects which supportMetafields

                                                                                                        • updated_at
                                                                                                          datetime

                                                                                                          The date and time when the metafield was last updated.

                                                                                                        • value
                                                                                                          string

                                                                                                          The content of the metafield.

                                                                                                        • value_type
                                                                                                          string

                                                                                                          Possible values:   string,   integer,   json_string

                                                                                                          The type of the value parameter.

                                                                                                        Error related attributes
                                                                                                          More Attributes
                                                                                                            The metafield object
                                                                                                            {"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"}}

                                                                                                            Create a metafield

                                                                                                            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.

                                                                                                            Scopes: WRITE_{target_resource}
                                                                                                            Body Parameters
                                                                                                            • description
                                                                                                              string

                                                                                                              Description of the metafield.

                                                                                                            • key
                                                                                                              string
                                                                                                              * Required

                                                                                                              The name of the metafield.

                                                                                                            • namespace
                                                                                                              string
                                                                                                              * Required

                                                                                                              A category or container that differentiates your metadata from other metafields.

                                                                                                            • owner_id
                                                                                                              string
                                                                                                              * Required

                                                                                                              Unique numeric identifier of the owner resource.

                                                                                                            • owner_resource
                                                                                                              string
                                                                                                              * Required

                                                                                                              Possible values:   address,   store,   customer,   subscription,   order,   charge

                                                                                                              The owner of the resource.

                                                                                                            • value
                                                                                                              string
                                                                                                              * Required

                                                                                                              The content of the metafield.

                                                                                                            • value_type
                                                                                                              string
                                                                                                              * Required

                                                                                                              Possible values:   string,   integer,   json_string

                                                                                                              The type of the value parameter.

                                                                                                            More Parameters
                                                                                                              Responses
                                                                                                              • 200

                                                                                                                successful response

                                                                                                                Show response object
                                                                                                              POST
                                                                                                              /metafields
                                                                                                              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"  }}'
                                                                                                              Response
                                                                                                              {"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"}}

                                                                                                              Retrieve a metafield

                                                                                                              Retrieves a single metafield based on a specified id.

                                                                                                              HTTP request examples


                                                                                                              GET /metafields/<metafield_id>

                                                                                                              In addition to that, you can retrieve them bysubscription_id by using:

                                                                                                              GET /metafields?owner_resource=subscription&owner_id=<subscription_id>

                                                                                                              Scopes: read_{target_resource}
                                                                                                              Responses
                                                                                                              • 200

                                                                                                                successful response

                                                                                                                Show response object
                                                                                                              GET
                                                                                                              /metafields/{id}
                                                                                                              curl'https://api.rechargeapps.com/metafields/33' \  -H'X-Recharge-Access-Token: your_api_token' \  -H'X-Recharge-Version: 2021-11'
                                                                                                              Response
                                                                                                              {"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"}}

                                                                                                              Update a metafield

                                                                                                              Updates a metafield based on a specifiedowner_resource.

                                                                                                              Scopes: write_{target_resource}
                                                                                                              Body Parameters
                                                                                                              • description
                                                                                                                string

                                                                                                                Description of the metafield.

                                                                                                              • owner_id
                                                                                                                string

                                                                                                                Unique numeric identifier of the resource.

                                                                                                              • owner_resource
                                                                                                                string

                                                                                                                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.

                                                                                                              • value
                                                                                                                string

                                                                                                                The content of the metafield.

                                                                                                              • value_type
                                                                                                                string

                                                                                                                Possible values:   string,   integer,   json_string

                                                                                                                The type of the value parameter.

                                                                                                              More Parameters
                                                                                                                Responses
                                                                                                                • 201

                                                                                                                  OK: The request was successful, created a new resource, and resource created is in the body.

                                                                                                                  Show response object
                                                                                                                PUT
                                                                                                                /metafields/{id}
                                                                                                                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"  }}'
                                                                                                                Response
                                                                                                                {"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

                                                                                                                Delete a metafield based on a specified id.

                                                                                                                Scopes: write_{target_resource}
                                                                                                                Responses
                                                                                                                • 204

                                                                                                                  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.

                                                                                                                  Show response object
                                                                                                                DELETE
                                                                                                                /metafields/{id}
                                                                                                                curl -XDELETE'https://api.rechargeapps.com/metafields/6' \  -H'X-Recharge-Access-Token: your_api_token' \  -H'X-Recharge-Version: 2021-11'
                                                                                                                Response
                                                                                                                {}

                                                                                                                List metafields

                                                                                                                Retrieves a list of metafields.

                                                                                                                HTTP request examples


                                                                                                                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>

                                                                                                                When getting metafields, you must specify owner_resource in the URL. It can beaddress,store,customer,subscription,order,charge

                                                                                                                You can list metafields that are created for all subscription objects using:

                                                                                                                GET /metafields?owner_resource=subscription -**owner_id** in the response will be the ID of the subscription.

                                                                                                                Scopes: read_{target_resource}
                                                                                                                Query Parameters
                                                                                                                • limit
                                                                                                                  string

                                                                                                                  Default: 50

                                                                                                                  Max: 250

                                                                                                                  Amount of results.
                                                                                                                  (default:50) (maximum: 250).

                                                                                                                • namespace
                                                                                                                  string

                                                                                                                  A category or container that differentiates your metadata from other metafields.

                                                                                                                • owner_id
                                                                                                                  string

                                                                                                                  Unique numeric identifier of the owner resource.

                                                                                                                • owner_resource
                                                                                                                  string

                                                                                                                  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.

                                                                                                                • page
                                                                                                                  string
                                                                                                                  *Deprecated

                                                                                                                  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.

                                                                                                                More Parameters
                                                                                                                  Responses
                                                                                                                  • 200

                                                                                                                    successful response

                                                                                                                    Show response object
                                                                                                                  GET
                                                                                                                  /metafields
                                                                                                                  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
                                                                                                                  Response
                                                                                                                  {"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"}]}

                                                                                                                  Notifications

                                                                                                                  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.

                                                                                                                  Endpoints
                                                                                                                  POST
                                                                                                                  /customers/{id}/notifications
                                                                                                                  Expand

                                                                                                                  Send email notification

                                                                                                                  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.

                                                                                                                  Scopes: write_notifications
                                                                                                                  Body Parameters
                                                                                                                  • type
                                                                                                                    integer
                                                                                                                    * Required

                                                                                                                    Identifies the type of the notifications. Value can be email only.

                                                                                                                  • template_type
                                                                                                                    string
                                                                                                                    * Required

                                                                                                                    Possible values:   upcoming_charge,   get_account_access,   shopify_update_payment_information

                                                                                                                    Identifies the type of the email notifications.

                                                                                                                  • template_vars
                                                                                                                    object

                                                                                                                    An object containing the necessary template variables for this email template type.

                                                                                                                    Show object attributes
                                                                                                                  More Parameters
                                                                                                                    Responses
                                                                                                                    • 200

                                                                                                                      successful response

                                                                                                                      Show response object
                                                                                                                    POST
                                                                                                                    /customers/{id}/notifications
                                                                                                                    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  }}'
                                                                                                                    Response
                                                                                                                    {}

                                                                                                                    Onetimes

                                                                                                                    Onetimes represent non-recurring line items on aQUEUEDCharge.

                                                                                                                    Endpoints
                                                                                                                    POST
                                                                                                                    /onetimes
                                                                                                                    GET
                                                                                                                    /onetimes/{id}
                                                                                                                    PUT
                                                                                                                    /onetimes/{id}
                                                                                                                    DELETE
                                                                                                                    /onetimes/{id}
                                                                                                                    GET
                                                                                                                    /onetimes
                                                                                                                    Expand

                                                                                                                    The onetime object

                                                                                                                    Attributes
                                                                                                                    • id
                                                                                                                      integer

                                                                                                                      Unique numeric identifier for theOnetime purchase.

                                                                                                                    • address_id
                                                                                                                      integer

                                                                                                                      Unique numeric identifier for the address theOnetime Purchase is associated with (cannot be used withnext_charge_scheduled_at)

                                                                                                                    • created_at
                                                                                                                      datetime

                                                                                                                      The time theOnetime item was first created.

                                                                                                                    • customer_id
                                                                                                                      integer

                                                                                                                      Unique numeric identifier for the customer theOnetime purchase is tied to.

                                                                                                                    • external_product_id
                                                                                                                      string

                                                                                                                      An object containing the product id as it appears in external platforms.

                                                                                                                      Show object attributes
                                                                                                                    • external_variant_id
                                                                                                                      string

                                                                                                                      An object containing the variant id as it appears in external platforms.

                                                                                                                      Show object attributes
                                                                                                                    • is_cancelled
                                                                                                                      boolean

                                                                                                                      Flag indicating if the the onetime is cancelled.

                                                                                                                    • next_charge_scheduled_at
                                                                                                                      datetime

                                                                                                                      Date of theOnetime purchase execution.

                                                                                                                      Cannot be used withadd_to_next_charge

                                                                                                                    • price
                                                                                                                      string

                                                                                                                      The price of the item before discounts, taxes, or shipping have been applied.

                                                                                                                    • product_title
                                                                                                                      string

                                                                                                                      The name of the product in a shop’s catalog.

                                                                                                                    • properties
                                                                                                                      array

                                                                                                                      An array containing key value pairs for any supplementary data.

                                                                                                                      Show object attributes
                                                                                                                    • quantity
                                                                                                                      integer

                                                                                                                      The number of items in theOnetime purchase.

                                                                                                                    • sku
                                                                                                                      string

                                                                                                                      A unique identifier of the item in the fulfillment.

                                                                                                                    • sku_override
                                                                                                                      boolean

                                                                                                                      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.

                                                                                                                    • updated_at
                                                                                                                      string

                                                                                                                      The time theOnetime purchase was last updated.

                                                                                                                    • variant_title
                                                                                                                      string

                                                                                                                      The name of the variant in a shop’s catalog.

                                                                                                                    Error related attributes
                                                                                                                      More Attributes
                                                                                                                        The onetime object
                                                                                                                        {"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 onetime

                                                                                                                        Create a newOnetime.

                                                                                                                        Scopes: write_subscriptions
                                                                                                                        Body Parameters
                                                                                                                        • address_id
                                                                                                                          integer
                                                                                                                          * Required

                                                                                                                          Unique numeric identifier for the address the one time purchase is associated with.

                                                                                                                        • add_to_next_charge
                                                                                                                          boolean

                                                                                                                          Instructs to add theOnetime to the next charge scheduled under thisAddress.

                                                                                                                        • external_product_id
                                                                                                                          object

                                                                                                                          Unique numeric identifier of the product in external platform.

                                                                                                                          Show object attributes
                                                                                                                        • external_variant_id
                                                                                                                          object
                                                                                                                          * Required

                                                                                                                          Unique numeric identifier of the product variant in external platform.

                                                                                                                          Show object attributes
                                                                                                                        • next_charge_scheduled_at
                                                                                                                          datetime
                                                                                                                          * Required

                                                                                                                          This will set the charge date of a new Onetime purchase.

                                                                                                                          Cannot be used withadd_to_next_charge

                                                                                                                        • price
                                                                                                                          string

                                                                                                                          The price of the product.

                                                                                                                        • product_title
                                                                                                                          string

                                                                                                                          The name of the product.

                                                                                                                        • properties
                                                                                                                          string

                                                                                                                          List of properties.

                                                                                                                        • quantity
                                                                                                                          integer
                                                                                                                          * Required

                                                                                                                          The quantity of the product.

                                                                                                                        • sku
                                                                                                                          string

                                                                                                                          A unique identifier of the item in the fulfillment.

                                                                                                                        More Parameters
                                                                                                                          Responses
                                                                                                                          • 201

                                                                                                                            OK: The request was successful, created a new resource, and resource created is in the body.

                                                                                                                            Show response object
                                                                                                                          POST
                                                                                                                          /onetimes
                                                                                                                          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"  }}'
                                                                                                                          Response
                                                                                                                          {"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

                                                                                                                          Retrieve a Onetime.

                                                                                                                          Scopes: read_subscriptions
                                                                                                                          Responses
                                                                                                                          • 200

                                                                                                                            successful response

                                                                                                                            Show response object
                                                                                                                          GET
                                                                                                                          /onetimes/{id}
                                                                                                                          curl'https://api.rechargeapps.com/onetimes/16909886' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                          Response
                                                                                                                          {"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 a onetime

                                                                                                                          Update an existingOnetime item.

                                                                                                                          Scopes: write_subscriptions
                                                                                                                          Body Parameters
                                                                                                                          • address_id
                                                                                                                            integer

                                                                                                                            Unique numeric identifier for the address theOnetime Purchase is associated with (cannot be used withnext_charge_scheduled_at)

                                                                                                                          • next_charge_scheduled_at
                                                                                                                            datetime

                                                                                                                            This will set the charge date of a newOnetime purchase.

                                                                                                                          • price
                                                                                                                            string

                                                                                                                            The price of the product.

                                                                                                                          • product_title
                                                                                                                            string

                                                                                                                            The name of the product.

                                                                                                                          • properties
                                                                                                                            array

                                                                                                                            List of properties.

                                                                                                                            Show object attributes
                                                                                                                          • quantity
                                                                                                                            integer

                                                                                                                            The quantity of the product.

                                                                                                                          • external_variant_id
                                                                                                                            object

                                                                                                                            Unique numeric identifier of the product variant.

                                                                                                                            Show object attributes
                                                                                                                          • sku
                                                                                                                            string

                                                                                                                            A unique alphanumeric identifier of the item in the fulfillment.

                                                                                                                          • variant_title
                                                                                                                            string

                                                                                                                            The name of the product variant.

                                                                                                                          More Parameters
                                                                                                                            Responses
                                                                                                                            • 200

                                                                                                                              successful response

                                                                                                                              Show response object
                                                                                                                            PUT
                                                                                                                            /onetimes/{id}
                                                                                                                            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}'
                                                                                                                            Response
                                                                                                                            {"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 a onetime

                                                                                                                            Delete aOnetime.

                                                                                                                            Scopes: write_subscriptions
                                                                                                                            Responses
                                                                                                                            • 204

                                                                                                                              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.

                                                                                                                              Show response object
                                                                                                                            DELETE
                                                                                                                            /onetimes/{id}
                                                                                                                            curl -XDELETE'https://api.rechargeapps.com/onetimes/16665185' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                            Response
                                                                                                                            {}

                                                                                                                            List onetimes

                                                                                                                            Returns a list of allOnetime products from store.

                                                                                                                            Scopes: read_subscriptions
                                                                                                                            Query Parameters
                                                                                                                            • address_id
                                                                                                                              string

                                                                                                                              Return the onetimes linked to the givenaddress_id.

                                                                                                                            • address_ids
                                                                                                                              string

                                                                                                                              Return the onetimes linked to the given comma-separated list ofaddress_ids.

                                                                                                                            • created_at_max
                                                                                                                              datetime

                                                                                                                              Return the onetimes created before the given date.

                                                                                                                            • created_at_min
                                                                                                                              datetime

                                                                                                                              Return the onetimes created after the given date.

                                                                                                                            • customer_id
                                                                                                                              string

                                                                                                                              Return the onetimes linked to the given Rechargecustomer_id.

                                                                                                                            • include_cancelled
                                                                                                                              boolean

                                                                                                                              Iftrue the response will include the cancelledOnetimes as well as the others.

                                                                                                                            • limit
                                                                                                                              string

                                                                                                                              Default: 50

                                                                                                                              Max: 250

                                                                                                                              The number of results.

                                                                                                                            • page
                                                                                                                              string
                                                                                                                              *Deprecated

                                                                                                                              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.

                                                                                                                            • external_variant_id
                                                                                                                              string

                                                                                                                              Return the one time purchases linked to the given external platform productvariant_id.

                                                                                                                            • updated_at_max
                                                                                                                              datetime

                                                                                                                              Return the onetimes updated before the given date.

                                                                                                                            • updated_at_min
                                                                                                                              datetime

                                                                                                                              Return the onetimes updated after the given date.

                                                                                                                            • ids
                                                                                                                              array

                                                                                                                              Comma-separated list of one time purchase ids to filter.

                                                                                                                            More Parameters
                                                                                                                              Responses
                                                                                                                              • 200

                                                                                                                                successful response

                                                                                                                                Show response object
                                                                                                                              GET
                                                                                                                              /onetimes
                                                                                                                              curl'https://api.rechargeapps.com/onetimes' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                                                              Response
                                                                                                                              {"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"}]}

                                                                                                                              Orders

                                                                                                                              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.

                                                                                                                              Endpoints
                                                                                                                              GET
                                                                                                                              /orders/{id}
                                                                                                                              POST
                                                                                                                              /orders/{id}/clone
                                                                                                                              POST
                                                                                                                              /orders/{id}/delay
                                                                                                                              PUT
                                                                                                                              /orders/{id}
                                                                                                                              DELETE
                                                                                                                              /orders/{id}
                                                                                                                              GET
                                                                                                                              /orders
                                                                                                                              Expand

                                                                                                                              The order object

                                                                                                                              Attributes
                                                                                                                              • id
                                                                                                                                integer

                                                                                                                                The unique numeric identifier for the order.

                                                                                                                              • address_id
                                                                                                                                integer

                                                                                                                                The id of the associatedAddress within Recharge.

                                                                                                                              • billing_address
                                                                                                                                object

                                                                                                                                The billing address at the time the order was created. SeeAddresses for detailed address information.

                                                                                                                                Show object attributes
                                                                                                                              • charge
                                                                                                                                object

                                                                                                                                An object containing parameters of theCharge.

                                                                                                                                Show object attributes
                                                                                                                              • client_details
                                                                                                                                object

                                                                                                                                Details of the access method used by the purchase.

                                                                                                                                Show object attributes
                                                                                                                              • created_at
                                                                                                                                datetime

                                                                                                                                The date when the order was created.

                                                                                                                              • currency
                                                                                                                                string

                                                                                                                                The currency of the payment used to create the order.

                                                                                                                              • customer
                                                                                                                                object

                                                                                                                                Object that contains information about theCustomer.

                                                                                                                                Show object attributes
                                                                                                                              • discounts
                                                                                                                                array

                                                                                                                                An array ofDiscounts associated with theOrder.

                                                                                                                                Show object attributes
                                                                                                                              • external_cart_token
                                                                                                                                string

                                                                                                                                The cart token as it appears in an external system.

                                                                                                                              • external_order_id
                                                                                                                                object

                                                                                                                                An object containing external order ids.

                                                                                                                                Show object attributes
                                                                                                                              • external_order_number

                                                                                                                                An object containing the external order numbers.

                                                                                                                                Show object attributes
                                                                                                                              • is_prepaid
                                                                                                                                boolean

                                                                                                                                A boolean representing if thisOrder is generated from a prepaid purchase.

                                                                                                                              • line_items
                                                                                                                                array

                                                                                                                                A list ofline_item objects.

                                                                                                                                Show object attributes
                                                                                                                              • note
                                                                                                                                string

                                                                                                                                Notes associated with theOrder.

                                                                                                                              • order_attributes
                                                                                                                                array

                                                                                                                                An array of name value pairs of note attributes on theOrder.

                                                                                                                                Show object attributes
                                                                                                                              • processed_at
                                                                                                                                datetime

                                                                                                                                The date time that the associated charge was processed at.

                                                                                                                              • scheduled_at
                                                                                                                                datetime

                                                                                                                                The date time of when the associated charge is/was scheduled to process.

                                                                                                                              • shipping_address
                                                                                                                                object

                                                                                                                                The shipping address where the order will be shipped. SeeAddresses for detailedAddress information.

                                                                                                                                Show object attributes
                                                                                                                              • shipping_lines
                                                                                                                                array

                                                                                                                                An array of shipping lines associated with the order.

                                                                                                                                Show object attributes
                                                                                                                              • status
                                                                                                                                string

                                                                                                                                Possible values:   success,   error,   queued,   cancelled

                                                                                                                                The status of creating theOrder.

                                                                                                                              • subtotal_price
                                                                                                                                string

                                                                                                                                The subtotal price (sum of all line items * their quantity) of the order less discounts.

                                                                                                                              • tags
                                                                                                                                string

                                                                                                                                A comma separated list of tags on theOrder.

                                                                                                                              • tax_lines
                                                                                                                                array

                                                                                                                                An array of tax lines that apply to theOrder.

                                                                                                                                Show object attributes
                                                                                                                              • taxable
                                                                                                                                boolean

                                                                                                                                A boolean indicator of the taxability of theOrder.

                                                                                                                              • total_discounts
                                                                                                                                string

                                                                                                                                The total discounted dollar value of theOrder.

                                                                                                                              • total_duties
                                                                                                                                string

                                                                                                                                The total cost of duties for the order.

                                                                                                                              • total_line_items_price
                                                                                                                                integer

                                                                                                                                The total price of all line items of theOrder.

                                                                                                                              • total_price
                                                                                                                                string

                                                                                                                                The total amount due of theOrder.

                                                                                                                              • total_refunds
                                                                                                                                string

                                                                                                                                The total dollar amount of refunds associated with theOrder.

                                                                                                                              • total_tax
                                                                                                                                string

                                                                                                                                The total tax due associated with theOrder.

                                                                                                                              • total_weight_grams
                                                                                                                                integer

                                                                                                                                The total weight of the order in grams.

                                                                                                                              • type
                                                                                                                                string

                                                                                                                                Possible values:   checkout,   recurring

                                                                                                                                An indicator of the order’s type.

                                                                                                                              • updated_at
                                                                                                                                datetime

                                                                                                                                The date time at which the order was most recently updated.

                                                                                                                              Error related attributes
                                                                                                                                More Attributes
                                                                                                                                  The order object
                                                                                                                                  {"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 an order

                                                                                                                                  Retrieve oneOrder using the Rechargeorder_id.

                                                                                                                                  Scopes: read_orders
                                                                                                                                  Responses
                                                                                                                                  • 200

                                                                                                                                    successful response

                                                                                                                                    Show response object
                                                                                                                                  GET
                                                                                                                                  /orders/{id}
                                                                                                                                  curl'https://api.rechargeapps.com/orders/70071255' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                  Response
                                                                                                                                  {"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"}}

                                                                                                                                  Clone an order

                                                                                                                                  You may add additionalOrders onto a successCharge if it has existing prepaidOrders by cloning an existingOrder.

                                                                                                                                  Scopes: write_orders
                                                                                                                                  Body Parameters
                                                                                                                                  • scheduled_at
                                                                                                                                    datetime
                                                                                                                                    * Required

                                                                                                                                    Date in future when this order will be sent.

                                                                                                                                  More Parameters
                                                                                                                                    Responses
                                                                                                                                    • 201

                                                                                                                                      OK: The request was successful, created a new resource, and resource created is in the body.

                                                                                                                                      Show response object
                                                                                                                                    POST
                                                                                                                                    /orders/{id}/clone
                                                                                                                                    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"}'
                                                                                                                                    Response
                                                                                                                                    {"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 an order

                                                                                                                                    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.

                                                                                                                                    Scopes: write_orders
                                                                                                                                    Responses
                                                                                                                                    • 200

                                                                                                                                      successful response

                                                                                                                                      Show response object
                                                                                                                                    POST
                                                                                                                                    /orders/{id}/delay
                                                                                                                                    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'
                                                                                                                                    Response
                                                                                                                                    {"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"}}

                                                                                                                                    Update an order

                                                                                                                                    Updating existingOrder using theorder_id.

                                                                                                                                    Scopes: write_orders
                                                                                                                                    Body Parameters
                                                                                                                                    • billing_address
                                                                                                                                      object

                                                                                                                                      Billing address details.

                                                                                                                                      Show object attributes
                                                                                                                                    • customer
                                                                                                                                      object

                                                                                                                                      The key values related with customer.

                                                                                                                                      Show object attributes
                                                                                                                                    • line_items
                                                                                                                                      array

                                                                                                                                      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.

                                                                                                                                      Show object attributes
                                                                                                                                    • external_order_id
                                                                                                                                      object

                                                                                                                                      An object containing external order ids.

                                                                                                                                      Show object attributes
                                                                                                                                    • scheduled_at
                                                                                                                                      datetime

                                                                                                                                      The date when the order will be shipped.

                                                                                                                                    • shipping_address
                                                                                                                                      object

                                                                                                                                      Shipping address details.

                                                                                                                                      Show object attributes
                                                                                                                                    • status
                                                                                                                                      string

                                                                                                                                      Possible values:   success,   error,   queued,   cancelled

                                                                                                                                      The status of the order

                                                                                                                                    More Parameters
                                                                                                                                      Responses
                                                                                                                                      • 200

                                                                                                                                        successful response

                                                                                                                                        Show response object
                                                                                                                                      PUT
                                                                                                                                      /orders/{id}
                                                                                                                                      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" }}'
                                                                                                                                      Response
                                                                                                                                      {"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"}}

                                                                                                                                      Delete an order

                                                                                                                                      You can delete a scheduled order.

                                                                                                                                      Scopes: write_orders
                                                                                                                                      Responses
                                                                                                                                      • 204

                                                                                                                                        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.

                                                                                                                                        Show response object
                                                                                                                                      DELETE
                                                                                                                                      /orders/{id}
                                                                                                                                      curl -XDELETE'https://api.rechargeapps.com/orders/70071255' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                      Response
                                                                                                                                      {}

                                                                                                                                      List orders

                                                                                                                                      Returns a list of orders.

                                                                                                                                      HTTP request examples


                                                                                                                                      GET /orders

                                                                                                                                      GET /orders?customer_id=123

                                                                                                                                      GET /orders?address_id=4587216

                                                                                                                                      GET /orders?charge_id=45678542

                                                                                                                                      GET /orders?created_at_min=2016-05-18&created_at_max=2016-06-18

                                                                                                                                      Scopes: read_orders
                                                                                                                                      Query Parameters
                                                                                                                                      • address_id
                                                                                                                                        string

                                                                                                                                        Filter orders by address.

                                                                                                                                        GET /orders/?address_id=123 will return all orders for the givenaddress_id.

                                                                                                                                      • charge_id
                                                                                                                                        string

                                                                                                                                        Filter orders by charge.

                                                                                                                                        GET /orders/?charge_id=123 will return all orders for the givencharge_id.

                                                                                                                                      • created_at_max
                                                                                                                                        datetime

                                                                                                                                        Show orders created before the given date.

                                                                                                                                      • created_at_min
                                                                                                                                        datetime

                                                                                                                                        Show orders created after the given date.

                                                                                                                                      • customer_id
                                                                                                                                        string

                                                                                                                                        Filter orders by customer.

                                                                                                                                        GET /orders/?customer_id=123 will return all orders for the givencustomer_id

                                                                                                                                      • external_customer_id
                                                                                                                                        string

                                                                                                                                        Filter orders by external_customer_id.

                                                                                                                                      • external_order_id
                                                                                                                                        string

                                                                                                                                        Filter orders by external_order_id.

                                                                                                                                      • ids
                                                                                                                                        string

                                                                                                                                        Filter orders by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

                                                                                                                                      • limit
                                                                                                                                        string

                                                                                                                                        Default: 50

                                                                                                                                        Max: 250

                                                                                                                                        The number of results.

                                                                                                                                      • page
                                                                                                                                        string
                                                                                                                                        *Deprecated

                                                                                                                                        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.

                                                                                                                                      • scheduled_at_max
                                                                                                                                        datetime

                                                                                                                                        Show orders scheduled before the given date.

                                                                                                                                      • scheduled_at_min
                                                                                                                                        datetime

                                                                                                                                        Show orders scheduled after the given date.

                                                                                                                                      • has_external_order
                                                                                                                                        string

                                                                                                                                        Filter orders with/without external_order_id.

                                                                                                                                      • status
                                                                                                                                        string

                                                                                                                                        Possible values:   success,   queued,   error,   refunded,   skipped

                                                                                                                                        Filter orders by status.

                                                                                                                                      • type
                                                                                                                                        string

                                                                                                                                        Possible values:   checkout,   recurring

                                                                                                                                        Filter orders by type.

                                                                                                                                        GET /api/orders/?type=recurring will return all orders for the given type.

                                                                                                                                      • purchase_item_id
                                                                                                                                        string

                                                                                                                                        Filter orders by subscription or onetime.

                                                                                                                                      • updated_at_max
                                                                                                                                        datetime

                                                                                                                                        Show orders updated before the given date.

                                                                                                                                      • updated_at_min
                                                                                                                                        datetime

                                                                                                                                        Show orders updated after the given date.

                                                                                                                                      More Parameters
                                                                                                                                        Responses
                                                                                                                                        • 200

                                                                                                                                          successful response

                                                                                                                                          Show response object
                                                                                                                                        GET
                                                                                                                                        /orders
                                                                                                                                        curl'https://api.rechargeapps.com/orders' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d'limit=3' -G
                                                                                                                                        Response
                                                                                                                                        {"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"}]}

                                                                                                                                        Payment methods

                                                                                                                                        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.

                                                                                                                                        Endpoints
                                                                                                                                        POST
                                                                                                                                        /payment_methods
                                                                                                                                        GET
                                                                                                                                        /payment_methods/{id}
                                                                                                                                        PUT
                                                                                                                                        /payment_methods/{id}
                                                                                                                                        DELETE
                                                                                                                                        /payment_methods/{id}
                                                                                                                                        GET
                                                                                                                                        /payment_methods
                                                                                                                                        Expand

                                                                                                                                        The payment method object

                                                                                                                                        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.

                                                                                                                                        Attributes
                                                                                                                                        • id
                                                                                                                                          integer

                                                                                                                                          The unique payment method id for a customer.

                                                                                                                                        • customer_id
                                                                                                                                          integer

                                                                                                                                          The Rechargecustomer_id.

                                                                                                                                        • created_at
                                                                                                                                          datetime

                                                                                                                                          The date and time when the payment method was created.

                                                                                                                                        • default
                                                                                                                                          boolean

                                                                                                                                          If this is the defaultPayment_method for theCustomer.

                                                                                                                                          Customer must have 1 and only 1 default paymentPayment_method.

                                                                                                                                        • payment_details
                                                                                                                                          object

                                                                                                                                          Details about the specific payment method

                                                                                                                                          Those details will vary based on thepayment_type

                                                                                                                                          Show object attributes
                                                                                                                                        • payment_type
                                                                                                                                          string

                                                                                                                                          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.

                                                                                                                                        • processor_customer_token
                                                                                                                                          string

                                                                                                                                          The customer token at the processor.

                                                                                                                                        • processor_name
                                                                                                                                          string

                                                                                                                                          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.

                                                                                                                                        • processor_payment_method_token
                                                                                                                                          string

                                                                                                                                          The payment token at the processor.

                                                                                                                                        • status
                                                                                                                                          string

                                                                                                                                          Possible values:   unvalidated,   valid,   invalid,   empty

                                                                                                                                          State of thePayment Method.

                                                                                                                                        • status_reason
                                                                                                                                          string

                                                                                                                                          The status reason for the payment method.

                                                                                                                                          Often used wheninvalid to provide background details in invalidity.

                                                                                                                                        • updated_at
                                                                                                                                          datetime

                                                                                                                                          Last time thePayment_method was updated.

                                                                                                                                        Error related attributes
                                                                                                                                          More Attributes
                                                                                                                                          • billing_address
                                                                                                                                            object

                                                                                                                                            An object with the customer’s address information.

                                                                                                                                            Show object attributes
                                                                                                                                          The payment method object
                                                                                                                                          {"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

                                                                                                                                          Create a Payment Method in Recharge.

                                                                                                                                          Scopes: write_payment_methods
                                                                                                                                          Body Parameters
                                                                                                                                          • customer_id
                                                                                                                                            integer
                                                                                                                                            * Required

                                                                                                                                            The Rechargecustomer_id.

                                                                                                                                          • default
                                                                                                                                            boolean

                                                                                                                                            If this is the defaultPayment Method for the customer, customer must have 1 and only 1 defaultPayment Method.

                                                                                                                                          • payment_type
                                                                                                                                            string
                                                                                                                                            * Required

                                                                                                                                            Possible values:   CREDIT_CARD,   PAYPAL,   APPLE_PAY,   GOOGLE_PAY,   SEPA_DEBIT

                                                                                                                                            The type of payment.

                                                                                                                                          • processor_customer_token
                                                                                                                                            string
                                                                                                                                            * Required

                                                                                                                                            The customer token at the processor.

                                                                                                                                            On Stripe this begins withcus_.

                                                                                                                                          • processor_name
                                                                                                                                            string
                                                                                                                                            * Required

                                                                                                                                            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.

                                                                                                                                          • processor_payment_method_token
                                                                                                                                            string

                                                                                                                                            The payment token at the processor.

                                                                                                                                          More Parameters
                                                                                                                                          • billing_address
                                                                                                                                            object

                                                                                                                                            An object with the customer’s address information.

                                                                                                                                            Show object attributes
                                                                                                                                          • retry_charges
                                                                                                                                            boolean

                                                                                                                                            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.

                                                                                                                                          Responses
                                                                                                                                          • 201

                                                                                                                                            OK: The request was successful, created a new resource, and resource created is in the body.

                                                                                                                                            Show response object
                                                                                                                                          POST
                                                                                                                                          /payment_methods
                                                                                                                                          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"}'
                                                                                                                                          Response
                                                                                                                                          {"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 a payment method

                                                                                                                                          Retrieve an existingPayment Method using the RechargePayment Methodid.

                                                                                                                                          Scopes: read_payment_methods
                                                                                                                                          Responses
                                                                                                                                          • 200

                                                                                                                                            successful response

                                                                                                                                            Show response object
                                                                                                                                          GET
                                                                                                                                          /payment_methods/{id}
                                                                                                                                          curl'https://api.rechargeapps.com/payment_methods/1234567' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                          Response
                                                                                                                                          {"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"}}

                                                                                                                                          Update a payment method

                                                                                                                                          Modify an existingPayment Method.

                                                                                                                                          Scopes: write_payment_methods
                                                                                                                                          Body Parameters
                                                                                                                                          • default
                                                                                                                                            boolean

                                                                                                                                            If this is the defaultPayment Method for theCustomer.

                                                                                                                                            Customer must have 1 and only 1 default paymentPayment_method.

                                                                                                                                          • processor_name
                                                                                                                                            string

                                                                                                                                            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.

                                                                                                                                          • billing_address
                                                                                                                                            object

                                                                                                                                            An object with the customer’s address information.

                                                                                                                                            Show object attributes
                                                                                                                                          More Parameters
                                                                                                                                            Responses
                                                                                                                                            • 200

                                                                                                                                              successful response

                                                                                                                                              Show response object
                                                                                                                                            PUT
                                                                                                                                            /payment_methods/{id}
                                                                                                                                            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}'
                                                                                                                                            Response
                                                                                                                                            {"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"}}

                                                                                                                                            Delete a payment method

                                                                                                                                            Permanently delete aPayment Method.

                                                                                                                                            Scopes: write_payment_methods
                                                                                                                                            Responses
                                                                                                                                            • 204

                                                                                                                                              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.

                                                                                                                                              Show response object
                                                                                                                                            DELETE
                                                                                                                                            /payment_methods/{id}
                                                                                                                                            curl --XDELETE'https://api.rechargeapps.com/payment_methods/1234567' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                            Response
                                                                                                                                            {}

                                                                                                                                            List payment methods

                                                                                                                                            Return a list of payment methods in your store.

                                                                                                                                            HTTP request examples


                                                                                                                                            GET /payment_methods

                                                                                                                                            Scopes: read_payment_methods
                                                                                                                                            Query Parameters
                                                                                                                                            • customer_id
                                                                                                                                              string

                                                                                                                                              Gets allPayment methods for this customer.

                                                                                                                                            More Parameters
                                                                                                                                              Responses
                                                                                                                                              • 200

                                                                                                                                                successful response

                                                                                                                                                Show response object
                                                                                                                                              GET
                                                                                                                                              /payment_methods
                                                                                                                                              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
                                                                                                                                              Response
                                                                                                                                              {"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"}]}

                                                                                                                                              Plans

                                                                                                                                              ThePlans resource is used to create and configure the transactional options for theProduct (subscription, prepaid, and onetime purchase options) in Recharge.

                                                                                                                                              Endpoints
                                                                                                                                              POST
                                                                                                                                              /plans
                                                                                                                                              PUT
                                                                                                                                              /plans/{id}
                                                                                                                                              DELETE
                                                                                                                                              /plans/{id}
                                                                                                                                              GET
                                                                                                                                              /plans
                                                                                                                                              POST
                                                                                                                                              /products/{external_product_id}/plans-bulk
                                                                                                                                              PUT
                                                                                                                                              /products/{external_product_id}/plans-bulk
                                                                                                                                              DELETE
                                                                                                                                              /products/{external_product_id}/plans-bulk
                                                                                                                                              Expand

                                                                                                                                              The plan object

                                                                                                                                              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.

                                                                                                                                              Attributes
                                                                                                                                              • id
                                                                                                                                                integer

                                                                                                                                                Unique numeric identifier for thePlan.

                                                                                                                                              • channel_settings
                                                                                                                                                object

                                                                                                                                                An object containing the availability of the plan through various supported channels.

                                                                                                                                                Show object attributes
                                                                                                                                              • created_at
                                                                                                                                                datetime

                                                                                                                                                The time the plan was created.

                                                                                                                                              • deleted_at
                                                                                                                                                datetime

                                                                                                                                                If deleted, the time the plan was deleted.

                                                                                                                                              • discount_amount
                                                                                                                                                string

                                                                                                                                                The discount amount applied to the productprice when purchased through thisPlan.

                                                                                                                                                AllPlans for a product must have the same discount amount.

                                                                                                                                              • discount_type
                                                                                                                                                string

                                                                                                                                                Possible values:   percentage

                                                                                                                                                Used in combination with discount amount to determine the discount applied on a product price when purchased through thisPlan.

                                                                                                                                              • external_plan_group_id
                                                                                                                                                string

                                                                                                                                                The id of the selling plan group as it appears in external platforms.

                                                                                                                                              • external_plan_id
                                                                                                                                                string

                                                                                                                                                The id of the selling plan as it appears in external platforms.

                                                                                                                                              • external_plan_name
                                                                                                                                                string

                                                                                                                                                The name of the selling plan as it appears in external platforms.

                                                                                                                                              • external_product_id
                                                                                                                                                object

                                                                                                                                                An object containing the product id as it appears in external platforms.

                                                                                                                                                Show object attributes
                                                                                                                                              • external_variant_ids
                                                                                                                                                array

                                                                                                                                                An array of variant ids as they appear in external platforms.

                                                                                                                                              • has_variant_restrictions
                                                                                                                                                boolean

                                                                                                                                                Default: false

                                                                                                                                                Whether this plan applies to specific variants of the product

                                                                                                                                              • sort_order
                                                                                                                                                integer

                                                                                                                                                The number indicating the order which the plan will be in a list of related plans.

                                                                                                                                              • subscription_preferences
                                                                                                                                                object

                                                                                                                                                An object containing the various subscription preferences associated with this plan.

                                                                                                                                                Show object attributes
                                                                                                                                              • title
                                                                                                                                                string

                                                                                                                                                The title of the plan.

                                                                                                                                                AllPlans for a product must have the sametitle.

                                                                                                                                              • type
                                                                                                                                                string

                                                                                                                                                Possible values:   subscription,   prepaid,   onetime

                                                                                                                                                The type of the plan.

                                                                                                                                                Products with aprepaid plan cannot have plans of other types.

                                                                                                                                              • updated_at
                                                                                                                                                datetime

                                                                                                                                                The time the plan was last updated.

                                                                                                                                              Error related attributes
                                                                                                                                                More Attributes
                                                                                                                                                  The plan object
                                                                                                                                                  {"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 a plan

                                                                                                                                                  Create aPlan for aProduct in Recharge.

                                                                                                                                                  MultiplePlans may exist for anyProduct, see thePlan object for restrictions.

                                                                                                                                                  Scopes: write_plans
                                                                                                                                                  Body Parameters
                                                                                                                                                  • channel_settings
                                                                                                                                                    string

                                                                                                                                                    An object containing the availability of the plan through various supported channels.

                                                                                                                                                    Show object attributes
                                                                                                                                                  • discount_amount
                                                                                                                                                    string

                                                                                                                                                    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.

                                                                                                                                                  • discount_type
                                                                                                                                                    string

                                                                                                                                                    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)

                                                                                                                                                  • external_product_id
                                                                                                                                                    object
                                                                                                                                                    * Required

                                                                                                                                                    An object containing the product id as it appears in external platforms.

                                                                                                                                                    Show object attributes
                                                                                                                                                  • sort_order
                                                                                                                                                    integer

                                                                                                                                                    The number indicating the order which the plan will be in a list of related plans.

                                                                                                                                                  • subscription_preferences
                                                                                                                                                    object
                                                                                                                                                    * Required

                                                                                                                                                    An object containing the various subscription preferences associated with this plan.

                                                                                                                                                    Show object attributes
                                                                                                                                                  • title
                                                                                                                                                    string
                                                                                                                                                    * Required

                                                                                                                                                    The title of the plan.

                                                                                                                                                    AllPlans for a product must have the sametitle.

                                                                                                                                                  • type
                                                                                                                                                    string
                                                                                                                                                    * Required

                                                                                                                                                    Possible values:   subscription,   prepaid,   onetime

                                                                                                                                                    The type of the plan. Products with a prepaid plan cannot have plans of other types.

                                                                                                                                                  More Parameters
                                                                                                                                                    Responses
                                                                                                                                                    • 200

                                                                                                                                                      successful response

                                                                                                                                                      Show response object
                                                                                                                                                    POST
                                                                                                                                                    /plans
                                                                                                                                                    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",}'
                                                                                                                                                    Response
                                                                                                                                                    {"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 a plan

                                                                                                                                                    Update an existing Plan.

                                                                                                                                                    Scopes: write_plans
                                                                                                                                                    Body Parameters
                                                                                                                                                    • channel_settings
                                                                                                                                                      object

                                                                                                                                                      An object containing the availability of the plan through various supported channels.

                                                                                                                                                      Show object attributes
                                                                                                                                                    • discount_amount
                                                                                                                                                      string

                                                                                                                                                      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.

                                                                                                                                                    • discount_type
                                                                                                                                                      string

                                                                                                                                                      Possible values:   percentage

                                                                                                                                                      Used in combination with discount amount to determine the discount applied on a product price when purchased through this plan.

                                                                                                                                                    • external_product_id
                                                                                                                                                      object

                                                                                                                                                      An object containing the product id as it appears in external platforms.

                                                                                                                                                      Show object attributes
                                                                                                                                                    • sort_order
                                                                                                                                                      string

                                                                                                                                                      The number indicating the order which the plan will be in a list of related plans.

                                                                                                                                                    • subscription_preferences
                                                                                                                                                      object

                                                                                                                                                      An object containing the various subscription preferences associated with this plan.

                                                                                                                                                      Show object attributes
                                                                                                                                                    • title
                                                                                                                                                      string

                                                                                                                                                      The title of the plan.

                                                                                                                                                    More Parameters
                                                                                                                                                      Responses
                                                                                                                                                      • 200

                                                                                                                                                        successful response

                                                                                                                                                        Show response object
                                                                                                                                                      PUT
                                                                                                                                                      /plans/{id}
                                                                                                                                                      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"}'
                                                                                                                                                      Response
                                                                                                                                                      {"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

                                                                                                                                                      Delete a plan.

                                                                                                                                                      Scopes: write_plans
                                                                                                                                                      Responses
                                                                                                                                                      • 204

                                                                                                                                                        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.

                                                                                                                                                        Show response object
                                                                                                                                                      DELETE
                                                                                                                                                      /plans/{id}
                                                                                                                                                      curl -XDELETE'https://api.rechargeapps.com/plans/321654' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                      Response
                                                                                                                                                      {}

                                                                                                                                                      List plans

                                                                                                                                                      Returns a list of all plans fromStore.

                                                                                                                                                      Scopes: read_plans
                                                                                                                                                      Query Parameters
                                                                                                                                                      • limit
                                                                                                                                                        string

                                                                                                                                                        Default: 50

                                                                                                                                                        Max: 250

                                                                                                                                                        The number of results.

                                                                                                                                                      • page
                                                                                                                                                        string
                                                                                                                                                        *Deprecated

                                                                                                                                                        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.

                                                                                                                                                      • external_product_id
                                                                                                                                                        string

                                                                                                                                                        Return thePlans linked to theProduct record in Recharge with the indicatedexternal_product_id

                                                                                                                                                      • ids
                                                                                                                                                        string

                                                                                                                                                        Filter plans by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

                                                                                                                                                      • updated_at_max
                                                                                                                                                        datetime

                                                                                                                                                        Return the plans updated before the given date.

                                                                                                                                                      • updated_at_min
                                                                                                                                                        datetime

                                                                                                                                                        Return the plans updated after the given date.

                                                                                                                                                      • type
                                                                                                                                                        string

                                                                                                                                                        Possible values:   subscription,   prepaid,   onetime

                                                                                                                                                        Return the plans that are of a specific type.

                                                                                                                                                      More Parameters
                                                                                                                                                        Responses
                                                                                                                                                        • 200

                                                                                                                                                          successful response

                                                                                                                                                          Show response object
                                                                                                                                                        GET
                                                                                                                                                        /plans
                                                                                                                                                        curl'https://api.rechargeapps.com/plans' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                                                                                        Response
                                                                                                                                                        {"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 plans

                                                                                                                                                        Bulk create new plans.

                                                                                                                                                        There is a limit of 20 plans per request.

                                                                                                                                                        Scopes: write_plans
                                                                                                                                                        Body Parameters
                                                                                                                                                        • plans
                                                                                                                                                          array
                                                                                                                                                          * Required

                                                                                                                                                          An array of plans to be created.

                                                                                                                                                          Show object attributes
                                                                                                                                                        More Parameters
                                                                                                                                                          Responses
                                                                                                                                                          • 200

                                                                                                                                                            successful response

                                                                                                                                                            Show response object
                                                                                                                                                          POST
                                                                                                                                                          /products/{external_product_id}/plans-bulk
                                                                                                                                                          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            }        }    ] }'
                                                                                                                                                          Response
                                                                                                                                                          {"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 plans

                                                                                                                                                          Bulk update existing plans.

                                                                                                                                                          There is a limit of 20 plans per request.

                                                                                                                                                          Scopes: write_plans
                                                                                                                                                          Body Parameters
                                                                                                                                                          • plans
                                                                                                                                                            array
                                                                                                                                                            * Required

                                                                                                                                                            An array of plans to be updated. Must provide ID for each plan.

                                                                                                                                                            Show object attributes
                                                                                                                                                          More Parameters
                                                                                                                                                            Responses
                                                                                                                                                            • 200

                                                                                                                                                              successful response

                                                                                                                                                              Show response object
                                                                                                                                                            PUT
                                                                                                                                                            /products/{external_product_id}/plans-bulk
                                                                                                                                                            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"        }    ] }'
                                                                                                                                                            Response
                                                                                                                                                            {"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 plans

                                                                                                                                                            Bulk delete existing plans.

                                                                                                                                                            There is a limit of 20 plans per request.

                                                                                                                                                            Scopes: write_plans
                                                                                                                                                            Body Parameters
                                                                                                                                                            • plans
                                                                                                                                                              array
                                                                                                                                                              * Required

                                                                                                                                                              An array of plans to be deleted. Must provide ID for each plan.

                                                                                                                                                              Show object attributes
                                                                                                                                                            More Parameters
                                                                                                                                                              Responses
                                                                                                                                                              • 204

                                                                                                                                                                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.

                                                                                                                                                                Show response object
                                                                                                                                                              DELETE
                                                                                                                                                              /products/{external_product_id}/plans-bulk
                                                                                                                                                              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        }    ] }'
                                                                                                                                                              Response
                                                                                                                                                              {}

                                                                                                                                                              Products

                                                                                                                                                              Representation of the Products from your catalog in Recharge.

                                                                                                                                                              Endpoints
                                                                                                                                                              POST
                                                                                                                                                              /products
                                                                                                                                                              GET
                                                                                                                                                              /products/{external_product_id}
                                                                                                                                                              PUT
                                                                                                                                                              /products/{external_product_id}
                                                                                                                                                              DELETE
                                                                                                                                                              /products/{external_product_id}
                                                                                                                                                              GET
                                                                                                                                                              /products
                                                                                                                                                              Expand

                                                                                                                                                              The product object

                                                                                                                                                              Attributes
                                                                                                                                                              • external_product_id
                                                                                                                                                                string

                                                                                                                                                                Unique numeric identifier of the product record in Recharge. The primary id of the record.

                                                                                                                                                              • brand
                                                                                                                                                                string

                                                                                                                                                                The brand name of the product.

                                                                                                                                                              • external_created_at
                                                                                                                                                                datetime

                                                                                                                                                                The date and time at which the product was created in an external product catalog.

                                                                                                                                                              • external_updated_at
                                                                                                                                                                datetime

                                                                                                                                                                The date and time at which the product was updated in an external product catalog.

                                                                                                                                                              • images
                                                                                                                                                                array

                                                                                                                                                                An array of urls for various sizes of image files.

                                                                                                                                                                Show object attributes
                                                                                                                                                              • options

                                                                                                                                                                An array of options for the product record, such as size, color, etc.

                                                                                                                                                                Show object attributes
                                                                                                                                                              • published_at
                                                                                                                                                                datetime

                                                                                                                                                                The datetime at which the product became available for purchase. To make the product available, this should be set in the past.

                                                                                                                                                              • requires_shipping
                                                                                                                                                                boolean

                                                                                                                                                                Indicator of shipping requirement.

                                                                                                                                                                Dictates the default for the variants. Can be overriden at the variant level.

                                                                                                                                                              • title
                                                                                                                                                                string

                                                                                                                                                                The title of the product.

                                                                                                                                                              • variants
                                                                                                                                                                array

                                                                                                                                                                An array of variants of the product.

                                                                                                                                                                If your PIM does not use variants, create a single variant product.

                                                                                                                                                                Show object attributes
                                                                                                                                                              • vendor
                                                                                                                                                                string

                                                                                                                                                                The vendor of the product.

                                                                                                                                                              Error related attributes
                                                                                                                                                                More Attributes
                                                                                                                                                                  The product object
                                                                                                                                                                  {"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 product

                                                                                                                                                                  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.

                                                                                                                                                                  Scopes: write_products
                                                                                                                                                                  Body Parameters
                                                                                                                                                                  • external_product_id
                                                                                                                                                                    object
                                                                                                                                                                    * Required

                                                                                                                                                                    Unique numeric identifier of the product record in Recharge. The primary id of the record.

                                                                                                                                                                    Show object attributes
                                                                                                                                                                  • brand
                                                                                                                                                                    string

                                                                                                                                                                    The brand name of the product.

                                                                                                                                                                  • external_created_at
                                                                                                                                                                    datetime

                                                                                                                                                                    The date and time at which the product was created in an external product catalog.

                                                                                                                                                                  • external_updated_at
                                                                                                                                                                    datetime

                                                                                                                                                                    The date and time at which the product was updated in an external product catalog.

                                                                                                                                                                  • images
                                                                                                                                                                    array

                                                                                                                                                                    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.

                                                                                                                                                                    Show object attributes
                                                                                                                                                                  • options
                                                                                                                                                                    * Required

                                                                                                                                                                    An array of options for the product record, such as size, color, etc.

                                                                                                                                                                    Show object attributes
                                                                                                                                                                  • published_at
                                                                                                                                                                    datetime

                                                                                                                                                                    The date and time at which the product became available for purchase. To make the product available, this should be set in the past.

                                                                                                                                                                  • requires_shipping
                                                                                                                                                                    string

                                                                                                                                                                    Indicator of shipping requirement. Iftrue the product associated to the variant needs to be shipped.

                                                                                                                                                                    This is usually false for digital goods.

                                                                                                                                                                  • title
                                                                                                                                                                    string
                                                                                                                                                                    * Required

                                                                                                                                                                    The title of the product.

                                                                                                                                                                  • variants
                                                                                                                                                                    array
                                                                                                                                                                    * Required

                                                                                                                                                                    An array of variants of the product.

                                                                                                                                                                    If your PIM does not use variants, create a single variant product.

                                                                                                                                                                    Show object attributes
                                                                                                                                                                  • vendor
                                                                                                                                                                    string
                                                                                                                                                                    * Required

                                                                                                                                                                    The vendor of the product.

                                                                                                                                                                  More Parameters
                                                                                                                                                                    Responses
                                                                                                                                                                    • 202

                                                                                                                                                                      successful response

                                                                                                                                                                      Show response object
                                                                                                                                                                    POST
                                                                                                                                                                    /products
                                                                                                                                                                    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"}'
                                                                                                                                                                    Response
                                                                                                                                                                    {"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"}}

                                                                                                                                                                    Retrieve a product

                                                                                                                                                                    Retrieves aProduct from store’s product catalog using theexternal_product_id as lookup id.

                                                                                                                                                                    Scopes: read_products
                                                                                                                                                                    Responses
                                                                                                                                                                    • 200

                                                                                                                                                                      successful response

                                                                                                                                                                      Show response object
                                                                                                                                                                    GET
                                                                                                                                                                    /products/{external_product_id}
                                                                                                                                                                    curl'https://api.rechargeapps.com/products/10' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                    Response
                                                                                                                                                                    {"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 a product

                                                                                                                                                                    Update an existing product.

                                                                                                                                                                    Scopes: write_products
                                                                                                                                                                    Body Parameters
                                                                                                                                                                    • brand
                                                                                                                                                                      string

                                                                                                                                                                      The brand name of the product.

                                                                                                                                                                    • external_created_at
                                                                                                                                                                      datetime

                                                                                                                                                                      The date and time at which the product was created in an external product catalog.

                                                                                                                                                                    • external_updated_at
                                                                                                                                                                      datetime

                                                                                                                                                                      The date and time at which the product was updated in an external product catalog.

                                                                                                                                                                    • images
                                                                                                                                                                      array

                                                                                                                                                                      An array of urls for various sizes of image files.

                                                                                                                                                                      Show object attributes
                                                                                                                                                                    • options

                                                                                                                                                                      An array of options for the product record, such as size, color, etc.

                                                                                                                                                                      Show object attributes
                                                                                                                                                                    • published_at
                                                                                                                                                                      datetime

                                                                                                                                                                      The datetime at which the product became available for purchase. To make the product available, this should be set in the past.

                                                                                                                                                                    • requires_shipping
                                                                                                                                                                      boolean

                                                                                                                                                                      Indicator of shipping requirement. Iftrue the product associated to the variant needs to be shipped.

                                                                                                                                                                      This is usuallyfalse for digital goods.

                                                                                                                                                                    • title
                                                                                                                                                                      string

                                                                                                                                                                      The title of the product.

                                                                                                                                                                    • variants
                                                                                                                                                                      array

                                                                                                                                                                      An array of variants of the product.

                                                                                                                                                                      If your PIM does not use variants, create a single variant product.

                                                                                                                                                                      Show object attributes
                                                                                                                                                                    • vendor
                                                                                                                                                                      string

                                                                                                                                                                      The vendor of the product.

                                                                                                                                                                    More Parameters
                                                                                                                                                                      Responses
                                                                                                                                                                      • 200

                                                                                                                                                                        successful response

                                                                                                                                                                        Show response object
                                                                                                                                                                      PUT
                                                                                                                                                                      /products/{external_product_id}
                                                                                                                                                                      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"            }           }    ]}'
                                                                                                                                                                      Response
                                                                                                                                                                      {"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 a product

                                                                                                                                                                      Delete product fromStore.

                                                                                                                                                                      Scopes: write_products
                                                                                                                                                                      Responses
                                                                                                                                                                      • 204

                                                                                                                                                                        successful response

                                                                                                                                                                        Show response object
                                                                                                                                                                      DELETE
                                                                                                                                                                      /products/{external_product_id}
                                                                                                                                                                      curl -XDELETE'https://api.rechargeapps.com/products/509780' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                      Response
                                                                                                                                                                      {}

                                                                                                                                                                      List products

                                                                                                                                                                      List products from store’s product catalog.

                                                                                                                                                                      Scopes: read_products
                                                                                                                                                                      Query Parameters
                                                                                                                                                                      • external_product_ids
                                                                                                                                                                        string

                                                                                                                                                                        Filter products by external product ids.

                                                                                                                                                                        GET /products/?external_product_ids=123,223 will return all products with the associatedexternal_product_ids.

                                                                                                                                                                      More Parameters
                                                                                                                                                                        Responses
                                                                                                                                                                        • 200

                                                                                                                                                                          successful response

                                                                                                                                                                          Show response object
                                                                                                                                                                        GET
                                                                                                                                                                        /products
                                                                                                                                                                        curl'https://api.rechargeapps.com/products' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                        Response
                                                                                                                                                                        {"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"}]}

                                                                                                                                                                        Store

                                                                                                                                                                        The store endpoint includes ReCharge settings and other store specific information.

                                                                                                                                                                        Endpoints
                                                                                                                                                                        GET
                                                                                                                                                                        /store
                                                                                                                                                                        Expand

                                                                                                                                                                        The store object

                                                                                                                                                                        The store endpoint includes Recharge settings and other store specific information.

                                                                                                                                                                        Attributes
                                                                                                                                                                        • id
                                                                                                                                                                          integer

                                                                                                                                                                          Unique number identifier of the store.

                                                                                                                                                                        • checkout_logo_url
                                                                                                                                                                          string

                                                                                                                                                                          Checkout logo url.

                                                                                                                                                                        • checkout_platform
                                                                                                                                                                          string

                                                                                                                                                                          Checkout platform.

                                                                                                                                                                        • created_at
                                                                                                                                                                          datetime

                                                                                                                                                                          Date and time when the store is created.

                                                                                                                                                                        • currency
                                                                                                                                                                          string

                                                                                                                                                                          Currency of the store.

                                                                                                                                                                          Related guides:Supported currencies

                                                                                                                                                                        • customer_portal_base_url
                                                                                                                                                                          string

                                                                                                                                                                          Customer Portal Base URL.

                                                                                                                                                                        • default_api_version
                                                                                                                                                                          integer

                                                                                                                                                                          Default API version.

                                                                                                                                                                        • email
                                                                                                                                                                          string

                                                                                                                                                                          E-mail address of the store owner.

                                                                                                                                                                        • enabled_presentment_currencies
                                                                                                                                                                          array

                                                                                                                                                                          Enabled currencies the store sells in.

                                                                                                                                                                        • enabled_presentment_currencies_symbols
                                                                                                                                                                          array

                                                                                                                                                                          Currency symbol used for enabled currencies the store sells in.

                                                                                                                                                                          Show object attributes
                                                                                                                                                                        • disabled_currencies_historical
                                                                                                                                                                          array

                                                                                                                                                                          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
                                                                                                                                                                          string

                                                                                                                                                                          External platform connected to Recharge.

                                                                                                                                                                          Will be one ofshopify,big_commerce,headless, ormagento

                                                                                                                                                                        • identifier
                                                                                                                                                                          string

                                                                                                                                                                          Unique identifier of the store on the external platform.

                                                                                                                                                                        • merchant_portal_base_url
                                                                                                                                                                          string

                                                                                                                                                                          Merchant portal base URL.

                                                                                                                                                                        • name
                                                                                                                                                                          string

                                                                                                                                                                          Name of the store.

                                                                                                                                                                        • phone
                                                                                                                                                                          string

                                                                                                                                                                          Phone number of the store owner.

                                                                                                                                                                        • timezone
                                                                                                                                                                          object

                                                                                                                                                                          Timezone of the store.

                                                                                                                                                                          Show object attributes
                                                                                                                                                                        • updated_at
                                                                                                                                                                          datetime

                                                                                                                                                                          The date and time when the address was last updated.

                                                                                                                                                                        • weight_unit
                                                                                                                                                                          string

                                                                                                                                                                          Weight unit for the store.

                                                                                                                                                                        Error related attributes
                                                                                                                                                                          More Attributes
                                                                                                                                                                            The store object
                                                                                                                                                                            {"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 a store

                                                                                                                                                                            Retrieve store details.

                                                                                                                                                                            Scopes: read_store
                                                                                                                                                                            Responses
                                                                                                                                                                            • 200

                                                                                                                                                                              successful response

                                                                                                                                                                              Show response object
                                                                                                                                                                            GET
                                                                                                                                                                            /store
                                                                                                                                                                            curl'https://api.rechargeapps.com/store' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                            Response
                                                                                                                                                                            {"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

                                                                                                                                                                            Subscriptions are individual items a customer receives on a recurring basis.

                                                                                                                                                                            ASubscription is aProduct added to anAddress.

                                                                                                                                                                            Endpoints
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions
                                                                                                                                                                            GET
                                                                                                                                                                            /subscriptions/{id}
                                                                                                                                                                            PUT
                                                                                                                                                                            /subscriptions/{id}
                                                                                                                                                                            DELETE
                                                                                                                                                                            /subscriptions/{id}
                                                                                                                                                                            GET
                                                                                                                                                                            /subscriptions
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions/{id}/set_next_charge_date
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions/{id}/change_address
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions/{id}/cancel
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions/{id}/activate
                                                                                                                                                                            POST
                                                                                                                                                                            /subscriptions/skip_gift
                                                                                                                                                                            Expand

                                                                                                                                                                            The subscription object

                                                                                                                                                                            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.

                                                                                                                                                                            Attributes
                                                                                                                                                                            • id
                                                                                                                                                                              integer

                                                                                                                                                                              Unique numeric identifier for the subscription.

                                                                                                                                                                            • address_id
                                                                                                                                                                              integer

                                                                                                                                                                              Unique numeric identifier for the address the subscription is associated with.

                                                                                                                                                                            • customer_id
                                                                                                                                                                              integer

                                                                                                                                                                              Unique numeric identifier for the customer the subscription is tied to.

                                                                                                                                                                            • analytics_data
                                                                                                                                                                              object

                                                                                                                                                                              An object used to contain analytics data such as utm parameters.

                                                                                                                                                                              Show object attributes
                                                                                                                                                                            • cancellation_reason
                                                                                                                                                                              string

                                                                                                                                                                              Reason provided for cancellation.

                                                                                                                                                                            • cancellation_reason_comments
                                                                                                                                                                              string

                                                                                                                                                                              Additional comment for cancellation. Maximum length is 1024 characters.

                                                                                                                                                                            • cancelled_at
                                                                                                                                                                              datetime

                                                                                                                                                                              The time the subscription was cancelled.

                                                                                                                                                                            • charge_interval_frequency
                                                                                                                                                                              string

                                                                                                                                                                              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.

                                                                                                                                                                            • created_at
                                                                                                                                                                              datetime

                                                                                                                                                                              The time the subscription was created.

                                                                                                                                                                            • expire_after_specific_number_of_charges
                                                                                                                                                                              integer

                                                                                                                                                                              Set the number of charges until subscription expires.

                                                                                                                                                                            • external_product_id
                                                                                                                                                                              object

                                                                                                                                                                              An object containing the product id as it appears in external platforms.

                                                                                                                                                                              Show object attributes
                                                                                                                                                                            • external_variant_id
                                                                                                                                                                              object

                                                                                                                                                                              An object containing the variant id as it appears in external platforms.

                                                                                                                                                                              Show object attributes
                                                                                                                                                                            • has_queued_charges
                                                                                                                                                                              boolean

                                                                                                                                                                              Retrievestrue if there is queued charge. Otherwise, retrievesfalse.

                                                                                                                                                                            • is_prepaid
                                                                                                                                                                              boolean

                                                                                                                                                                              Value is set totrue if it is a prepaid item.

                                                                                                                                                                            • is_skippable
                                                                                                                                                                              boolean

                                                                                                                                                                              Value is set totrue if it is not a prepaid item

                                                                                                                                                                            • is_swappable
                                                                                                                                                                              boolean

                                                                                                                                                                              Value is set totrue if it is not a prepaid item and if in Customer portal settings swap is allowed for customers.

                                                                                                                                                                            • max_retries_reached
                                                                                                                                                                              boolean

                                                                                                                                                                              Retrievestrue if charge has an error max retries reached. Otherwise, retrievesfalse.

                                                                                                                                                                            • next_charge_scheduled_at
                                                                                                                                                                              datetime

                                                                                                                                                                              Date of the next charge for the subscription.

                                                                                                                                                                            • order_day_of_month
                                                                                                                                                                              integer

                                                                                                                                                                              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”.

                                                                                                                                                                            • order_day_of_week
                                                                                                                                                                              integer

                                                                                                                                                                              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.

                                                                                                                                                                            • order_interval_frequency
                                                                                                                                                                              integer

                                                                                                                                                                              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

                                                                                                                                                                            • order_interval_unit
                                                                                                                                                                              string

                                                                                                                                                                              Possible values:   day,   week,   month

                                                                                                                                                                              The frequency unit used to determine when a subscription’s order is created.

                                                                                                                                                                            • presentment_currency
                                                                                                                                                                              string

                                                                                                                                                                              The presentment currency of the subscription.

                                                                                                                                                                            • price
                                                                                                                                                                              string

                                                                                                                                                                              The price of the item before discounts, taxes, or shipping have been applied.

                                                                                                                                                                            • product_title
                                                                                                                                                                              string

                                                                                                                                                                              The name of the product in a store’s catalog.

                                                                                                                                                                            • properties
                                                                                                                                                                              array

                                                                                                                                                                              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.

                                                                                                                                                                              Show object attributes
                                                                                                                                                                            • quantity
                                                                                                                                                                              integer

                                                                                                                                                                              The number of items in the subscription.

                                                                                                                                                                            • sku
                                                                                                                                                                              string

                                                                                                                                                                              A unique identifier of the item in the fulfillment. In cases where SKU is blank, it will be dynamically pulled whenever it is used.

                                                                                                                                                                            • sku_override
                                                                                                                                                                              boolean

                                                                                                                                                                              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.

                                                                                                                                                                            • status
                                                                                                                                                                              string

                                                                                                                                                                              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.

                                                                                                                                                                            • updated_at
                                                                                                                                                                              datetime

                                                                                                                                                                              The date time at which the purchase_item record was last updated.

                                                                                                                                                                            • variant_title
                                                                                                                                                                              string

                                                                                                                                                                              The name of the variant in a shop’s catalog.

                                                                                                                                                                            Error related attributes
                                                                                                                                                                              More Attributes
                                                                                                                                                                                The subscription object
                                                                                                                                                                                {"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"}}

                                                                                                                                                                                Create a subscription

                                                                                                                                                                                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.

                                                                                                                                                                                Scopes: write_subscriptions
                                                                                                                                                                                Body Parameters
                                                                                                                                                                                • address_id
                                                                                                                                                                                  integer
                                                                                                                                                                                  * Required

                                                                                                                                                                                  Unique numeric identifier of the customer’s address.

                                                                                                                                                                                • charge_interval_frequency
                                                                                                                                                                                  integer
                                                                                                                                                                                  * Required

                                                                                                                                                                                  The number of units, specified inorder_interval_unit, between each charge.

                                                                                                                                                                                • expire_after_specific_number_of_charges
                                                                                                                                                                                  integer

                                                                                                                                                                                  The number of charges until the subscription expires.

                                                                                                                                                                                • next_charge_scheduled_at
                                                                                                                                                                                  datetime
                                                                                                                                                                                  * Required

                                                                                                                                                                                  This will set the first charge date of a new subscription.

                                                                                                                                                                                • order_day_of_month
                                                                                                                                                                                  integer

                                                                                                                                                                                  This is populated when order_interval_unit has value “month”. Default value is 0.

                                                                                                                                                                                • order_day_of_week
                                                                                                                                                                                  integer

                                                                                                                                                                                  This is populated when order_interval_unit has value “week”.

                                                                                                                                                                                • order_interval_frequency
                                                                                                                                                                                  integer
                                                                                                                                                                                  * Required

                                                                                                                                                                                  The number of units, specified in order_interval_unit, between each order.

                                                                                                                                                                                • order_interval_unit
                                                                                                                                                                                  string
                                                                                                                                                                                  * Required

                                                                                                                                                                                  Possible values:   day,   week,   month

                                                                                                                                                                                  The frequency unit used to determine when a subscription order is created.

                                                                                                                                                                                • plan_id
                                                                                                                                                                                  integer

                                                                                                                                                                                  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.

                                                                                                                                                                                • price
                                                                                                                                                                                  string

                                                                                                                                                                                  The price of the product.

                                                                                                                                                                                • product_title
                                                                                                                                                                                  string

                                                                                                                                                                                  The name of the product.

                                                                                                                                                                                • properties
                                                                                                                                                                                  array

                                                                                                                                                                                  A list of key/value pairs representing properties of the subscription.

                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                • quantity
                                                                                                                                                                                  integer
                                                                                                                                                                                  * Required

                                                                                                                                                                                  The quantity of the product.

                                                                                                                                                                                • external_product_id
                                                                                                                                                                                  object

                                                                                                                                                                                  Unique numeric identifier of the product id.

                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                • external_variant_id
                                                                                                                                                                                  object
                                                                                                                                                                                  * Required

                                                                                                                                                                                  Unique numeric identifier of the product variant id.

                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                • status
                                                                                                                                                                                  string

                                                                                                                                                                                  Possible values:   active,   cancelled,   expired

                                                                                                                                                                                  Default is set toactive.

                                                                                                                                                                                More Parameters
                                                                                                                                                                                  Responses
                                                                                                                                                                                  • 201

                                                                                                                                                                                    successful response

                                                                                                                                                                                    Show response object
                                                                                                                                                                                  POST
                                                                                                                                                                                  /subscriptions
                                                                                                                                                                                  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}'
                                                                                                                                                                                  Response
                                                                                                                                                                                  {"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

                                                                                                                                                                                  Retrieve a subscription using the Rechargesubscription_id.

                                                                                                                                                                                  Scopes: read_subscriptions
                                                                                                                                                                                  Responses
                                                                                                                                                                                  • 200

                                                                                                                                                                                    successful response

                                                                                                                                                                                    Show response object
                                                                                                                                                                                  GET
                                                                                                                                                                                  /subscriptions/{id}
                                                                                                                                                                                  curl'https://api.rechargeapps.com/subscriptions/27363808' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                                  Response
                                                                                                                                                                                  {"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 a subscription

                                                                                                                                                                                  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.

                                                                                                                                                                                  Scopes: write_subscriptions
                                                                                                                                                                                  Query Parameters
                                                                                                                                                                                  • commit
                                                                                                                                                                                    boolean

                                                                                                                                                                                    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.

                                                                                                                                                                                  • force_update
                                                                                                                                                                                    boolean

                                                                                                                                                                                    If set toTrue, updates will also be applied toCANCELLED subscriptions. Ifnull orFalse, onlyACTIVE subscriptions will be updated.

                                                                                                                                                                                  More Parameters
                                                                                                                                                                                    Body Parameters
                                                                                                                                                                                    • charge_interval_frequency
                                                                                                                                                                                      integer

                                                                                                                                                                                      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.

                                                                                                                                                                                    • expire_after_specific_number_of_charges
                                                                                                                                                                                      integer

                                                                                                                                                                                      The number of charges until subscription expires.

                                                                                                                                                                                    • external_variant_id
                                                                                                                                                                                      object

                                                                                                                                                                                      Unique number identifier of the product variant in your external platform.

                                                                                                                                                                                      Show object attributes
                                                                                                                                                                                    • order_day_of_month
                                                                                                                                                                                      string

                                                                                                                                                                                      The day of the month the order is created on.

                                                                                                                                                                                      WARNING: this update will remove skips and manually changed charges.

                                                                                                                                                                                    • order_day_of_week
                                                                                                                                                                                      string

                                                                                                                                                                                      The day of the week the order is created on.

                                                                                                                                                                                      WARNING: this update will remove skips and manually changed charges.

                                                                                                                                                                                    • order_interval_frequency
                                                                                                                                                                                      string

                                                                                                                                                                                      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.

                                                                                                                                                                                    • order_interval_unit
                                                                                                                                                                                      string

                                                                                                                                                                                      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.

                                                                                                                                                                                    • plan_id
                                                                                                                                                                                      integer

                                                                                                                                                                                      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.

                                                                                                                                                                                    • price
                                                                                                                                                                                      string

                                                                                                                                                                                      The price of the item before discounts, taxes, or shipping has been applied.

                                                                                                                                                                                    • product_title
                                                                                                                                                                                      string

                                                                                                                                                                                      The name of the product.

                                                                                                                                                                                    • properties
                                                                                                                                                                                      array

                                                                                                                                                                                      A list of key/value pairs representing properties of the subscription.

                                                                                                                                                                                      Show object attributes
                                                                                                                                                                                    • quantity
                                                                                                                                                                                      string

                                                                                                                                                                                      The number of items in the subscription.

                                                                                                                                                                                    • sku
                                                                                                                                                                                      string

                                                                                                                                                                                      A unique identifier of the item in the fulfillment.

                                                                                                                                                                                    • sku_override
                                                                                                                                                                                      boolean

                                                                                                                                                                                      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.

                                                                                                                                                                                    • use_external_variant_defaults
                                                                                                                                                                                      boolean

                                                                                                                                                                                      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.

                                                                                                                                                                                    • variant_title
                                                                                                                                                                                      string

                                                                                                                                                                                      The name of the product variant.

                                                                                                                                                                                    More Parameters
                                                                                                                                                                                      Responses
                                                                                                                                                                                      • 200

                                                                                                                                                                                        successful response

                                                                                                                                                                                        Show response object
                                                                                                                                                                                      PUT
                                                                                                                                                                                      /subscriptions/{id}
                                                                                                                                                                                      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}'
                                                                                                                                                                                      Response
                                                                                                                                                                                      {"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"}}

                                                                                                                                                                                      Delete a subscription

                                                                                                                                                                                      We now have a feature for deleting a subscription.

                                                                                                                                                                                      Scopes: write_subscriptions
                                                                                                                                                                                      Body Parameters
                                                                                                                                                                                      • send_email
                                                                                                                                                                                        boolean

                                                                                                                                                                                        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.

                                                                                                                                                                                      More Parameters
                                                                                                                                                                                        Responses
                                                                                                                                                                                        • 204

                                                                                                                                                                                          successful response

                                                                                                                                                                                          Show response object
                                                                                                                                                                                        DELETE
                                                                                                                                                                                        /subscriptions/{id}
                                                                                                                                                                                        curl -XDELETE'https://api.rechargeapps.com/subscriptions/27363808' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                                        Response
                                                                                                                                                                                        {}

                                                                                                                                                                                        List subscriptions

                                                                                                                                                                                        Returns a list of all your subscriptions.

                                                                                                                                                                                        HTTP request examples


                                                                                                                                                                                        GET /subscriptions

                                                                                                                                                                                        GET /subscriptions?created_at_min=2018-10-10&created_at_max=2019-10-16

                                                                                                                                                                                        GET /subscriptions?customer_id=<customer_id>

                                                                                                                                                                                        Scopes: read_subscriptions
                                                                                                                                                                                        Query Parameters
                                                                                                                                                                                        • address_id
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions linked to the givenaddress_id.

                                                                                                                                                                                          Not compatible withaddress_ids.

                                                                                                                                                                                        • address_ids
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions linked to the givenaddress_ids.

                                                                                                                                                                                          Accepts a comma separated list of address_ids as value.
                                                                                                                                                                                          Not compatible withaddress_id

                                                                                                                                                                                        • created_at_max
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions created before the given date.

                                                                                                                                                                                        • created_at_min
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions created after the given date.

                                                                                                                                                                                        • cursor
                                                                                                                                                                                          string

                                                                                                                                                                                          Return either the next or previous page of subscriptions usingnext_cursor orprevious_cursor attributes in the response.

                                                                                                                                                                                        • customer_id
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions linked to the given Recharge customer id.

                                                                                                                                                                                        • external_variant_id
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions linked to the given external_variant_id

                                                                                                                                                                                        • ids
                                                                                                                                                                                          string

                                                                                                                                                                                          Comma-separated list ofsubscription_ids to filter

                                                                                                                                                                                        • limit
                                                                                                                                                                                          string

                                                                                                                                                                                          Default: 50

                                                                                                                                                                                          Max: 250

                                                                                                                                                                                          The number of results.

                                                                                                                                                                                        • page
                                                                                                                                                                                          string
                                                                                                                                                                                          *Deprecated

                                                                                                                                                                                          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.

                                                                                                                                                                                        • status
                                                                                                                                                                                          string

                                                                                                                                                                                          Possible values:   active,   cancelled,   expired

                                                                                                                                                                                          Return the subscriptions with specified status.

                                                                                                                                                                                        • updated_at_max
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions updated before the given date.

                                                                                                                                                                                        • updated_at_min
                                                                                                                                                                                          string

                                                                                                                                                                                          Return the subscriptions updated after the given date.

                                                                                                                                                                                        More Parameters
                                                                                                                                                                                          Responses
                                                                                                                                                                                          • 200

                                                                                                                                                                                            successful response

                                                                                                                                                                                            Show response object
                                                                                                                                                                                          GET
                                                                                                                                                                                          /subscriptions
                                                                                                                                                                                          curl'https://api.rechargeapps.com/subscriptions' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                                                                                                                          Response
                                                                                                                                                                                          {"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"}]}

                                                                                                                                                                                          Change a subscription next charge date

                                                                                                                                                                                          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

                                                                                                                                                                                          Scopes: write_subscriptions
                                                                                                                                                                                          Body Parameters
                                                                                                                                                                                          • date
                                                                                                                                                                                            string
                                                                                                                                                                                            * Required

                                                                                                                                                                                            The next charge date desired.

                                                                                                                                                                                          More Parameters
                                                                                                                                                                                            Responses
                                                                                                                                                                                            • 200

                                                                                                                                                                                              successful response

                                                                                                                                                                                              Show response object
                                                                                                                                                                                            POST
                                                                                                                                                                                            /subscriptions/{id}/set_next_charge_date
                                                                                                                                                                                            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"}'
                                                                                                                                                                                            Response
                                                                                                                                                                                            {"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"}}

                                                                                                                                                                                            Change a subscription address

                                                                                                                                                                                            New

                                                                                                                                                                                            Update an existing subscription’s address.

                                                                                                                                                                                            Scopes: write_subscriptions
                                                                                                                                                                                            Body Parameters
                                                                                                                                                                                            • address_id
                                                                                                                                                                                              integer
                                                                                                                                                                                              * Required

                                                                                                                                                                                              Unique id of the address that need to be associated with subscription.

                                                                                                                                                                                            • next_charge_scheduled_at
                                                                                                                                                                                              string

                                                                                                                                                                                              The next charge date desired.

                                                                                                                                                                                            More Parameters
                                                                                                                                                                                              Responses
                                                                                                                                                                                              • 200

                                                                                                                                                                                                successful response

                                                                                                                                                                                                Show response object
                                                                                                                                                                                              POST
                                                                                                                                                                                              /subscriptions/{id}/change_address
                                                                                                                                                                                              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}'
                                                                                                                                                                                              Response
                                                                                                                                                                                              {"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 a subscription

                                                                                                                                                                                              Cancel an active subscription.

                                                                                                                                                                                              An involuntary subscription cancelled due to max retries reached will trigger the charge/max_retries_reached webhook.

                                                                                                                                                                                              Scopes: write_subscriptions
                                                                                                                                                                                              Body Parameters
                                                                                                                                                                                              • cancellation_reason
                                                                                                                                                                                                string
                                                                                                                                                                                                * Required

                                                                                                                                                                                                Reason for subscription cancellation.

                                                                                                                                                                                              • cancellation_reason_comments
                                                                                                                                                                                                string

                                                                                                                                                                                                Cancellation reason comment. Maximum length is 1024 characters.

                                                                                                                                                                                              • send_email
                                                                                                                                                                                                boolean

                                                                                                                                                                                                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

                                                                                                                                                                                              More Parameters
                                                                                                                                                                                                Responses
                                                                                                                                                                                                • 200

                                                                                                                                                                                                  successful response

                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                POST
                                                                                                                                                                                                /subscriptions/{id}/cancel
                                                                                                                                                                                                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"}'
                                                                                                                                                                                                Response
                                                                                                                                                                                                {"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 subscription

                                                                                                                                                                                                Activate a cancelled subscription.

                                                                                                                                                                                                When activating subscription, following attributes will be set to null:cancelled_at,cancellation_reason andcancellation_reason_comments.

                                                                                                                                                                                                Scopes: write_subscriptions
                                                                                                                                                                                                Responses
                                                                                                                                                                                                • 200

                                                                                                                                                                                                  successful response

                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                POST
                                                                                                                                                                                                /subscriptions/{id}/activate
                                                                                                                                                                                                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'{}'
                                                                                                                                                                                                Response
                                                                                                                                                                                                {"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 skipped subscription

                                                                                                                                                                                                Gift a skippedSubscription to a recipient.

                                                                                                                                                                                                Scopes: write_subscriptions
                                                                                                                                                                                                Body Parameters
                                                                                                                                                                                                • purchase_item_ids
                                                                                                                                                                                                  array
                                                                                                                                                                                                  * Required

                                                                                                                                                                                                  A list containing theSubscription IDs to be skipped.

                                                                                                                                                                                                • recipient_address
                                                                                                                                                                                                  object
                                                                                                                                                                                                  * Required

                                                                                                                                                                                                  An object that contains information associated with the giftee’s Address

                                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                                More Parameters
                                                                                                                                                                                                  Responses
                                                                                                                                                                                                  • 200

                                                                                                                                                                                                    successful response

                                                                                                                                                                                                    Show response object
                                                                                                                                                                                                  • 422

                                                                                                                                                                                                    invalid data passed to the endpoint

                                                                                                                                                                                                    Show response object
                                                                                                                                                                                                  POST
                                                                                                                                                                                                  /subscriptions/skip_gift
                                                                                                                                                                                                  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]}'
                                                                                                                                                                                                  Response
                                                                                                                                                                                                  {"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"}]}

                                                                                                                                                                                                  Webhook endpoints

                                                                                                                                                                                                  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.

                                                                                                                                                                                                  Retries / Idempotency


                                                                                                                                                                                                  Due to webhook retries, it’s possible that your application receives the same webhook more than once. Ensure idempotency of the webhook call by detecting such duplicates within your application.


                                                                                                                                                                                                  Respond to a webhook



                                                                                                                                                                                                  Your webhook acknowledges that it received data by sending a200 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.

                                                                                                                                                                                                  Endpoints
                                                                                                                                                                                                  POST
                                                                                                                                                                                                  /webhooks
                                                                                                                                                                                                  GET
                                                                                                                                                                                                  /webhooks/{id}
                                                                                                                                                                                                  PUT
                                                                                                                                                                                                  /webhooks/{id}
                                                                                                                                                                                                  DELETE
                                                                                                                                                                                                  /webhooks/{id}
                                                                                                                                                                                                  GET
                                                                                                                                                                                                  /webhooks
                                                                                                                                                                                                  POST
                                                                                                                                                                                                  /webhooks/{id}/test
                                                                                                                                                                                                  Expand

                                                                                                                                                                                                  The Webhook object

                                                                                                                                                                                                  Please note that the store domain header has changed to X-Recharge-External-Platform-Domain

                                                                                                                                                                                                  These topics are deprecated, however they will not be removed from this API version:checkout/completed.

                                                                                                                                                                                                  Attributes
                                                                                                                                                                                                  • id
                                                                                                                                                                                                    integer

                                                                                                                                                                                                    Unique numeric identifier for the webhook.

                                                                                                                                                                                                  • address
                                                                                                                                                                                                    string

                                                                                                                                                                                                    The URI where the webhook should send thePOST request when the event occurs.

                                                                                                                                                                                                  • included_objects
                                                                                                                                                                                                    array

                                                                                                                                                                                                    Possible values:   addresses,   collections,   customer,   metafields

                                                                                                                                                                                                    List of objects set to enrich the webhook payload. cf.extending responses

                                                                                                                                                                                                  • topic
                                                                                                                                                                                                    string

                                                                                                                                                                                                    The event that will trigger the webhook.

                                                                                                                                                                                                  • version
                                                                                                                                                                                                    string

                                                                                                                                                                                                    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.

                                                                                                                                                                                                  Error related attributes
                                                                                                                                                                                                    More Attributes
                                                                                                                                                                                                      The Webhook object
                                                                                                                                                                                                      {"webhook":{"id":19451,"address":"https://request.in/foo","included_objects":[],"topic":"subscription/created","version":"2021-11"}}

                                                                                                                                                                                                      Available webhooks

                                                                                                                                                                                                      The list of all available webhooks.

                                                                                                                                                                                                      Related guides:Webhook payload examples


                                                                                                                                                                                                      ObjectTopicsScope Required
                                                                                                                                                                                                      Addressaddress/createdaddress/updatedread_customers
                                                                                                                                                                                                      Async_batchasync_batch/processedread_batches
                                                                                                                                                                                                      BundleSelectionbundle_selection/createdbundle_selection/updatedbundle_selection/deletedread_subscriptions
                                                                                                                                                                                                      Customercustomer/activatedcustomer/createdcustomer/deactivatedcustomer/payment_method_updatedcustomer/updatedcustomer/deletedread_customers
                                                                                                                                                                                                      Chargecharge/createdcharge/failedcharge/max_retries_reachedcharge/paidcharge/refundedcharge/uncapturedcharge/upcomingcharge/updatedcharge/deletedread_orders
                                                                                                                                                                                                      Checkoutcheckout/createdcheckout/completedcheckout/processedcheckout/updated

                                                                                                                                                                                                      Note: Deprecated and not available for the Shopify integration with Shopify hosted Checkout (aka SCI)
                                                                                                                                                                                                      read_orders
                                                                                                                                                                                                      Gift Purchasegift_purchase/createdgift_purchase/redeemedread_gift_purchases
                                                                                                                                                                                                      Onetimeonetime/createdonetime/deletedonetime/updatedread_subscriptions
                                                                                                                                                                                                      Orderorder/cancelledorder/createdorder/deletedorder/processedorder/payment_capturedorder/upcomingorder/updatedorder/successread_orders
                                                                                                                                                                                                      Planplan/createdplan/deletedplan/updatedread_plans
                                                                                                                                                                                                      Subscriptionsubscription/activatedsubscription/cancelledsubscription/createdsubscription/deletedsubscription/skippedsubscription/removed_from_skipped_chargesubscription/updatedsubscription/unskippedsubscription/swappedsubscription/pausedread_subscriptions
                                                                                                                                                                                                      Storestore/updatedread_store
                                                                                                                                                                                                      Rechargerecharge/uninstalledstore_info

                                                                                                                                                                                                      Create a webhook

                                                                                                                                                                                                      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

                                                                                                                                                                                                      Body Parameters
                                                                                                                                                                                                      • address
                                                                                                                                                                                                        integer
                                                                                                                                                                                                        * Required

                                                                                                                                                                                                        The URI where the webhook should send thePOST request when the event occurs.

                                                                                                                                                                                                      • included_objects
                                                                                                                                                                                                        array

                                                                                                                                                                                                        Possible values:   addresses,   collections,   customer,   metafields

                                                                                                                                                                                                        List of objects set to enrich the webhook payload. cf.extending responses

                                                                                                                                                                                                      • topic
                                                                                                                                                                                                        integer
                                                                                                                                                                                                        * Required

                                                                                                                                                                                                        The event that will trigger the webhook.

                                                                                                                                                                                                      • version
                                                                                                                                                                                                        string

                                                                                                                                                                                                        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.

                                                                                                                                                                                                      More Parameters
                                                                                                                                                                                                        Responses
                                                                                                                                                                                                        • 200

                                                                                                                                                                                                          successful response

                                                                                                                                                                                                          Show response object
                                                                                                                                                                                                        POST
                                                                                                                                                                                                        /webhooks
                                                                                                                                                                                                        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"}'
                                                                                                                                                                                                        Response
                                                                                                                                                                                                        {"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}

                                                                                                                                                                                                        Retrieve a webhook

                                                                                                                                                                                                        Retrieve a webhook using the Recharge webhook id.

                                                                                                                                                                                                        Responses
                                                                                                                                                                                                        • 200

                                                                                                                                                                                                          successful response

                                                                                                                                                                                                          Show response object
                                                                                                                                                                                                        GET
                                                                                                                                                                                                        /webhooks/{id}
                                                                                                                                                                                                        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
                                                                                                                                                                                                        Response
                                                                                                                                                                                                        {"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}

                                                                                                                                                                                                        Update a webhook

                                                                                                                                                                                                        Modifies an existingWebhook to match the specified parameters.

                                                                                                                                                                                                        Body Parameters
                                                                                                                                                                                                        • address
                                                                                                                                                                                                          string

                                                                                                                                                                                                          The URI where the webhook should send the POST request when the event occurs.

                                                                                                                                                                                                        • included_objects
                                                                                                                                                                                                          array

                                                                                                                                                                                                          Possible values:   addresses,   collections,   customer,   metafields

                                                                                                                                                                                                          List of objects set to enrich the webhook payload. cf.extending responses

                                                                                                                                                                                                        • topic
                                                                                                                                                                                                          string

                                                                                                                                                                                                          The event that will trigger the webhook.

                                                                                                                                                                                                        • version
                                                                                                                                                                                                          string

                                                                                                                                                                                                          The version of the API used to populate the body of the webhook.

                                                                                                                                                                                                        More Parameters
                                                                                                                                                                                                          Responses
                                                                                                                                                                                                          • 200

                                                                                                                                                                                                            successful response

                                                                                                                                                                                                            Show response object
                                                                                                                                                                                                          PUT
                                                                                                                                                                                                          /webhooks/{id}
                                                                                                                                                                                                          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"}'
                                                                                                                                                                                                          Response
                                                                                                                                                                                                          {"webhook":{"id":6,"address":"https://request.in/foo","topic":"subscription/created","included_objects":[],"version":"2021-11"}}

                                                                                                                                                                                                          Delete a webhook

                                                                                                                                                                                                          Delete aWebhook

                                                                                                                                                                                                          Responses
                                                                                                                                                                                                          • 204

                                                                                                                                                                                                            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.

                                                                                                                                                                                                            Show response object
                                                                                                                                                                                                          DELETE
                                                                                                                                                                                                          /webhooks/{id}
                                                                                                                                                                                                          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'
                                                                                                                                                                                                          Response
                                                                                                                                                                                                          {}

                                                                                                                                                                                                          List webhooks

                                                                                                                                                                                                          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).

                                                                                                                                                                                                          Responses
                                                                                                                                                                                                          • 200

                                                                                                                                                                                                            successful response

                                                                                                                                                                                                            Show response object
                                                                                                                                                                                                          GET
                                                                                                                                                                                                          /webhooks
                                                                                                                                                                                                          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'
                                                                                                                                                                                                          Response
                                                                                                                                                                                                          {"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"}]}

                                                                                                                                                                                                          Test webhooks

                                                                                                                                                                                                          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.

                                                                                                                                                                                                          Responses
                                                                                                                                                                                                          • 200

                                                                                                                                                                                                            successful response

                                                                                                                                                                                                            Show response object
                                                                                                                                                                                                          POST
                                                                                                                                                                                                          /webhooks/{id}/test
                                                                                                                                                                                                          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
                                                                                                                                                                                                          Response
                                                                                                                                                                                                          {}

                                                                                                                                                                                                          Webhooks explained

                                                                                                                                                                                                          Here you will find what specific action triggers a given webhook.


                                                                                                                                                                                                          Address webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forCustomers enabled (read_customer ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          address/createdThis 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/updatedThis 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.

                                                                                                                                                                                                          Bundle webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          bundle_selection/createdThis will trigger when a new selection is created for a Bundle subscription.
                                                                                                                                                                                                          bundle_selection/updatedThis will trigger when a Bundle Selection is succesfully updated.
                                                                                                                                                                                                          bundle_selection/deletedThis will trigger when a Bundle Selection is deleted.

                                                                                                                                                                                                          Charge webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forOrders enabled (read_orders ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          charge/createdThis will trigger when a charge is created.
                                                                                                                                                                                                          charge/failedThis 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_reachedThis 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/paidThis 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/refundedThis 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/upcomingThis 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/updatedThis 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/deletedThis will trigger when a subscription is cancelled and upcoming charges are deleted.

                                                                                                                                                                                                          Checkout webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forOrders enabled (read-orders ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          checkout/createdThis will trigger when a checkout is successfully created.
                                                                                                                                                                                                          checkout/completedWill be deprecated.
                                                                                                                                                                                                          checkout/processedThis will trigger when a checkout is successfully processed.
                                                                                                                                                                                                          checkout/updatedThis will trigger when a checkout is successfully updated.

                                                                                                                                                                                                          Customer webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forCustomers enabled (read_customers ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          customer/activatedThis 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/createdThis 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/deactivatedThis 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_updatedThis 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/updatedThis will trigger when you update a customer via both API and UI.
                                                                                                                                                                                                          customer/deletedThis will trigger when you delete a customer via both API and UI.

                                                                                                                                                                                                          Gift Purchase webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forGifts enabled (read_gift_purchases ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          gift_purchase/createdThis will trigger when a gift purchase record is created, typically via a gift item purchased.
                                                                                                                                                                                                          gift_purchase/redeemedThis will trigger when a gift product is redeemed by the gift receiver.

                                                                                                                                                                                                          Onetime webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          onetime/createdThis will trigger when you create a one time product via API.
                                                                                                                                                                                                          onetime/deletedThis will trigger when you delete a one time product via API.
                                                                                                                                                                                                          onetime/updatedThis will trigger when you update a one time product via API.

                                                                                                                                                                                                          Order webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forOrders enabled (read_orders ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          order/createdThis 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/deletedThis will trigger when an order is deleted.
                                                                                                                                                                                                          order/processedThis will trigger when the order is processed (when an order goes from statusqueued to statussuccess). This will not trigger on checkout.
                                                                                                                                                                                                          order/upcomingThis will trigger X days before a QUEUED (prepaid) order is scheduled to be processed. The default is 3 days.
                                                                                                                                                                                                          order/updatedThis will trigger when an order is updated.

                                                                                                                                                                                                          Plan webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forPlans enabled (read_plans ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          plan/createdThis 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/deletedThis 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/updatedThis will trigger when a plan is updated by one of the following methods: via API, via Merchant portal or when using the2021-01Products endpoint…

                                                                                                                                                                                                          Subscription webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forSubscriptions enabled (read_subscriptions ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          subscription/activatedThis will trigger when you activate a subscription via API or UI.
                                                                                                                                                                                                          subscription/cancelledThis 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/createdThis will trigger when you create a subscription via API or when you go through the checkout on UI.
                                                                                                                                                                                                          subscription/deletedThis will trigger when you delete a subscription via API or UI.
                                                                                                                                                                                                          subscription/pausedThis will trigger when a customer pauses a subscription from within the customer portal.
                                                                                                                                                                                                          subscription/removed_from_skipped_chargeThis 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/skippedThis 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/swappedThis will trigger when you swap a subscription product for a given address to a different product or product variation API or UI.
                                                                                                                                                                                                          subscription/unskippedThis 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/updatedThis 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.

                                                                                                                                                                                                          Other webhooks

                                                                                                                                                                                                          To use these webhooks your API Token must have read permissions forStore enabled (read_store ).


                                                                                                                                                                                                          TopicExplanation
                                                                                                                                                                                                          app/uninstalledThis will trigger when you uninstall OAuth app on your store.
                                                                                                                                                                                                          recharge/uninstalledThis will trigger when Recharge is uninstalled.
                                                                                                                                                                                                          store/updatedThis will trigger when and update has been made to the store.

                                                                                                                                                                                                          Webhook validation

                                                                                                                                                                                                          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

                                                                                                                                                                                                          Example Request:

                                                                                                                                                                                                          Async batch Endpoints

                                                                                                                                                                                                          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

                                                                                                                                                                                                          Endpoints
                                                                                                                                                                                                          POST
                                                                                                                                                                                                          /async_batches
                                                                                                                                                                                                          GET
                                                                                                                                                                                                          /async_batches/{id}
                                                                                                                                                                                                          GET
                                                                                                                                                                                                          /async_batches
                                                                                                                                                                                                          POST
                                                                                                                                                                                                          /async_batches/{batch_id}/process
                                                                                                                                                                                                          Expand

                                                                                                                                                                                                          The async batch object

                                                                                                                                                                                                          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.

                                                                                                                                                                                                          Attributes
                                                                                                                                                                                                          • id
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Unique identifier of the batch, used for adding tasks to a batch and to initiate batch processing

                                                                                                                                                                                                          • batch_type
                                                                                                                                                                                                            string

                                                                                                                                                                                                            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

                                                                                                                                                                                                          • closed_at
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the date and time that processing was completed for a batch

                                                                                                                                                                                                          • created_at
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the date and time a batch was created

                                                                                                                                                                                                          • fail_task_count
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the number of failed tasks in a batch, during or after processing

                                                                                                                                                                                                          • status
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the status of the batch. Available statuses are not_started, processing, completed, failed

                                                                                                                                                                                                          • submitted_at
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the date and time that a batch was triggered to process

                                                                                                                                                                                                          • success_task_count
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the number of successful tasks in a batch, during or after processing.

                                                                                                                                                                                                          • total_task_count
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the total number of tasks in a batch

                                                                                                                                                                                                          • updated_at
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the date and time at which a batch was last updated

                                                                                                                                                                                                          • version
                                                                                                                                                                                                            string

                                                                                                                                                                                                            Indicates the API version of the batch.

                                                                                                                                                                                                            read-only field

                                                                                                                                                                                                          Error related attributes
                                                                                                                                                                                                            More Attributes
                                                                                                                                                                                                              The async batch object
                                                                                                                                                                                                              {"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"}}

                                                                                                                                                                                                              Create a batch

                                                                                                                                                                                                              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.

                                                                                                                                                                                                              Scopes: write_batches
                                                                                                                                                                                                              Body Parameters
                                                                                                                                                                                                              • batch_type
                                                                                                                                                                                                                string

                                                                                                                                                                                                                Possible values:   discount_create,   discount_update,   discount_delete,   bulk_plans_create,   bulk_plans_update,   bulk_plans_delete,   onetime_create,   onetime_delete

                                                                                                                                                                                                                Desired batch type

                                                                                                                                                                                                              More Parameters
                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                • 201

                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                POST
                                                                                                                                                                                                                /async_batches
                                                                                                                                                                                                                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"}'
                                                                                                                                                                                                                Response
                                                                                                                                                                                                                {"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

                                                                                                                                                                                                                Retrieve a batch using the Recharge batch id. A batch can be retrieved during processing to evaluate batch progress.


                                                                                                                                                                                                                ## HTTP request examples

                                                                                                                                                                                                                GET /async_batches/<batch_id>

                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                • 200

                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                GET
                                                                                                                                                                                                                /async_batches/{id}
                                                                                                                                                                                                                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'
                                                                                                                                                                                                                Response
                                                                                                                                                                                                                {"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"}}

                                                                                                                                                                                                                List batches

                                                                                                                                                                                                                Returns a list of all your async_batches.

                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                • 200

                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                GET
                                                                                                                                                                                                                /async_batches
                                                                                                                                                                                                                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'
                                                                                                                                                                                                                Response
                                                                                                                                                                                                                {"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"}]}

                                                                                                                                                                                                                Process a batch

                                                                                                                                                                                                                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.

                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                • 201

                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                POST
                                                                                                                                                                                                                /async_batches/{batch_id}/process
                                                                                                                                                                                                                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'{}'
                                                                                                                                                                                                                Response
                                                                                                                                                                                                                {"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"}}

                                                                                                                                                                                                                Async batch Tasks

                                                                                                                                                                                                                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

                                                                                                                                                                                                                Endpoints
                                                                                                                                                                                                                POST
                                                                                                                                                                                                                /async_batches/{batch_id}/tasks
                                                                                                                                                                                                                GET
                                                                                                                                                                                                                /async_batches/{batch_id}/tasks
                                                                                                                                                                                                                Expand

                                                                                                                                                                                                                The async batch Tasks object

                                                                                                                                                                                                                Attributes
                                                                                                                                                                                                                • batch_id
                                                                                                                                                                                                                  integer

                                                                                                                                                                                                                  Indicates the batch that the task is contained by

                                                                                                                                                                                                                • body
                                                                                                                                                                                                                  object

                                                                                                                                                                                                                  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

                                                                                                                                                                                                                • completed_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time a task was completed

                                                                                                                                                                                                                • created_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time that a task was created and added to the batch

                                                                                                                                                                                                                • deleted_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time that a task was deleted from the batch

                                                                                                                                                                                                                • id
                                                                                                                                                                                                                  integer

                                                                                                                                                                                                                  Unique identifier for the task within a batch

                                                                                                                                                                                                                • queued_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time a task was queued for processing within batch processing

                                                                                                                                                                                                                • result
                                                                                                                                                                                                                  string

                                                                                                                                                                                                                  Contains the individual response body for the task

                                                                                                                                                                                                                • started_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time a task was processed

                                                                                                                                                                                                                • status
                                                                                                                                                                                                                  string

                                                                                                                                                                                                                  Possible values:   pending,   processing,   failed,   success

                                                                                                                                                                                                                  Indicates the status of the task within a batch.

                                                                                                                                                                                                                • updated_at
                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                  Indicates the date and time a task was most recently updated

                                                                                                                                                                                                                Error related attributes
                                                                                                                                                                                                                  More Attributes
                                                                                                                                                                                                                    The async batch Tasks object

                                                                                                                                                                                                                    Create a batch task

                                                                                                                                                                                                                    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 examples

                                                                                                                                                                                                                    POST /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.

                                                                                                                                                                                                                    Body Parameters
                                                                                                                                                                                                                    • batch_id
                                                                                                                                                                                                                      integer

                                                                                                                                                                                                                      Indicates the batch that the task is contained by

                                                                                                                                                                                                                    • body
                                                                                                                                                                                                                      object

                                                                                                                                                                                                                      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

                                                                                                                                                                                                                    • completed_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time a task was completed

                                                                                                                                                                                                                    • created_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time that a task was created and added to the batch

                                                                                                                                                                                                                    • deleted_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time that a task was deleted from the batch

                                                                                                                                                                                                                    • id
                                                                                                                                                                                                                      integer

                                                                                                                                                                                                                      Unique identifier for the task within a batch

                                                                                                                                                                                                                    • queued_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time a task was queued for processing within batch processing

                                                                                                                                                                                                                    • result
                                                                                                                                                                                                                      string

                                                                                                                                                                                                                      Contains the individual response body for the task

                                                                                                                                                                                                                    • started_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time a task was processed

                                                                                                                                                                                                                    • status
                                                                                                                                                                                                                      string

                                                                                                                                                                                                                      Possible values:   pending,   processing,   failed,   success

                                                                                                                                                                                                                      Indicates the status of the task within a batch.

                                                                                                                                                                                                                    • updated_at
                                                                                                                                                                                                                      datetime

                                                                                                                                                                                                                      Indicates the date and time a task was most recently updated

                                                                                                                                                                                                                    More Parameters
                                                                                                                                                                                                                      Responses
                                                                                                                                                                                                                      • 200

                                                                                                                                                                                                                        successful response

                                                                                                                                                                                                                        Show response object
                                                                                                                                                                                                                      POST
                                                                                                                                                                                                                      /async_batches/{batch_id}/tasks
                                                                                                                                                                                                                      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      }    }  ]}'
                                                                                                                                                                                                                      Response
                                                                                                                                                                                                                      {"count":10}

                                                                                                                                                                                                                      List batch tasks

                                                                                                                                                                                                                      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.

                                                                                                                                                                                                                      Query Parameters
                                                                                                                                                                                                                      • ids
                                                                                                                                                                                                                        string

                                                                                                                                                                                                                        Filter tasks by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error

                                                                                                                                                                                                                      More Parameters
                                                                                                                                                                                                                        Responses
                                                                                                                                                                                                                        • 200

                                                                                                                                                                                                                          successful response

                                                                                                                                                                                                                          Show response object
                                                                                                                                                                                                                        GET
                                                                                                                                                                                                                        /async_batches/{batch_id}/tasks
                                                                                                                                                                                                                        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
                                                                                                                                                                                                                        Response
                                                                                                                                                                                                                        {"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"}]}

                                                                                                                                                                                                                        Token information

                                                                                                                                                                                                                        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.

                                                                                                                                                                                                                        Endpoints
                                                                                                                                                                                                                        GET
                                                                                                                                                                                                                        /token_information
                                                                                                                                                                                                                        Expand

                                                                                                                                                                                                                        The token information object

                                                                                                                                                                                                                        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.

                                                                                                                                                                                                                        Attributes
                                                                                                                                                                                                                        • client
                                                                                                                                                                                                                          object

                                                                                                                                                                                                                          If the API Token was generated by an Oauth app, an object containing associated client information.

                                                                                                                                                                                                                          Show object attributes
                                                                                                                                                                                                                        • contact_email
                                                                                                                                                                                                                          string

                                                                                                                                                                                                                          The email associated with the API Token record.

                                                                                                                                                                                                                          For tokens created via OAuth App the contact can benull

                                                                                                                                                                                                                        • name
                                                                                                                                                                                                                          string

                                                                                                                                                                                                                          The name of the API Token as created by merchant.

                                                                                                                                                                                                                        • scopes
                                                                                                                                                                                                                          array

                                                                                                                                                                                                                          A list of scopes on the API Token.

                                                                                                                                                                                                                        Error related attributes
                                                                                                                                                                                                                          More Attributes
                                                                                                                                                                                                                            The token information object
                                                                                                                                                                                                                            {"client":{"name":"PARTNER","contact_email":"ed@partner.com"},"contact_email":"jbluhm@example.com","name":"token name","scopes":["read_shop","write_payments"]}

                                                                                                                                                                                                                            Retrieve token information

                                                                                                                                                                                                                            Retrieve token details.

                                                                                                                                                                                                                            Responses
                                                                                                                                                                                                                            • 200

                                                                                                                                                                                                                              successful response

                                                                                                                                                                                                                              Show response object
                                                                                                                                                                                                                            GET
                                                                                                                                                                                                                            /token_information
                                                                                                                                                                                                                            curl'https://api.rechargeapps.com/token_information' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                                                                            Response
                                                                                                                                                                                                                            {"token_information":{"client":{"name":"PARTNER","contact_email":"ed@partner.com"},"contact_email":"jbluhm@example.com","name":"token name","scopes":["read_store","write_payment_methods"]}}

                                                                                                                                                                                                                            Accounts

                                                                                                                                                                                                                            This resource allows a caller to inspect basic information regarding the staff accounts in the store.

                                                                                                                                                                                                                            Endpoints
                                                                                                                                                                                                                            GET
                                                                                                                                                                                                                            /accounts/{id}
                                                                                                                                                                                                                            GET
                                                                                                                                                                                                                            /accounts
                                                                                                                                                                                                                            Expand

                                                                                                                                                                                                                            The account object

                                                                                                                                                                                                                            AnAccount record represents a staff account details for theStore. OneStore can have many staff’s account.

                                                                                                                                                                                                                            Attributes
                                                                                                                                                                                                                            • id
                                                                                                                                                                                                                              integer

                                                                                                                                                                                                                              Unique numeric identifier for theAccount.

                                                                                                                                                                                                                            • user_id
                                                                                                                                                                                                                              integer

                                                                                                                                                                                                                              The unique numeric identifier of the user associated to theAccount.

                                                                                                                                                                                                                              There can only be oneAccount per user perStore.

                                                                                                                                                                                                                            • created_at
                                                                                                                                                                                                                              datetime

                                                                                                                                                                                                                              The date and time when theAccount was created.

                                                                                                                                                                                                                            • invited_at
                                                                                                                                                                                                                              datetime

                                                                                                                                                                                                                              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.

                                                                                                                                                                                                                            • is_owner
                                                                                                                                                                                                                              boolean

                                                                                                                                                                                                                              Flags whether this user is the store owner.

                                                                                                                                                                                                                              AStore can have multiple owners.

                                                                                                                                                                                                                            Error related attributes
                                                                                                                                                                                                                              More Attributes
                                                                                                                                                                                                                                The account object
                                                                                                                                                                                                                                {"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}}

                                                                                                                                                                                                                                Retrieve an account

                                                                                                                                                                                                                                Retrieves an account for the store.

                                                                                                                                                                                                                                Scopes: read_accounts
                                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                                • 200

                                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                                GET
                                                                                                                                                                                                                                /accounts/{id}
                                                                                                                                                                                                                                curl'https://api.rechargeapps.com/accounts/331512' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token'
                                                                                                                                                                                                                                Response
                                                                                                                                                                                                                                {"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}}

                                                                                                                                                                                                                                List accounts

                                                                                                                                                                                                                                Returns all accounts associated to the store.

                                                                                                                                                                                                                                Scopes: read_accounts
                                                                                                                                                                                                                                Responses
                                                                                                                                                                                                                                • 200

                                                                                                                                                                                                                                  successful response

                                                                                                                                                                                                                                  Show response object
                                                                                                                                                                                                                                GET
                                                                                                                                                                                                                                /accounts
                                                                                                                                                                                                                                curl'https://api.rechargeapps.com/accounts' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                                                                                                                                                                Response
                                                                                                                                                                                                                                {"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}]}

                                                                                                                                                                                                                                Events

                                                                                                                                                                                                                                This resource allows a caller to inspect recent events in the store.

                                                                                                                                                                                                                                Endpoints
                                                                                                                                                                                                                                GET
                                                                                                                                                                                                                                /events
                                                                                                                                                                                                                                Expand

                                                                                                                                                                                                                                The event object

                                                                                                                                                                                                                                Pro plan

                                                                                                                                                                                                                                AnEvent record represents an action that took place at a point in time.

                                                                                                                                                                                                                                Attributes
                                                                                                                                                                                                                                • id
                                                                                                                                                                                                                                  integer

                                                                                                                                                                                                                                  Unique numeric identifier for theEvent.

                                                                                                                                                                                                                                • object_id
                                                                                                                                                                                                                                  integer

                                                                                                                                                                                                                                  The unique numeric identifier of the object associated with theEvent.

                                                                                                                                                                                                                                • customer_id
                                                                                                                                                                                                                                  integer

                                                                                                                                                                                                                                  The unique numeric identifier of the customer associated with theEvent.

                                                                                                                                                                                                                                  This value can benull for events not directly associated with a customer.

                                                                                                                                                                                                                                • created_at
                                                                                                                                                                                                                                  datetime

                                                                                                                                                                                                                                  The date and time when theEvent was created.

                                                                                                                                                                                                                                • object_type
                                                                                                                                                                                                                                  string

                                                                                                                                                                                                                                  The resource type of the object associated with theEvent, e.g. ‘customer’ or ‘subscription’

                                                                                                                                                                                                                                • verb
                                                                                                                                                                                                                                  string

                                                                                                                                                                                                                                  The action describing theEvent, e.g. ‘created’ or ‘updated’

                                                                                                                                                                                                                                • description
                                                                                                                                                                                                                                  string

                                                                                                                                                                                                                                  The short description that summarizes theEvent.

                                                                                                                                                                                                                                • updated_attributes
                                                                                                                                                                                                                                  object

                                                                                                                                                                                                                                  A list of objects describing attributes that were changed during theEvent.

                                                                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                                                                • source
                                                                                                                                                                                                                                  object

                                                                                                                                                                                                                                  An object containing details about the origin of theEvent.

                                                                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                                                                • custom_attributes
                                                                                                                                                                                                                                  object

                                                                                                                                                                                                                                  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.

                                                                                                                                                                                                                                  Show object attributes
                                                                                                                                                                                                                                Error related attributes
                                                                                                                                                                                                                                  More Attributes
                                                                                                                                                                                                                                    The event object
                                                                                                                                                                                                                                    {"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"}]}}

                                                                                                                                                                                                                                    List events

                                                                                                                                                                                                                                    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.

                                                                                                                                                                                                                                    Scopes: read_events
                                                                                                                                                                                                                                    Query Parameters
                                                                                                                                                                                                                                    • created_at_min
                                                                                                                                                                                                                                      string

                                                                                                                                                                                                                                      Show events that occurred after a certain date

                                                                                                                                                                                                                                    • created_at_max
                                                                                                                                                                                                                                      string

                                                                                                                                                                                                                                      Show events that occurred before a certain date

                                                                                                                                                                                                                                    • object_type
                                                                                                                                                                                                                                      string

                                                                                                                                                                                                                                      Filter events by specificobject_type, such asaddress,customer, orsubscription.

                                                                                                                                                                                                                                      For a full list of available object types, refer to the list below.

                                                                                                                                                                                                                                      Show object attributes
                                                                                                                                                                                                                                    • object_id
                                                                                                                                                                                                                                      integer

                                                                                                                                                                                                                                      Show events with a specificobject_id. This filter should be used with theobject_type filter.

                                                                                                                                                                                                                                    • verbs
                                                                                                                                                                                                                                      string

                                                                                                                                                                                                                                      Show events with a specificverb or comma-separated list ofverbs

                                                                                                                                                                                                                                    • customer_id
                                                                                                                                                                                                                                      integer

                                                                                                                                                                                                                                      Show events related to a specificcustomer using the customer’s primary identifier

                                                                                                                                                                                                                                    • origin
                                                                                                                                                                                                                                      string

                                                                                                                                                                                                                                      Filter events by specific source origin.
                                                                                                                                                                                                                                      Available origins:api,customer_portal,merchant_portal,recharge_process,external_platform.

                                                                                                                                                                                                                                    More Parameters
                                                                                                                                                                                                                                      Responses
                                                                                                                                                                                                                                      • 200

                                                                                                                                                                                                                                        successful response

                                                                                                                                                                                                                                        Show response object
                                                                                                                                                                                                                                      GET
                                                                                                                                                                                                                                      /events
                                                                                                                                                                                                                                      curl'https://api.rechargeapps.com/events' \  -H'X-Recharge-Version: 2021-11' \  -H'X-Recharge-Access-Token: your_api_token' \  -d limit=3 -G
                                                                                                                                                                                                                                      Response
                                                                                                                                                                                                                                      {"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"}]}]}

                                                                                                                                                                                                                                      [8]ページ先頭

                                                                                                                                                                                                                                      ©2009-2026 Movatter.jp