Server-to-server API to charge a saved card. Used for subscriptions or recurring billing (a core gateway feature).
Request Body
The unique identifier of the customer to charge
The unique identifier of the saved payment method (card) to use
The amount to charge in the smallest currency unit
The currency code (e.g., “ZAR”)
A description of the charge (e.g., “Subscription payment”)
Custom metadata to attach to the payment intent (e.g., subscription ID)
Response
Unique identifier for the payment intent
The merchant’s unique identifier
The customer’s unique identifier
The payment method’s unique identifier
Description of the charge
Payment status (processing, succeeded, failed)
Custom metadata attached to the payment intent
ISO 8601 timestamp when the intent was created
ISO 8601 timestamp when the intent was last updated
Example Request
{
"customerId": "customer_789",
"paymentMethodId": "pm_001",
"amount": 5000,
"currency": "ZAR",
"description": "Subscription payment",
"metadata": {
"subscriptionId": "sub_123"
}
}
Example Response
{
"id": "pi_001",
"merchantId": "merchant_456",
"customerId": "customer_789",
"paymentMethodId": "pm_001",
"amount": 5000,
"currency": "ZAR",
"description": "Subscription payment",
"status": "processing",
"metadata": {
"subscriptionId": "sub_123"
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
Error Responses
Invalid or missing authentication token
Customer or payment method not found
An unexpected error occurred on the server
Authentication
This endpoint requires Bearer token authentication.