Dashboard
APICreate Payment Request
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Mock
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Create Payment Request

Generate a checkout session for a user to purchase a subscription plan. The API creates a payment intent with your configured provider and returns details you can use to redirect the user to complete payment. Optionally apply coupon codes for discounts.

POST/v2/projects/{project_id}/payment-requests

Authorization

Bearer TokenRequired

Path Parameters

project_idstringrequired

The unique identifier of the project.

Request Body

plan_idstringrequired

The plan UUID to purchase. The payment is created for the authenticated caller.

merchant_account_idstring

Merchant account UUID to use. Required unless paying with account balance (provider: 'internal').

amountstring

Override the charged amount as a decimal string; defaults to the plan price. When coupon_id is supplied this is the GROSS — do not pre-discount on the client.

coupon_idstring

Optional coupon UUID to apply. The provider charges the discounted NET; do not pre-discount amount.

providerstring

Payment provider override. Pass 'internal' to pay with the customer's account balance.

Last updated: