checkoutAddon
This will open Connect on the checkout page for an add-on, with the specified add-on for the given subscription already in the cart. The user will still need to manually initiate the payment. Upon successful purchase, if a callbackUrl
was provided, users will be redirected back to it when clicking the Continue button.
The request expects a checkoutAddon
object that defines the subscription
for which to purchase the add-ons as well as an array of addons
to purchase.
Creating a Connect Session with checkoutAddon intent
$ curl --request "POST" \
--url "https://api.gigs.com/projects/${GIGS_PROJECT}/connectSessions" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${GIGS_TOKEN}" \
--data '{
"callbackUrl": "https://example.com",
"intent": {
"type": "checkoutAddon",
"checkoutAddon": {
"subscription": "sub_0U32VAxJ0Z7P8Y40mBAnOP9LPhEr",
"addons": ["add_0U32Zonj0Z7P8Y0kDmHNLzgaevse"]
}
},
"user": "usr_0U2ViuFW0Z7P8Y2S1L76mfADMT6m"
}'
Where to go from here
- Read the Connect Sessions API Documentation
- Reach out to support@gigs.com for assistance