Clara-Backend
  1. Stripe
Clara-Backend
  • Clara-Backend
    • Get Started
    • Quickstart (Rest API)
    • Quickstart (MCP Server)
    • Auth
      • Register
      • Google OAuth
      • Login
      • Logout
      • Change Password
      • Send OTP
      • Activate
      • Enable 2FA
      • Disable 2FA
    • User
      • View
      • Update
    • API Key
      • View
      • Reset
    • Transaction
      • View All
      • View
    • Task
      • View All
      • View
    • Agent
      • Supported Attachments
      • Analysis
    • Stripe
      • Rate
        GET
      • Portal
        POST
      • Buy
        POST
    • Misc
      • Health
      • Version
  • Flask Backend Boilerplate
    • Get Started
    • Quickstart
    • Auth
      • Register
      • Google OAuth
      • Login
      • Logout
      • Change Password
      • Send OTP
      • Activate
      • Enable 2FA
      • Disable 2FA
    • User
      • View
      • Update
    • Transaction
      • View All
      • View
    • Stripe
      • Rate
      • Portal
      • Buy
    • Misc
      • Health
      • Version
  1. Stripe

Buy

Prod Env
https://backend.crazi.co/api/v1
Prod Env
https://backend.crazi.co/api/v1
POST
https://backend.crazi.co/api/v1
/stripe/buy
This endpoint lets a user buy credits in USD using Stripe checkout session hosted page.
Before purchasing, please fetch the rate using the Rate endpoint. Credits can only be bought between the lower_limit and upper_limit. Any amount outside of the limit will not be credited. For bigger purchases please reach out to us at hello@crazi.co.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params application/json

Examples

Responses

🟢201Success
text/plain
🟠400Bad Request
🟠401Unauthorized
🟠404Resource Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://backend.crazi.co/api/v1/stripe/buy' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount": 5,
  "return_path": ""
}'
Response Response Example
201 - Success
{
  "data": {
    "return_path": "",
    "url": "https://checkout.stripe.com/c/pay/cs_test_b1VbQddiB8glIwXq9TJrqDwnrHm4ukkRV1VewkBbb7Zq96ms5HYfqBYMe2#fidnandhYHdWcXxpYCc%2FJ2FgY2RwaXEnKSdqd2xibGtGamtxYH1xJz8ncmBnJyknZHVsTmB8Jz8ndW5acWB2cVowNFZDdzdoTnJcazB3T3U8S2YwMmtNZH1Kd1djUEtfYWpzQ1ZBQ3UwYTcwfX1GVzZNMTx8dUtjM0Y9Y19Qb1dMSHxPSkZMVnJMNDJvME5QcEZnXDQxQ31pQjU1NEhddGNsQFEnKSdjd2poVmB3c2B3Jz9xd3BgKSdnZGZuYndqcGthRmppancnPycmY2NjY2NjJyknaWR8anBxUXx1YCc%2FJ2hwaXFsWmxxYGgnKSdga2RnaWBVaWRmYG1qaWFgd3YnP3F3cGB4JSUl",
    "value_in_credits": 500,
    "value_in_fiat": 5
  },
  "message": "Checkout session created successfully.",
  "status": "success"
}
Modified at 2025-11-27 07:45:44
Previous
Portal
Next
Misc
Built with