Retrieve a payment session
Authentication using Bearer tokens. Include your API key in the Authorization header.
Key Types:
sk_test_* for development and testingsk_* for production environmentspk_test_* or pk_* for client-side operations📩 Need access? Contact Support to request your API keys.
Usage:
Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dcThe unique identifier for the payment session.
Payment session retrieved
The unique identifier for the payment session.
"ps_kfAWZgfQIoeG0q"
The type of payment session (defaults to one_time):
one_time: A one-time payment where the customer is present in the flow and completes the payment. Optionally, the payment method can be saved for future use where the customer is present in the flow. For example, buying a product and optionally saving the card for later one-off purchases.first_in_series: The first payment where the customer is present in the flow, representing the first payment in a series of future next_in_series payments where the payment method is saved for future use when the customer is not present in the flow. A mandate is recorded for compliance purposes. For example, setting up a subscription or installment plan for a product or service.next_in_series: A subsequent payment where the customer is not present in the flow, representing the next payment in a series of payments, and is charged automatically using a saved payment method (payment_method_id) and the associated customer (customer_id). For example, the next payment on a subscription or installment plan for a product or service.one_time, first_in_series, next_in_series The amount to be charged in the smallest currency unit. For example, 20.00 ZAR is represented as 2000 cents. Learn more about minor units.
1000
The ISO 4217 currency code for the payment.
"ZAR"
The current status of the payment session.
active: The session is in progress. The customer is interacting with the payment flow or the payment (via session_url), or the payment is being processed programmitcally using a saved payment method. Dependendent on the payment session type.completed: The session completed successfully.expired: The session expired due to inactivity or a timeout.cancelled: The session was cancelled by the customer or merchant.active, completed, expired, cancelled The status of the payment associated with the session:
paid: The payment succeeded.unpaid: The payment failed or has not yet succeeded.paid, unpaid The ID of the customer associated with the payment session.
The ID of the saved payment method for a customer associated with this payment session.
The ID of the associated checkout session (for one_time or first_in_series types).
"chk_456789abc123def"
Unique identifier for a payment
"p_xyz789abc123def456"
The URL where the customer is redirected to complete their payment in a secure payment flow. The customer can choose from a list of available payment methods, complete the payment, and is returned to the return_url once the session is complete.
one_time and first_in_series types where where the customer is present in the flow and needs to complete the payment.subsequent payments where the customer is not present in the flow, and payment is completed automatically."https://moment.dev.momentpay.io/checkout/cktNnkWtk7p5GJd85"
The URL where the customer that is present in the payment flow is redirected to after completing the payment.
Only applicable to one_time and first_in_series payment session types where the customer is present in the flow.
The customer is typically redirected on success, cancellation or expiration.
"https://callback.merchant-shop.com"
Details of last error that occurred during a payment attempt.
Indicates whether the payment session is in live or test mode:
test: Used for testing and development. Payments are simulated, and no real transactions are processed. You can use test credit cards and accounts to ensure your integration works as expected before going live.live: Used in production to process real payments. Real credit cards and accounts are used, and actual transactions occur. This mode is for accepting real money from customers.live, test External reference for reconciliation or tracking purposes. Must be unique within your merchant account.
255"INV-2024-001"
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. NEW Limitations:
{
"customer_id": "cust_123456",
"order_id": "ord_789012"
}ISO 8601 timestamp when the resource was created
"2025-06-16T10:30:00Z"
ISO 8601 timestamp when the resource was last updated
"2025-06-16T10:30:00Z"