API Reference

Authentication

All calls must be authenticated with the header Authorization: llamapay_sk_YOUR_API_KEY. You can obtain the required API Key in the Developer tab on LlamaPay's interface.

Create a new payment

post

Creates a new payment that users can then pay

Authorizations
AuthorizationstringRequired
Body
pricing_typestring · enumOptionalPossible values:
local_priceobjectOptionalExample: {"amount":"10.00","currency":"USD"}
metadataobjectOptionalExample: {"userId":"0xngmi"}
redirect_urlstringOptionalExample: https://mypage.com/success
cancel_urlstringOptionalExample: https://mypage.com/failure
Responses
200

Successfully created a payment

application/json
post
/charges

Fetch a paginated list of payments

get

Pagination is handled by querying the urls returned in pagination.previous_uri and pagination.next_uri or by using the query parameters ending_before and starting_after directly with payment ids. In other words, to see all results keep querying pagination.next_uri until its null.

Authorizations
AuthorizationstringRequired
Query parameters
starting_afterstringOptional

Optional and for pagination, filters results to those whose id parameters are higher than the id sent

ending_beforestringOptional

Optional and for pagination, filters results to those whose id parameters are lower than the id sent

Responses
200

Array of payments

application/json
get
/charges
200

Array of payments

Fetch a single payment

get
Authorizations
AuthorizationstringRequired
Path parameters
payment_idstringRequired

id parameter obtained from /charges or webhook events

Responses
200

Payment info

application/json
get
/charges/{payment_id}

Last updated