Payment intents
Learn about the payment intent object and the statuses that a payment goes through inside Monite.
Overview
Monite aggregates the most popular payment methods and providers and allows you to define the right payment method for each transaction. This enables bill pay, invoice payment links, and other payments for the entity’s customers.
The entity must be onboarded in order to accept payments.
Payment intent
The payment intent is the intention of a customer to execute a payment. In our system, a payment intent is an object that represents the payment itself. It is used to track the lifecycle of the payment flow. This gives you full control over the payment journey.
A new payment intent is created automatically every time a payment link or batch payment is created.
The payment intent object can also be used to see the history of a specific payment.
Payment intent lifecycle
Each payment intent is allocated with a status that indicates its progress throughout the payment lifecycle, from its creation until its conclusion.
Find an existing payment intent for an invoice
To check if there is an existing payment intent for a specific accounts payable or accounts receivable invoice, call GET /payment_intents?iobject_id=INVOICE_ID
:
The data
array in the response contains all payment intents associated with the specified invoice.
After you have obtained the payment intent, you can use it to:
- Check the payment status (
status
of the payment intent), - Find the payment link for the invoice: extract the
payment_link_id
from the payment intent, then callGET /payment_links/{payment_link_id}
, and get theurl
from the response. - Find the batch payment (if any) in which this payment was included: extract the
batch_payment_id
from the payment intent and, if it is notnull
, callGET /batch_payments/{batch_payment_id}
.
Track the payment intent
There are several ways to track the payment intent transition between statuses.
Webhooks
You can subscribe to the payment_intent.status_updated
webhook to get notified of every change in the status of the payment intent. To subscribe to this webhook, call POST /webhook_settings
with the following request body, replacing the url
with the URL of your webhook listener endpoint:
The events sent by Monite contains entity_id
, object_type
, and object_id
, which can be used to identify the affected payment intent:
Get information about the payment intent
The payment intent ID received from the webhook can be used to check the progress of the actual payment, by calling GET /payment_intents/{payment_intent_id}
:
The successful response contains information about the payment intent:
Get the payment intent history
You can check the full status transition history of a specific payment intent by calling GET /payment_intents/{payment_intent_id}/history
:
The successful response returns one data item for each change in the payment intent status:
Payment methods
When the payment process is initiated, Monite allows the partner’s platform to control the available payment methods to be displayed to the payer on the payment page so they can select their preferred one during the payment act. Check the full list of payment methods Monite supports.
Payment links
The payment process can also be started through a payment link sent to the customer. This link can be customized and shared as many times as you want on any channel you prefer.