Skip to main content
POST
/
api
/
v1
/
billing
/
subscription
/
checkout
Start or estimate a subscription
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/billing/subscription/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credits_per_user": 123,
  "seats": 123,
  "redirect_cancel_url": "<string>",
  "redirect_return_url": "<string>",
  "redirect_success_url": "<string>"
}
'
{
  "amount_cents": 123,
  "amount_display": "<string>",
  "client_secret": "<string>",
  "credits_per_user": 123,
  "has_payment_method": true,
  "interval": "<string>",
  "invoice_id": "<string>",
  "invoice_url": "<string>",
  "payment_methods": [
    {
      "brand": "<string>",
      "exp_month": 123,
      "exp_year": 123,
      "id": "<string>",
      "is_default": true,
      "last4": "<string>"
    }
  ],
  "seats": 123,
  "session_id": "<string>",
  "subscription_id": "<string>",
  "unit_price": 123,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
action
enum<string>
required
Available options:
estimate,
checkout
credits_per_user
integer
required
interval
enum<string>
required
Available options:
month,
year
seats
integer
required
redirect_cancel_url
string

Optional cancel redirect for the hosted checkout.

redirect_return_url
string

Optional return redirect for the hosted checkout.

redirect_success_url
string

Optional success redirect for the hosted checkout.

ui_mode
enum<string>

Checkout UI mode for action=checkout. "hosted" (default) returns a Stripe Checkout redirect url; "embedded" returns a client_secret for Stripe Embedded Checkout rendered inline; "elements" creates an incomplete subscription and returns the PaymentIntent client_secret for a Stripe Payment Element (Elements) rendered inline.

Available options:
hosted,
embedded,
elements

Response

Subscription estimate, redirect, or charged

action
enum<string>
required
Available options:
estimate,
redirect,
embedded,
elements,
charged
amount_cents
integer
amount_display
string
client_secret
string

Client secret for inline payment UI. Embedded Checkout session secret (action=embedded) or the subscription PaymentIntent secret for the Payment Element (action=elements).

credits_per_user
integer
has_payment_method
boolean
interval
string
invoice_id
string

Stripe Invoice ID (action=charged)

invoice_url
string
payment_methods
object[]
seats
integer
session_id
string
subscription_id
string

Stripe Subscription ID (action=elements)

unit_price
number<double>
url
string

Stripe Checkout URL (action=redirect)