Skip to main content
POST
/
v1
/
billing
/
checkout-sessions
Create a Stripe checkout session
curl --request POST \
  --url http://0.0.0.0:3000/v1/billing/checkout-sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planId": 2,
  "redirectUrl": "https://app.example.com/billing/success"
}
'
{
  "url": "https://checkout.stripe.com/pay/cs_test_xxx"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
planId
number
required

ID do plano a assinar

redirectUrl
string<uri>
required

URL de redirecionamento pós-pagamento

Response

Checkout session created

url
string

URL do checkout Stripe