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": "f7dcd6bc-2cc9-4cb9-be9c-d7bf2404acd7"
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/3fa85f6...f66afa6' \
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 "payer": {
3 "id": "deaef523-cfd7-48ce-9de9-6d280dca1d6c",
4 "type": "entity",
5 "bank_accounts": [
6 {
7 "id": "6d280dca1d6c-5717-4562-b3fc-3fa85f64",
8 "iban": "DE36442345678904488881",
9 "bic": "GETT48ENOD8",
10 "name": "Testbank Fiducia",
11 "is_default": true
12 }
13 ]
14 },
15 "recipient": {
16 "id": "deaef523-cfd7-48ce-9de9-6d280dca1d6c",
17 "type": "entity",
18 "bank_accounts": [
19 {
20 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
21 "iban": "DE36444488881234567890",
22 "bic": "GENODETT488",
23 "name": "Testbank Fiducia",
24 "is_default": true
25 }
26 ],
27 "name": "Alayna Corkery"
28 },
29 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
30 "status": "created",
31 "amount": 11781,
32 "payment_methods": [
33 "card"
34 ],
35 "selected_payment_method": "card",
36 "payment_link_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
37 "currency": "EUR",
38 "payment_reference": "Inv 158",
39 "provider": "Payment provider",
40 "application_fee_amount": 0,
41 "invoice": {
42 "issue_date": "2023-01-18",
43 "due_date": "2023-01-18",
44 "file": {
45 "name": "test",
46 "mimetype": "application/pdf",
47 "url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/0d02290c689c.pdf"
48 }
49 },
50 "object": {
51 "id": "9db02d38-ae6e-492f-8544-705dccf08bd0",
52 "type": "payable"
53 },
54 "updated_at": "2023-01-18T08:52:04.120Z"
55}

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.