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.

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.

Overview of the payment intent lifecycle
Overview of the payment intent lifecycle
StatusDescriptionNext status
createdThe initial status for all newly created payment intents.processing,
succeeded,
payment_cancelled,
payment_failed
processingThe payer has accomplished the required actions for the payment on their side and the payment is being processed. Some payment methods, such as cards, can be processed very quickly, while other payment methods can take a few days.succeeded,
payment_failed
payment_cancelledOnly newly created payment intents can be canceled. A canceled payment intent cannot be used for future payment attempts. This is a final status.
payment_failedThe payment attempt failed for some reason. For example, the payer’s bank declined the transaction.succeeded
succeededThe payment was successfully authorized and is ready to be settled. That is, the bank transfer can be initiated by the bank or the payout can be triggered to the recipient’s bank account.settled,
payment_failed,
payout_failed,
payout_canceled,
disputed,
refunded
settledThe funds have been sent to the recipient’s bank account.payout_failed,
disputed,
refunded
payout_cancelledThe payout of funds to the recipient’s account was canceled.refunded
payout_failedThe funds could not be delivered to the recipient’s account. This can happen for various reasons, including (but not limited to):
  • The recipient’s bank account details are incorrect.
  • The recipient’s bank account has been closed or restricted.
  • The recipient’s bank has declined the transaction.
settled,
refunded
disputedOccurs when a payer contests your charge with their bank for any reason. This status is only available for certain providers.succeeded,
refunded
refundedThe payment that was previously processed has been refunded. Funds will be refunded to the credit or debit card or bank account that was originally charged. This is a final status. Refunds cannot be reversed once issued.

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:

1curl 'https://api.sandbox.monite.com/v1/payment_intents?object_id=INVOICE_ID' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The data array in the response contains all payment intents associated with the specified invoice.

1{
2 "data": [
3 {
4 "id": "6f1a0e95-059b-4095-9264-b8a600e79a61",
5 ...
6 "payment_link_id": "0b971087-a15e-4946-a6c8-be230e297004",
7 "selected_payment_method": "sepa_credit",
8 "status": "processing"
9 }
10 ]
11}

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 call GET /payment_links/{payment_link_id}, and get the url 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 not null, call GET /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_subscriptions with the following request body, replacing the url with the URL of your webhook listener endpoint:

1curl -X POST 'https://api.sandbox.monite.com/v1/webhook_subscriptions' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'Authorization: Bearer YOUR_PARTNER_TOKEN' \
4 -H 'Content-Type: application/json' \
5 -d '{
6 "object_type": "payment_intent",
7 "url": "https://yourendpointurl.com"
8 }'

The events sent by Monite contains entity_id, object_type, and object_id, which can be used to identify the affected payment intent:

1{
2 "id": "06c003f1-6b05-415f-be6d-39ecacdddbd3",
3 "created_at": "2024-03-04T20:06:48.593225+00:00",
4 "action": "payment_intent.status_updated",
5 "api_version": "2024-01-31",
6 "entity_id": "ce0e9fc7-b3e7-4f12-ad86-bfb0725a99f0",
7 "description": "payment_intent_status_updated",
8 "object": {
9 "id": "6f1a0e95-059b-4095-9264-b8a600e79a61"
10 },
11 "object_type": "payment_intent",
12 "webhook_subscription_id": "c7f37127-44e5-494a-833a-21e60585f187"
13}

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}:

1curl -X GET 'https://api.sandbox.monite.com/v1/payment_intents/6f1a0...a61' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer YOUR_PARTNER_TOKEN'

The successful response contains information about the payment intent:

1{
2 "id": "6f1a0e95-059b-4095-9264-b8a600e79a61",
3 "updated_at": "2023-01-18T08:52:04.120Z",
4 "amount": 12500,
5 "application_fee_amount": 0,
6 "batch_payment_id": null,
7 "currency": "EUR",
8 "object": {
9 "id": "9db02d38-ae6e-492f-8544-705dccf08bd0",
10 "type": "payable"
11 },
12 "payer": {
13 "id": "ce0e9fc7-b3e7-4f12-ad86-bfb0725a99f0",
14 "type": "entity",
15 "name": "Acme Inc.",
16 "bank_accounts": [
17 {
18 "id": "799fd800-64d8-47d1-8de6-a349f368bf60",
19 "account_holder_name": "Acme Inc.",
20 "account_number": null,
21 "bic": "DEUTDEFFXXX",
22 "country": "DE",
23 "currency": "EUR",
24 "display_name": "Primary account",
25 "iban": "DE25648730420109480400",
26 "is_default": true,
27 "name": "Primary account",
28 "routing_number": null,
29 "sort_code": null,
30 "was_created_by_user_id": null
31 }
32 ],
33 },
34 "payment_link_id": "0b971087-a15e-4946-a6c8-be230e297004",
35 "payment_methods": [
36 "card",
37 "sepa_credit"
38 ],
39 "payment_reference": "INV-00042",
40 "provider": null,
41 "recipient": {
42 "id": "1d3d6fec-d8af-42e8-9b19-0c58a7a797e1",
43 "type": "counterpart",
44 "bank_accounts": [
45 {
46 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
47 "iban": "DE36444488881234567890",
48 "bic": "GENODETT488",
49 "name": "Testbank Fiducia",
50 "is_default": true
51 }
52 ],
53 "name": "Alayna Corkery"
54 },
55 "selected_payment_method": null,
56 "status": "created"
57}

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:

1curl -X GET 'https://api.sandbox.monite.com/v1/payment_intents/3fa85f...f66afa6/history' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer YOUR_PARTNER_TOKEN'

The successful response returns one data item for each change in the payment intent status:

1{
2 "data": [
3 {
4 "id": "3fa85f64-4626-8255-b5dd-2c963f649fcd5",
5 "payment_intent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
6 "status": "created",
7 "created_at": "2023-01-30T15:46:41.106Z",
8 "updated_at": "2023-01-30T15:46:41.106Z"
9 },
10 {
11 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
12 "payment_intent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
13 "status": "succeeded",
14 "created_at": "2023-01-30T18:27:30.115Z",
15 "updated_at": "2023-01-30T18:27:30.115Z"
16 }
17 ]
18}

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.

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.