Core Resources
Addresses
An Addresses record represents a shipping address. Each customer can have multiple addresses. Subscriptions are a child object of an address.
34 additions in V2, marked New
Everything marked New also works when you send X-Recharge-Version: 2021-11.

#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
- idintegerUnique numeric identifier for the
Address. - An object containing the related resources requested with the
includequery parameter.Only returned when theincludequery parameter is passed.Show child attributesHide child attributes612 new
- The
Customerassociated with theAddress. Returned whenincludecontainscustomer. - The
Payment Methodsassociated with theAddress. Returned whenincludecontainspayment_methods. Requires theread_payment_methodsscope. - The
Subscriptionson theAddress. Returned whenincludecontainssubscriptions. Requires theread_subscriptionsscope. - The
Onetimeson theAddress. Returned whenincludecontainsonetimes. Requires theread_subscriptionsscope. - The
Discountapplied to theAddress, ornullif theAddresshas no discount. Returned whenincludecontainsdiscount. Requires theread_discountsscope.Show child attributesHide child attributes66 new
- Unique numeric identifier for the
Discount. - The code used to apply the
Discount. - The discounted value to be applied.
- The type of the
Discountvalue.Possible valuesfixed_amountpercentageshipping - The title of the
Discount. - How the
Discountis applied.Possible valuescodeautomatic
- The charge activity records created for the
Addressin the last 90 days. Returned whenincludecontainscharge_activities. Requires theread_ordersscope.
- Whether the
Addressis a gift address.Only returned for stores that have gifting enabled. - payment_method_idintegerUnique numeric identifier for the
Payment Methodassociated to theAddress. - address1stringThe street associated with the
Address. - address2stringAny additional information associated with the
Address. - citystringThe city associated with the address.
- companystringThe company associated with the address.
- country_codestring2-letter country code.
- customer_idintegerUnique numeric identifier for the customer associated with the address.
- discountsarray of objectsA discount which will be applied on the address. While the
discountsparameter 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 child attributesHide child attributes1
- idintegerThe id of a discount associated with this address.
- first_namestringThe customer’s first name associated with the address.
- last_namestringThe customer’s last name associated with the address.
- order_attributesarray of objectsReplaces cart_attributes. Extra information that is added to the order.
- order_notestringNotes to be added to all orders associated with the address.
- phonestringThe phone number associated with the address.
- The currency on the subscription contract in Shopify.Only set if the currency is different from the store-level currency. Else, will default to store-level currency.
- provincestringThe state or province associated with the address.
- shipping_lines_conservedarray of objectsShipping rates that have previously been overridden via
shipping_lines_overridebut are currently inactive. - shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden.If this parameter has value
null, rates will be fetched whenChargeis created or regenerated - zipstringThe zip or postal code associated with the address.
- created_atdatetimeThe date and time when the address was created.
- updated_atdatetimeThe date and time when the address was last updated.
{
"address": {
"id": 21317826,
"payment_method_id": 17874235,
"address1": "1776 Washington Street",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country_code": "US",
"created_at": "2018-11-14T09:00:01+00:00",
"customer_id": 18819267,
"discounts": [
{
"id": 12345,
"code": "TESTCODE10",
"value": 10,
"value_type": "fixed_amount"
}
],
"first_name": "John",
"last_name": "Doe",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"order_note": "My recurring order note.",
"phone": "5551234567",
"presentment_currency": "USD",
"shipping_lines_conserved": [],
"shipping_lines_override": [
{
"code": "Standard Shipping",
"price": "0.00",
"title": "Standard Shipping"
}
],
"updated_at": "2018-11-14T09:00:01+00:00",
"zip": "90404"
}
}#Create an address
POST/addresses
Create a new address for a customer.
Scope
write_customersphone is optional. When it is omitted the Address is created without a phone number.Body parameters
- A list of up to 10 custom attributes to attach to the
Eventcreated by this request. They are returned in thecustom_attributesof thatEvent. - Unique numeric identifier for the customer associated with the address.
- The street associated with the
Address. Minimum length is 1 character. - address2stringAny additional information associated with the shipping address.
- The city associated with the shipping address.
- companystringThe company associated with the shipping address.
- 2-letter country code.Check if the store supports shipping to this country. This is set by the merchant in their Shipping Settings page.
- A discount to apply to the
Address. While thediscountsparameter is an array, only the first discount is applied. - The customer’s first name associated with the address. Minimum length is 1 character.
- Whether the
Addressis a gift address.Only applied for stores that have gifting enabled. - The customer’s last name associated with the address. Minimum length is 1 character.
- order_attributesarray of objectsExtra information that is added to the order.
- order_notestringNotes to be added to all orders associated with the address.
- payment_method_idintegerPayment method id for the
Payment_methodto be associated to this address. - phonestringThe phone number associated with the address. Must be included in the request schema but can be an empty string.
- presentment_currencystringThe currency that charges on this address will be processed in. If no presentment_currency is passed, it will be set to your default store currency.
- The state or province associated with the address. Check if country requires a province
COUNTRIES_REQUIRING_PROVINCE. - shipping_lines_overridearray of objectsUsed when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated - The zip or postal code associated with the address.Check if the
countryrequires azipcodeCOUNTRIES_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 Statesvalidate against regexUNITED_STATES_ZIP_REGEX. If country isUnited Kingdomthen validate against regexUNITED_KINGDOM_ZIP_REGEX.
curl -X POST 'https://api.rechargeapps.com/addresses' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"customer_id": 22152215,
"address1": "1776 Washington Street",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country_code": "US",
"first_name": "John",
"last_name": "Doe",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"phone": "5551234567",
"presentment_currency": "USD",
"province": "California",
"zip": "90404"
}'{
"address": {
"id": 42171447,
"address1": "1030 Barnum Ave",
"address2": "Suite 101",
"city": "Stratford",
"company": "Fake Company",
"country_code": "US",
"created_at": "2022-10-12T20:16:09+00:00",
"customer_id": 37657002,
"discounts": [],
"first_name": "Fake First",
"last_name": "Fake Last",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"order_note": "My recurring order note",
"phone": "999-999-9999",
"presentment_currency": "USD",
"province": "Connecticut",
"shipping_lines_conserved": [],
"shipping_lines_override": [],
"updated_at": "2022-10-12T20:16:09+00:00",
"zip": "06614"
}
}#Retrieve an address
GET/addresses/{id}
Retrieves address for customer based on specified address id.
Scope
read_customersQuery parameters
- A comma-separated list of related resources to embed in the
includeattribute of eachAddress.Possible valuescustomerpayment_methodssubscriptionsdiscountonetimescharge_activities
curl 'https://api.rechargeapps.com/addresses/21317826' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"address": {
"id": 42171447,
"payment_method_id": 17874235,
"address1": "1030 Barnum Ave",
"address2": "Suite 101",
"city": "Stratford",
"company": "Fake Company",
"country_code": "US",
"created_at": "2022-10-12T20:16:09+00:00",
"customer_id": 37657002,
"discounts": [],
"first_name": "Fake First",
"last_name": "Fake Last",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"order_note": "My recurring order note",
"phone": "999-999-9999",
"presentment_currency": "USD",
"province": "Connecticut",
"shipping_lines_conserved": [],
"shipping_lines_override": [],
"updated_at": "2022-10-12T20:16:09+00:00",
"zip": "06614"
}
}#Update an address
PUT/addresses/{id}
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": []}Scope
write_customersNote: When updating the
country property you will have to update the zip property as well, otherwise you will receive an error.Query parameters
- Controls when the queued charges on the
Addressare updated after the request applies or removes a discount. Iftrue, the charges are updated before the response is returned. Iffalse, they are updated asynchronously. The default depends on the store's configuration.
Body parameters
- address1stringThe street associated with the
Address. Minimum length is 1 character. - address2stringAny additional information associated with the shipping address.
- citystringThe city associated with the shipping address. Minimum length is 1 character.
- companystringThe company associated with the shipping address.
- country_codestring2-letter country code.Check if the
storesupports shipping to this country. This is set by the merchant in their Shipping Settings page. - A list of up to 10 custom attributes to attach to the
Eventcreated by this request. They are returned in thecustom_attributesof thatEvent. - discountsarray of objectsA discount which will be applied on the address. While the
discountsparameter 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. - first_namestringThe customer’s first name associated with the address. Minimum length is 1 character.
- last_namestringThe customer’s last name associated with the address. Minimum length is 1 character.
- order_attributesarray of objectsExtra information that is added to the order.
- order_notestringNotes to be added to all orders associated with the address.
- payment_method_idintegerPayment method id for the
Payment_methodto be associated to this address. - phonestringThe phone number associated with the address. Must be included in the request schema but can be an empty string.
- provincestringThe state or province associated with the address. Check if country requires a province
COUNTRIES_REQUIRING_PROVINCE. - Used when shipping rates need to be overridden. If this parameter has value
null, rates will be fetched when a relatedChargeis created or regenerated. - zipstringThe zip or postal code associated with the address. Check if the country requires a zip code
COUNTRIES_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 Statesthen validate against regexUNITED_STATES_ZIP_REGEX. If country isUnited Kingdomthen validate against regexUNITED_KINGDOM_ZIP_REGEX.
curl -X PUT 'https://api.rechargeapps.com/addresses/38700614' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"address1": "1776 Washington Street"
}'{
"address": {
"id": 42171447,
"payment_method_id": 17874235,
"address1": "1030 Barnum Ave",
"address2": "Suite 101",
"city": "Stratford",
"company": "Fake Company",
"country_code": "US",
"created_at": "2022-10-12T20:16:09+00:00",
"customer_id": 37657002,
"discounts": [],
"first_name": "Fake First",
"last_name": "Fake Last",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"order_note": "My recurring order note",
"phone": "999-999-9999",
"presentment_currency": "USD",
"province": "Connecticut",
"shipping_lines_conserved": [],
"shipping_lines_override": [],
"updated_at": "2022-10-12T20:16:09+00:00",
"zip": "06614"
}
}#Delete an address
DELETE/addresses/{id}
It is possible to delete certain addresses from the store using API.
Scope
write_customersOnly
Addresses with no active Subscriptions can be deleted.curl -X DELETE 'https://api.rechargeapps.com/addresses/38700614' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{}#List addresses
GET/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>Scope
read_customersYou can combine
created_at_min and created_at_max to return all addresses created in the given timespan. This also applies to updated_at_min and updated_at_max parameters.Query parameters
- created_at_maxdatetimeReturns addresses created before the given time.
- created_at_mindatetimeReturns addresses created after the given time.
- The
next_cursororprevious_cursorvalue from a previous response, used to retrieve the next or previous page of results. Whencursoris passed, onlylimitcan be passed with it. - customer_idintegerUnique identifier of the customer.
- discount_codestringReturns addresses that have the provided discount_code.
- discount_idintegerReturns addresses that have the provided discount_id.
- idsstringFilter addresses by id. If passing multiple values, must be comma separated. Non-integer values will result in a 422 error
- A comma-separated list of related resources to embed in the
includeattribute of eachAddress.onetimescan only be requested together with thecustomer_idfilter.Possible valuescustomerpayment_methodssubscriptionsdiscountonetimescharge_activities - limitstringThe amount of results. Default is 50 while the maximum is 250.
- Returns addresses that have exactly the given number of processed charges. A value of
0is ignored. - 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, use cursor pagination.
- Returns addresses associated with the given
Payment Method. - Sort order of the results. Default is
id-desc.Possible valuesid-ascid-descupdated_at-ascupdated_at-desc - updated_at_maxstringReturns addresses updated before the given date.
- updated_at_minstringReturns addresses updated after the given time.
- is_activebooleanReturns active addresses.
curl 'https://api.rechargeapps.com/addresses?limit=3' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"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
POST/addresses/merge
Merges up to 10 source addresses into 1 target address.
Scope
write_customersIf one of the
Addresses being merged has a different presentment currency, the entire merge will fail and throw an error.source_addresses must contain between 1 and 10 addresses.Body parameters
- delete_source_addressesbooleanIndicates whether source addresses should be deleted.
- next_charge_datestringSpecifies the next charge date of the associated subscriptions on the target address.
- The address all of the subscriptions should be moved to.
Show child attributesHide child attributes1
- idintegerThe id of the address.
- The list of addresses that the subscriptions should move from.
Show child attributesHide child attributes11 new
- The id of the address.
curl -X POST 'https://api.rechargeapps.com/addresses/merge' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"target_address": {
"id": 42171447
},
"source_addresses": [
{
"id": 42171446
},
{
"id": 42171445
}
]
}'{
"address": {
"id": 42171447,
"payment_method_id": 17874235,
"address1": "1030 Barnum Ave",
"address2": "Suite 101",
"city": "Stratford",
"company": "Fake Company",
"country_code": "US",
"created_at": "2022-10-12T20:16:09+00:00",
"customer_id": 37657002,
"discounts": [],
"first_name": "Fake First",
"last_name": "Fake Last",
"order_attributes": [
{
"name": "custom name",
"value": "custom value"
}
],
"order_note": "My recurring order note",
"phone": "999-999-9999",
"presentment_currency": "USD",
"province": "Connecticut",
"shipping_lines_conserved": [],
"shipping_lines_override": [],
"updated_at": "2022-10-12T20:16:09+00:00",
"zip": "06614"
}
}#Skip future charge
POST/addresses/{id}/charges/skip
Skip a
Charge in the future for one or multiple Subscriptions associated with the Address.Scope
write_ordersIf the
Charge does not exist on the date, it will be created with a SKIPPED status.subscription_ids must contain between 1 and 35 ids.Body parameters
- The date in the future of the
Chargeto be skipped.This date must be within the delivery schedules of theCustomer. - A list containing the
SubscriptionIDs to be skipped.
Response attributes
- idintegerThe unique numeric identifier for the
Charge. - address_idintegerThe ID of the shipping
Addresstied to theCharge. - analytics_dataobjectAn object containing analytics data associated with the
Charge.Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_paramobjects.Show child attributesHide child attributes7
- utm_campaignstringThe UTM campaign.
- utm_contentstringThe UTM content.
- utm_data_sourcestringThe source of the campaign parameter.
- utm_sourcestringThe UTM source.
- utm_mediumstringThe UTM medium.
- utm_termstringThe UTM term.
- utm_timestampstringThe UTM timestamp.
- billing_addressobjectAll the billing information related to the charge.
Show child attributesHide child attributes10
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- country_codestring2-letter country code.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code or postcode of the address.
- client_detailsobjectDetails of the access method used by the purchaser.
Show child attributesHide child attributes2
- browser_ipstringThe IP address of the buyer as detected in
Checkout. - user_agentstringThe user agent detected during
Checkout.
- created_atdatetimeThe date and time when the transaction was created.
- currencystringThe code of the currency for this
Charge, such asUSD.Related guides: Supported currencies - customerobjectAn object containing
Customerinformation associated with thisCharge.Show child attributesHide child attributes4
- idintegerThe ID of the associated customer record.
- emailstringThe user email.
- external_customer_idobjectAn object containing customer information associated with this charge.
Show child attributesHide child attributes1
- ecommercestringThe customer ID as it appears in the external e-commerce platform.
- hashstringThe hash of the
Customerassociated with theCharge.
- discountsarray of objectsAn array of
Discountsassociated with theCharge.Show child attributesHide child attributes4
- idintegerThe ID of the
Discount. - codestringThe code of the
Discount. - valuefloatThe value of the
Discount. - value_typestringThe type of the value of the
Discount.Possible valuespercentagefixed_amount
- errorstringError reason as sentence text (typically returned direct from the payment processor). e.g.
"error": "Customer needs to update credit card" - error_typestringStructured reason why the charge failed such as
CUSTOMER_NEEDS_TO_UPDATE_CARD. - charge_attemptsintegerShows how many times an attempt to charge was placed.
- Indicates if Recharge was able to find the
external_variant_idfrom theCharge. - external_order_idobjectAn object containing the associated external order ID.
Show child attributesHide child attributes1
- ecommercestringThe order ID as it appears in the external e-commerce platform.
- external_transaction_idobjectAn object containing the associated external transaction ID.
Show child attributesHide child attributes1
- payment_processorintegerThe ID of the associated transaction in a payment processor system (like Stripe).
- has_uncommited_changesbooleanSpecifies whether the
Chargeis scheduled for a regeneration (if theSubscriptionrelated to the charge was updated in the last 5 seconds usingcommit=false). - line_itemsarray of objectsA list of
line_itemobjects, each containing information about a distinct purchase item.Show child attributesHide child attributes20
- purchase_item_idintegerThe
SubscriptionorOnetimeID associated with theline_item. - external_product_idobjectAn object containing the associated product ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- external_variant_idobjectAn object containing the associated variant ID as it appears in the external system.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- gramsintegerThe weight of the item in grams.
- handlestringA unique, human-friendly string for the
Product. - imagesobjectAn object containing URLs of the
Productimage.Show child attributesHide child attributes5
- largestringThe url where a large image file is located.
- mediumstringThe url where a medium image file is located.
- smallstringThe url where a small image file is located.
- originalstringThe url of the original sized product image.
- sort_orderintegerThe sort order in which the x image from the array should appear when displayed.
- original_pricestringThe original price of the
line_itemwithout discounts or taxes. - propertiesarray of objectsAn array of name value pairs of additional
line_itemattributes. - purchase_item_typestringAn indicator of the type of the purchase item.Possible values
subscriptiononetime - quantityintegerThe quantity of the
line_item. - skustringThe SKU (stock keeping unit) of the
Productassociated with theline_item. - tax_duestringThe total tax due associated with the
line_item. - tax_linesarray of objectsan array containing
tax_lineobjects associated with thisline_item. - taxablebooleanA boolean indicating if the
line_itemis taxable or non-taxable. - taxable_amountstringThe taxable revenue associated with the
line_item. - titlestringThe title of the
Productof thisline_item. - total_pricestringThe total price of the
line_itemincluding tax. - unit_pricestringThe unit price of the
line_item. - unit_price_includes_taxbooleanA boolean indicator if tax is included in the price of an item.
- variant_titlestringThe name of a variant of the
Productof thisline_item.
- notestringNotes associated with the
Charge. - order_attributesarray of objectsAn array of name-value pairs of order attributes on the
Charge. - orders_countintegerThe number of
Ordersgenerated from thisCharge(>1 for prepaidSubscriptions). - payment_processorstringThe payment processor used for this
Charge. - processed_atdatetimeThe date and time when the transaction was processed.
- retry_datedateThe date when the next attempt will be placed.
- scheduled_atdateThe date time of when the
Chargeis/was scheduled to process. - shipping_addressobjectThe shipping
Addressof theCharge.Show child attributesHide child attributes10
- address1stringLine one of the billing address.
- address2stringLine two of the billing address.
- citystringThe city of the billing address.
- companystringThe company name of the billing address.
- country_codestring2-letter country code.
- first_namestringThe first name of the billing address.
- last_namestringThe last name of the billing address.
- phonestringThe phone number of the billing address.
- provincestringThe name of the province or state associated with the billing address.
- zipstringThe zip code or postcode of the address.
- shipping_linesarray of objectsAn array of shipping lines associated with the
Charge.Show child attributesHide child attributes6
- codestringThe code associated with the
shipping_lineof aCharge. - pricestringThe price of the
shipping_line. - sourcestringThe source of the
shipping_line. - titlestringThe title of the
shipping_line. - taxablestringA boolean indicating if the
shipping_lineis taxable. - An array of tax lines associated with the
shipping_line.
- statusstringThe status of the
Charge.Possible valuessuccesserrorqueuedskippedrefundedpartially_refundedpending_manual_paymentpending - subtotal_pricestringThe combined price of all
line_itemswithout taxes and shipping. - tax_linesarray of objectsAn array of tax lines that apply to the
Charge. - taxablebooleanA boolean indicator of the taxability of the
Charge. - taxes_includedbooleanWhether taxes are included in the order subtotal.
- total_discountsstringThe sum of the
Discountsapplied to theCharge. - total_line_items_pricestringThe total price of all line items of the
Charge. - total_pricestringThe sum of all the prices of all the items in the
Charge, taxes and discounts included (must be positive). - total_refundsstringThe sum of all refunds that were applied to the
Charge. - total_taxstringThe total tax due associated with the
Charge. - total_weight_gramsintegerThe total weight of the
Charge’s line items in grams. - typestringAn indicator of the
Charge’s type, either checkout or recurring.Possible valuescheckoutrecurring - updated_atdatetimeThe date time at which the
Chargewas most recently updated.
curl -X POST 'https://api.rechargeapps.com/addresses/91977136/charges/skip' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"date": "2022-09-15",
"purchase_item_ids": [
27363808,
27363809
]
}'{
"charge": {
"id": 377749210,
"address_id": 42171447,
"analytics_data": {
"utm_params": [
{
"utm_source": "facebook",
"utm_medium": "cpc"
}
]
},
"billing_address": {
"address1": "601 SW Washing St.",
"address2": "Suite 101",
"city": "Portland",
"company": "Acme Corp",
"country_code": "US",
"first_name": "Jane",
"last_name": "Doe",
"phone": "888-888-8888",
"province": "Oregon",
"zip": "97205"
},
"client_details": {
"browser_ip": "192.168.0.1",
"user_agent": "safari webkit"
},
"created_at": "2021-11-09T19:22:13+00:00",
"currency": "USD",
"customer": {
"id": 37657002,
"email": "test@test.com",
"external_customer_id": {
"ecommerce": "2879413682227"
},
"hash": "7e706455cbd13e40"
},
"discounts": [
{
"id": 12345,
"code": "TESTCODE10",
"value": 10,
"value_type": "fixed_amount"
}
],
"error": null,
"error_type": null,
"external_order_id": {
"ecommerce": "2541635698739"
},
"external_transaction_id": {
"payment_processor": "ch_1HzWElJ2zqHvZRd1TWKFFqDR"
},
"has_uncommitted_changes": false,
"line_items": [
{
"purchase_item_id": 63898947,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "999999999999"
},
"grams": 454,
"handle": "shirt-package",
"images": {
"large": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_large.jpg",
"medium": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_medium.jpg",
"original": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h.jpg",
"small": "https://example-cdn.com/s/files/1/0257/0351/4163/products/il_570xN.1723312095_a43h_small.jpg"
},
"original_price": "10.00",
"properties": [
{
"name": "Color",
"value": "Blue"
}
],
"purchase_item_type": "subscription",
"quantity": 1,
"sku": "TOM0001",
"tax_due": "1.30",
"tax_lines": [
{
"price": "0.9931",
"rate": "0.0725",
"title": "CA State Tax",
"unit_price": "0.3310"
},
{
"price": "0.3082",
"rate": "0.0225",
"title": "LA County Tax",
"unit_price": "0.1027"
}
],
"taxable": true,
"taxable_amount": "10.00",
"title": "Shirt package",
"total_price": "11.30",
"unit_price": "10.00",
"unit_price_includes_tax": false,
"variant_title": "Blue T-shirt"
}
],
"note": "next order in sequence 3",
"order_attributes": [
{
"name": "Checkout-Method",
"value": "delivery"
}
],
"orders_count": 1,
"payment_processor": "stripe",
"processed_at": null,
"retry_date": null,
"scheduled_at": "2021-12-09",
"shipping_address": {
"address1": "1030 Barnum Ave",
"address2": "Suite 101",
"city": "Stratford",
"company": "Fake Company",
"country_code": "US",
"first_name": "Fake First",
"last_name": "Fake Last",
"phone": "999-999-9999",
"province": "Connecticut",
"zip": "06614"
},
"shipping_lines": [
{
"code": "Standard",
"price": "4.90",
"source": "shopify",
"taxable": true,
"tax_lines": [
{
"price": "0.355",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.110",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"title": "Standard"
}
],
"status": "skipped",
"subtotal_price": "10.00",
"tags": "Subscription, Subscription Recurring Order",
"tax_lines": [
{
"price": "0.950",
"rate": 0.0725,
"title": "CA State Tax"
},
{
"price": "0.335",
"rate": 0.0225,
"title": "Los Angeles County Tax"
}
],
"taxable": true,
"total_discounts": "10.0",
"total_line_items_price": "10.00",
"total_price": "11.29",
"total_refunds": "0.00",
"total_tax": "1.29",
"total_weight_grams": 454,
"type": "recurring",
"updated_at": "2021-11-09T23:59:32+00:00"
}
}#Validate an addressNew
POST/addresses/validate
Validates that the zip code and state of a US address match. Returns
200 with the normalized state and zip code when the address is valid, and 422 with an errors object when it is not. No specific scope is required.Body parameters
- address1stringThe street associated with the address.
- address2stringAny additional information associated with the address.
- citystringThe city associated with the address.
- provincestringThe state associated with the address. Accepts the full name or the 2-letter abbreviation.
- zipstringThe zip code associated with the address, in the 5 digit or 5-4 format.
curl -X POST 'https://api.rechargeapps.com/addresses/validate' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"city": "santa monica",
"state": "CA",
"state_name": "California",
"zipcode": "90404",
"errors": {}
}