You're viewing the docs for Autumn's v2 API. You can find the previous API version here.
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.rewards.redeemCode({
code: "REWARD10",
customerId: "cus_456",
});{
"reward_id": "reward_789",
"entitlements_granted": [
{
"feature_id": "messages",
"balance": 100
}
]
}
Redeem a reward promo code for a customer.
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.rewards.redeemCode({
code: "REWARD10",
customerId: "cus_456",
});{
"reward_id": "reward_789",
"entitlements_granted": [
{
"feature_id": "messages",
"balance": 100
}
]
}
Documentation Index
Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
{
"reward_id": "reward_789",
"entitlements_granted": [
{
"feature_id": "messages",
"balance": 100
}
]
}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.