Recharge for developers
Navigate our developer resources to quickly and successfully launch Recharge for your store
Update the next charge date of a subscription
Merge addresses
Apply a recurring discount to an address
Create a collection
Create a discount
// SDK in JavaScript
import { updateSubscriptionChargeDate } from '@rechargeapps/storefront-client';
await updateSubscriptionChargeDate(session, 27363808, '2022-10-18');
# REST API in Python
import requests
import json
headers = {
"X-Recharge-Version": "2021-11",
"Content-Type": "application/json",
"X-Recharge-Access-Token": "your_api_token"
}
url = "https://api.rechargeapps.com/subscriptions/27363808/set_next_charge_date"
data = {"date": "2022-10-18"}
result = requests.post(url, data=json.dumps(data), headers=headers)
print(json.dumps(json.loads(result.text), indent=2))
// SDK in JavaScript
import { mergeAddresses } from '@rechargeapps/storefront-client';
await mergeAddresses(session, {
target_address: { id: 42171447 },
source_addresses: [{ id: 42171446 }, { id: 42171445 }],
});
# REST API in Python
import requests
import json
headers = {
"X-Recharge-Version": "2021-11",
"Content-Type": "application/json",
"X-Recharge-Access-Token": "your_api_token"
}
url = "https://api.rechargeapps.com/addresses/merge"
data = {"target_address": {
"id": 42171447},
"source_addresses": [
{
"id": 42171446
}, {
"id": 42171445
}
]
}
result = requests.post(url, data=json.dumps(data), headers=headers)
print(json.dumps(json.loads(result.text), indent=2))
// SDK in JavaScript
import { applyDiscountToAddress } from '@rechargeapps/storefront-client';
await applyDiscountToAddress(session, 123, 'discount_code');
# REST API in Python
import requests
import json
headers = {
"X-Recharge-Version": "2021-11",
"Content-Type": "application/json",
"X-Recharge-Access-Token": "your_api_token"
}
url = "https://api.rechargeapps.com/addresses/38700614"
data = {
"discount_id": 1234567
}
result = requests.post(url, data=json.dumps(data), headers=headers)
print(json.dumps(json.loads(result.text), indent=2))
// SDK in JavaScript
// The Javascript SDK is designed for storefront customizations with built-in authentication to prevent access to sensitive data or administrative functions like creating a collection.
# REST API in Python
import requests
import json
headers = {
"X-Recharge-Version": "2021-11",
"Content-Type": "application/json",
"X-Recharge-Access-Token": "your_api_token"
}
url = "https://api.rechargeapps.com/collections"
data = {
"description": "cat products new release",
"title": "Cats Spring 2022"
}
result = requests.post(url, json.dumps(data), headers=headers)
print(json.dumps(json.loads(result.text), indent=2))
// SDK in JavaScript
// The Javascript SDK is designed for storefront customizations with built-in authentication to prevent access to sensitive data or administrative functions like creating a discount.
# REST API in Python
import requests
import json
headers = {
"X-Recharge-Version": "2021-11",
"Content-Type": "application/json",
"X-Recharge-Access-Token": "your_api_token"
}
url = "https://api.rechargeapps.com/discounts"
data = {
"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"
}
result = requests.post(url, json.dumps(data), headers=headers)
print(json.dumps(json.loads(result.text), indent=2))
Growing reach & impact
50M+
API Requests per day
5000+
Webhooks Delivered per Minute
5800+
Stores Using Recharge API
12K+
Developers Using Recharge API