CreateCheckoutSession
POST
/billing/v1/checkoutRequest Body
requiredapplication/json{
"$ref": "#/components/schemas/billing.v1.CreateCheckoutSessionRequest",
"$ref-value": {
"type": "object",
"properties": {
"org_id": {
"type": "string",
"examples": [
"OR98234j23"
],
"title": "org_id"
},
"stripe_price_id": {
"type": "string",
"title": "stripe_price_id",
"minLength": 1
},
"success_url": {
"type": "string",
"examples": [
"https://billing.example.com/portal"
],
"title": "success_url",
"minLength": 1,
"format": "uri"
},
"cancel_url": {
"type": "string",
"examples": [
"https://billing.example.com/portal"
],
"title": "cancel_url",
"minLength": 1,
"format": "uri"
}
},
"title": "CreateCheckoutSessionRequest",
"required": [
"stripe_price_id",
"success_url",
"cancel_url"
],
"additionalProperties": false
}
}Response Body
200application/json
Success
type: unknown
{
"$ref": "#/components/schemas/billing.v1.HostedCheckoutSessionResponse",
"$ref-value": {
"type": "object",
"properties": {
"session_id": {
"type": "string",
"examples": [
"Tg6Rf4e2W1"
],
"title": "session_id"
},
"session_url": {
"type": "string",
"examples": [
"https://billing.example.com/portal"
],
"title": "session_url"
},
"amount": {
"type": "number",
"examples": [
"29.99"
],
"title": "amount",
"format": "double"
},
"currency": {
"type": "string",
"examples": [
"usd"
],
"title": "currency"
}
},
"title": "HostedCheckoutSessionResponse",
"additionalProperties": false
}
}curl -X POST "https://api.rixl.com/billing/v1/checkout" \
-H "Content-Type: application/json" \
-d '{
"stripe_price_id": "string",
"success_url": "https://billing.example.com/portal",
"cancel_url": "https://billing.example.com/portal"
}'Success
application/json
{
"$ref": "#/components/schemas/billing.v1.HostedCheckoutSessionResponse",
"$ref-value": {
"type": "object",
"properties": {
"session_id": {
"type": "string",
"examples": [
"Tg6Rf4e2W1"
],
"title": "session_id"
},
"session_url": {
"type": "string",
"examples": [
"https://billing.example.com/portal"
],
"title": "session_url"
},
"amount": {
"type": "number",
"examples": [
"29.99"
],
"title": "amount",
"format": "double"
},
"currency": {
"type": "string",
"examples": [
"usd"
],
"title": "currency"
}
},
"title": "HostedCheckoutSessionResponse",
"additionalProperties": false
}
}