Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.referrals.redeemCode({
code: "REF123",
customerId: "cus_456",
});{
"id": "<string>",
"customer_id": "<string>",
"reward_id": "<string>"
}
Rewards & Referrals
Redeem Referral Code
Redeem a referral code for a customer.
POST
/
v1
/
referrals.redeem_code
Typescript (SDK)
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.referrals.redeemCode({
code: "REF123",
customerId: "cus_456",
});{
"id": "<string>",
"customer_id": "<string>",
"reward_id": "<string>"
}
Body Parameters
Response
{
"id": "<string>",
"customer_id": "<string>",
"reward_id": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
โI