checkoutNewSubscription
This will open Connect in the checkout flow with a subscription already selected. The user's exact entry point depends on the combination of the selected plan and the provided payload. For instance, if you pass a SIM ID in the payload, Connect will skip the SIM selection screen. Upon successful purchase, if a callbackUrl
was provided, users will be redirected back to it when clicking the Continue button.
The request expects a checkoutNewSubscription
object that can define the plan
to buy a subscription for, a sim
, and a device
.
Creating a Connect Session with checkoutNewSubscription 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": "checkoutNewSubscription",
"checkoutNewSubscription": {
"plan": "pln_0U32ZjA60Z7P8Y5vLtmvXaIMEiPr",
"sim": "sim_0U32TCTS0Z7P8Y4gBoN1duXbdi2m"
}
},
"user": "usr_0U2ViuFW0Z7P8Y2S1L76mfADMT6m"
}'
Note:
- In contrast to the create subscription endpoint, it is currently not possible to pass in
auto
as a value for thesim
field to default to a new eSIM. The field also does not default toauto
, so if you leave it out, Connect will open on the SIM selection page. - Please make sure to pass a plan that is
active
to make sure the user can progress with the checkout in connect.
Where to go from here
- Read the Connect Sessions API Documentation
- Reach out to support@gigs.com for assistance