Gift represents a subscription of a customer(recipient) to a 'gift plan' which has been gifted by another customer(gifter). It may also have addons and coupons. Gift will be created only on immediate successful payment collection from the gifter's payment method.
Gift is initially created in 'scheduled' state. The gift can be scheduled to be notified on a particular date to the recipient by passing 'scheduled_at'. If not, the recipient is notified immediately. Gift will be moved to 'unclaimed' state on the date of notification. If you pass auto_claim as true, gift status will be moved to 'claimed' immediately, otherwise, the gift will remain 'unclaimed' till the recipient claims the gift.
If the gift is not claimed before the claim_expiry_date, it will be moved to the 'expired' state.
GIFT SUBSCRIPTION
Gift subscriptions will be created in 'future' state. Once the gift is claimed, the subscription will be moved to 'non-renewing' state.
INVOICE
Gift subscriptions will be invoiced immediately. The invoice created has is_gifted as 'true' and term_finalized as 'false'. This is because initially the invoice term_start and term_end are set as the subscription's start_date till the end of the plan period. Once the gift is claimed, the invoice's term_finalized will be marked as 'true'. The term_start will be changed to the actual invoice's term, which is the gift-claim date and the term_end will be changed till plan's period.
API Index URL
Sample GiftJSON
Gifts attributes
Status of the gift.
Gift has been scheduled.
Gift is not yet claimed and is ready to be claimed.
Gift is claimed.
Gift is cancelled.
Gift is expired.
Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.
When true
, the claim happens automatically. When not passed, the default value in the site settings is used.
When true
, indicates that the gift does not expire. Do not pass or pass as false
when auto_claim
is set.
The date until which the gift can be claimed. Must be set to a value after scheduled_at.
If the gift is not claimed within claim_expiry_date
, it will expire and the subscription will move to cancelled
state. When not passed, the value specified in the site settings will be used.
Pass as NULL
or do not pass when auto_claim
or no_expiry
are set.
Version number of this resource. The resource_version
is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
Timestamp indicating when this gift resource was last updated.