Crear sesión del portal de facturación de Stripe
POST
/billing/portal
const url = 'https://api.dev.lade.com.mx/billing/portal';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"teamId":"550e8400-e29b-41d4-a716-446655440000","returnUrl":"https://app.lade.com.mx/dashboard/my-suscription"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dev.lade.com.mx/billing/portal \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "returnUrl": "https://app.lade.com.mx/dashboard/my-suscription" }'Crea una sesión del Stripe Customer Portal para que el equipo administre su método de pago, facturas y cancelación. Requiere rol OWNER o ADMIN y que el equipo ya tenga un Stripe Customer (haber pasado por checkout al menos una vez).
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
teamId
required
string format: uuid
returnUrl
required
string format: uri
Example
{ "teamId": "550e8400-e29b-41d4-a716-446655440000", "returnUrl": "https://app.lade.com.mx/dashboard/my-suscription"}Responses
Sección titulada «Responses»Sesión del portal creada
Media typeapplication/json
object
portalUrl
string format: uri
Example
{ "portalUrl": "https://billing.stripe.com/p/session/a1b2c3..."}Solicitud inválida
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Validation failed", "field": "email", "message": "Invalid email format"}Sin permisos
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Forbidden", "message": "You don't have permission to access this resource"}Recurso no encontrado
Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{ "error": "Not found", "message": "Resource not found"}