Note: This operation optionally supports 3DS verification flow. To achieve the same, create the Payment Intent and pass it as input parameter to this API.
Creates a gift subscription with the gifter and receiver. Only plans marked as gift plans can be used to create gift subscription. It may also have addons and coupons. A gift is initially created in 'scheduled' state and the gift subscription will be created in 'future' state and invoiced immediately.
Term start and term end dates are determined based on whether the gift is claimed. Before claim, term start date is the subscription start date. Term end date occurs at the end of the plan's frequency. Once the gift is claimed, the gift claim date becomes the term start date and the term end date will be set as the end of the plan's frequency.
Sample Request
URL Format
Input Parameters
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.
List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
Returns
Resource object representing gift
Resource object representing subscription
Resource object representing invoice