API Reference

Complete reference documentation for the PayAiML API. Build powerful payment experiences with our RESTful API.

RESTful API
Clean, predictable URLs and standard HTTP methods.
JSON Responses
All API responses are returned in JSON format.
Real-time
Webhooks provide real-time notifications of events.
Secure
All API requests are made over HTTPS with API key authentication.

API Resources

Explore our API resources and learn how to integrate PayAiML into your application.

Authentication
Learn how to authenticate your API requests using API keys.
Authentication
Payments
Create, retrieve, and manage payment transactions.
/v1/payments
Customers
Store and manage customer information for repeat transactions.
/v1/customers
Subscriptions
Handle recurring billing and subscription management.
/v1/subscriptions
Invoices
Generate and manage invoices for your customers.
/v1/invoices
Webhooks
Receive real-time notifications about events in your account.
/v1/webhooks

Example Request

Here's a simple example of creating a payment using the PayAiML API.

Request

curl https://api.payaiml.com/v1/payments \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d amount=2000 \
  -d currency=usd \
  -d payment_method=pm_card_visa \
  -d confirm=true

Response

{
  "id": "pi_1234567890",
  "object": "payment_intent",
  "amount": 2000,
  "currency": "usd",
  "status": "succeeded",
  "created": 1640995200,
  "payment_method": "pm_card_visa"
}