REST API Reference

The Moxiz API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL

All API requests should be made to this base URL:

https://moxiz-gateway.vercel.app/v1

Authentication

Authenticate your requests by including your secret key in the Authorization header. Keep your keys secure! Never share your secret keys in client-side code or public repositories.

Authorization: Bearer sk_test_••••••••••••••••

API Infrastructure

All API requests should be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

https://moxiz-gateway.vercel.app/v1

Payments

The Payment API allows you to create and manage payment intents for your customers.

POST/v1/payments

{

"amount": 2000,

"currency": "usd",

"customer_email": "jane@example.com"

}

Customers

Customer objects allow you to perform recurring billing and track payment history over time.

GET/v1/customers

// Returns a list of all merchant customers

Refunds

Refund objects allow you to reverse payments made by your customers, either partially or in full.

POST/v1/refunds

{

"payment_id": "pay_992xJ",

"reason": "requested_by_customer"

}

Webhooks

Webhooks are used to notify your application when an event happens in your account.

Signature Verification

Every webhook request includes a Moxiz-Signature header. You should verify this signature using your webhook signing secret to ensure the request originated from Moxiz.