Skip to main content
POST
Redeem a gift code

Body Parameters

Example Request

Response

Returns the subscription object created from the redeemed gift.
Each gift code can only be redeemed once. Attempting to redeem an already-used code returns a 422 validation error.
Gift subscriptions automatically expire at the end of the gifted period. The cancel_at_period_end flag is set to true by default. The recipient can convert to a paid subscription before the gift period ends.

Authorizations

Authorization
string
header
required

Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.

Body

application/json
code
string
required
recipient_customer_id
string<uuid>
required

Response

The subscription created by the redemption.

id
string<uuid>
tenant_id
string<uuid>
customer_id
string<uuid>
plan_id
string<uuid>
status
enum<string>
Available options:
trialing,
active,
past_due,
paused,
canceled,
unpaid
current_period_start
string<date-time>
current_period_end
string<date-time>
cancel_at_period_end
boolean
canceled_at
string<date-time>
cancellation_reason
string
cancellation_feedback
string
billing_anchor
string<date-time>
billing_anchor_type
string
billing_anchor_day
integer
payment_terms
string
coupon_id
string<uuid>
reference_id
string
mandate_id
string<uuid>
razorpay_subscription_id
string
stripe_subscription_id
string
created_at
string<date-time>
updated_at
string<date-time>