Payment Intents

Payment Intents help you manage the process of collecting payments from your customers. We recommend creating one Payment Intent per order or customer session in your system. This allows you to track the payment history for a specific session.

Throughout its lifecycle, a Payment Intent moves through various statuses as it interacts with Paytree to handle authentication steps and, ultimately, to complete a successful charge, if applicable.

Create Payment Intent

This method creates a new Payment Intent, which initiates the payment process for a customer, allowing you to collect payment details and manage the payment flow.

When creating a new payment intent request, you can pass the following identifiers used in callbacks to correlate our transaction with your local records.

  • transaction_ref - Unique transaction reference from your system, for example, an Order ID. Any requests with a previously used transaction_ref will be rejected.

  • client_ref - Unique identifier used to reference your client, this can be your customer ID or email address for example.

  • callback_url - A callback url where requests will be made every time a status change is triggered.

Get all Payment Intents

This method retrieves a list of all Payment Intents in your account, providing an overview of all payment sessions and their current statuses, useful for tracking multiple payments.

Get Payment Intent

This method fetches detailed information about a specific Payment Intent by its unique identifier, allowing you to retrieve the latest payment status and related details for a particular payment.

Last updated