Skip to main content
POST
/
v1
/
billing
/
product-checkout-sessions
Create a Stripe checkout session for a product purchase
curl --request POST \
  --url http://0.0.0.0:3000/v1/billing/product-checkout-sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productId": 1,
  "redirectUrl": "https://app.example.com/products"
}
'
{
  "status": true,
  "data": {
    "checkoutUrl": "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
productId
number
required

ID do produto a comprar

redirectUrl
string<uri>
required

URL de redirecionamento pós-pagamento

Response

Checkout session created

url
string

URL do checkout Stripe