get_environment’s starts with an Environment: sandbox or Environment: live line (live is production), followed by the result as JSON. It names the environment the call ran against: your account’s current environment.
Customer Management
create_customer
get_customer
list_customers
update_customer
delete_customer
ensure_customer
Creates a customer if one doesn’t exist for the given email. Returns the existing customer if found.Product Management
create_product
get_product
list_products
update_product
clone_product
delete_product
Plan Management
A plan is an ordered
options[] list. Recurring / usage-based / hybrid / one-time is a derived label — do not send type, creditsPerUnit, basePrice, setupFee, or freeUnits. See Plans.
create_plan
Example
options for a $19/month plan:
get_plan
list_plans
list_plans_for_product
update_plan
delete_plan
Purchase Management
list_purchases
get_purchase
get_purchases_by_customer
get_purchases_by_product
cancel_renewal
check_limits
Returns usage-limit status for a customer/product pair. If limits are exceeded, the response includes a checkout URL for the customer to upgrade.Payment & Checkout
create_checkout_session
create_customer_session
Generates a URL where the customer can manage their billing, payment methods, and purchases.Usage Tracking
record_usage
record_bulk_usage
Each object in
events accepts the same fields as record_usage.
Transactions & Refunds
list_transactions
get_transaction
get_transaction_stats
create_refund
Environment
get_environment
Takes no parameters. Returns{ "environment": "sandbox" } or { "environment": "live" }.
With OAuth, this is the environment your account is in, and it changes when you switch in SolvaPay Console. With an API key, it’s the key’s environment, which must match the account’s.