Gift subscription

Renew a gift the authenticated customer gave, for another term. plan_id, subscription_id, and quantity are required; payment fields and address_id (when the plan ships) are optional. Returns the customer resource with a fresh JWT.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Renew a gift the authenticated customer gave, for another term. plan_id, subscription_id, and quantity are required; payment fields and address_id (when the plan ships) are optional. Returns the customer resource with a fresh JWT.

Example:

curl --request POST \
  --url 'https://www.pelcro.com/api/v1/sdk/subscription/gift/renew?site_id=1232' \
  --header 'Authorization: Bearer <JWT>' \
  --header 'Content-Type: application/json' \
  --data '{ "subscription_id": 4055, "plan_id": 4051, "quantity": 1 }'

Notes

  • Protected — requires the customer's JWT.
  • Validation failures return 400 with a message.
Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
int32
required

The unique identifier of plan the subscription should renew on. If you associated a customer segment to the plan, a validation will be performed. Therefore, it is recommended to validate against eligible plans for the customer first. Always required.

int32
required

The unique identifier of the subscription to renew. Always required.

integer
required

Quantity for this subscription, always 1 by default.

string
enum
Defaults to stripe

The optional payment gateway, one of stripe, braintree, vantiv, tap or cybersource. Always defaults to stripe.

Allowed:
string

The single-use token that represents the payment method details. Typically generated using the payment gateway's tools and libraries. This payment method will be used to attempt payments for the subscription.

string | null

Legacy Stripe card token. Prefer payment_gateway + gateway_token or source_id.

int32

The unique identifier of chargeable payment method already attached to the customer, which will be used to attempt payments for this subscription.

string

An optional coupon code to apply a discount to the subscription renewal. If you associated a customer segment to the coupon, a validation will be performed. Therefore, it is recommended to validate against eligible coupons for the customer first.

int32

The identifier of the shipping address to associate with the subscription. Required if related product requires an address, if product is available only in certain countries, or if tax feature is enabled under your account.

Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json