Console
Pay

Create Payment

Create a Stripe Checkout session for a one-time purchase. Returns a payment_url to redirect the user to.

POST /api/pay/create_payment.php
Requires Authorization: AppID:AppKey + user token

Request body

FieldTypeRequiredDefaultDescription
tokenstringrequiredUser session token
itemKeystringrequiredProduct key from the console
quantityintoptional1Number of items
currencystringoptional"usd"usd, brl, or eur
success_urlstringoptionalVanelton defaultRedirect URL after successful payment
cancel_urlstringoptionalVanelton defaultRedirect URL if user cancels
debugbooloptionalfalseUse Stripe test mode

Success response 200

{
  "success": true,
  "message": "Payment link created successfully.",
  "payment_url": "https://checkout.stripe.com/pay/cs_live_..."
}
{
  "success": true,
  "message": "Item granted for free via Vanelton Pass.",
  "free_via_pass": true
}
If itemKey is an in-app purchase the publisher marked as Vanelton Pass-eligible, and the buyer has an active Pass, the item is granted for free and no checkout session is created — the response has no payment_url. Always check free_via_pass before assuming payment_url exists. This only applies to items the publisher opted in — most purchases go through the standard flow even for Pass subscribers.

Errors

CodeMessage
401Invalid or expired token.
400itemKey not found or not active.