Skip to main content
POST
/
v1
/
credits
/
purchase
Purchase a credit package
curl --request POST \
  --url https://api.urltodata.ai/v1/credits/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "package_id": "<string>"
}
'
{
  "checkout_url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.urltodata.ai/llms.txt

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

Authorizations

Authorization
string
header
default:your-api-key
required

API key as Bearer token (e.g. Bearer mp_abc123_secret)

Body

application/json
package_id
string
required

Package ID from GET /v1/credits/packages

redirect_origin
string<uri>

Origin URL for Stripe checkout return redirect (must be an allowed origin)

Response

Checkout session created

checkout_url
string