post
https://www.pelcro.com/api/v1/core/subscriptions/redeem
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Overview
Redeem a gift subscription for a customer. This activates a gifted subscription that was purchased by another user. Two modes: create a new subscription for the recipient, or add the gift as a renewal phase to an existing subscription.
Example: A customer receives a gift code from a friend. Use this endpoint to activate the gift and start their subscription.
Conditional Requirements
| Condition | Required Fields |
|---|---|
| Always | gift_code, user_id |
| Adding to existing subscription | subscription_id |
| Plan requires shipping address | address_id |
| Gift must be paid | is_paid must be true on the donor subscription |
| Gift must not be redeemed | is_redeemed must not be true |
Behavior
- New subscription (no subscription_id): Creates a new subscription with a system gift coupon (100% discount), set to cancel at period end
- Add to existing (subscription_id provided): Adds a renewal phase to the existing subscription using the gift plan and coupon
- Gift donor subscription is marked as
is_redeemed: trueafter successful redemption - A gift code can only be redeemed once
Webhook
New subscriptions trigger subscription.created. Adding to an existing subscription triggers subscription.renewed.
