Skip to main content
POST
/
api
/
v1
/
billing
/
purchase
Purchase credits
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/billing/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "estimate",
  "credits": 1550,
  "payment_method_id": "<string>"
}
'
{
  "action": "estimate",
  "amount_cents": 123,
  "amount_display": "<string>",
  "credits": 123,
  "has_payment_method": true,
  "invoice_id": "<string>",
  "invoice_url": "<string>",
  "payment_methods": [
    {
      "brand": "<string>",
      "exp_month": 123,
      "exp_year": 123,
      "id": "<string>",
      "is_default": true,
      "last4": "<string>"
    }
  ],
  "session_id": "<string>",
  "unit_price": 123,
  "url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
action
enum<string>
required

"estimate" to get pricing preview, "purchase" to buy

Available options:
estimate,
purchase
credits
number<double>
required

Number of credits to purchase (100-3000)

Required range: 100 <= x <= 3000
payment_method_id
string

Stripe Payment Method ID to charge (optional, defaults to customer default PM)

Response

Purchase initiated or completed

action
enum<string>
required

"estimate" for pricing preview, "redirect" for first purchase (Stripe Checkout), "charged" for direct charge

Available options:
estimate,
redirect,
charged
amount_cents
integer
required
amount_display
string
required
credits
number<double>
required
has_payment_method
boolean

Whether saved payment methods exist (only in estimate)

invoice_id
string

Stripe Invoice ID (only when action is "charged")

invoice_url
string

Stripe hosted invoice URL (only when action is "charged")

payment_methods
object[]

All saved payment methods (only in estimate)

session_id
string

Stripe Checkout Session ID (only when action is "redirect")

unit_price
number<double>

Price per credit in USD (e.g. 3.50)

url
string

Stripe Checkout URL (only when action is "redirect")