Create a new payment
POST
https://api.llamapay.io/charges
Headers
Authorization
llamapay_sk_YOUR_API_KEY
Body parameters
pricing_type
Can be either:
- fixed_price
for simple one-time payments
- no_price
for payments where user picks amount, eg donations
- subscription
for recurring subscriptions
"fixed_price"
local_price
Amount to charge user.
If pricing_type
is subscription
, this is the monthly cost
{ "amount": "10.00", "currency": "USD" }
metadata
[Optional] Arbitrary JSON object, it will be returned on webhooks for the payment. Object must be smaller than 20kB
{ "userId": "0xngmi" }
redirect_url
[Optional] URL to redirect user to after successful payment.
"https://mypage.com/success"
cancel_url
[Optional] URL to redirect user to if they cancel the payment
"https://mypage.com/failure"
Example body
Charge the user a one-time payment of 10$:
Response
Last updated