HomeGuidesRecipesAPI ExplorerForumSupport
Partner Portal
Partner Portal

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 every time a payment process is initiated. Also, an associated payment intent is automatically created every time a payment link 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
createdThis is the initial status for all payments.

At this status, the payment intent is created.
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.

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:

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

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

{
  "id": "06c003f1-6b05-415f-be6d-39ecacdddbd3",
  "created_at": "2024-03-04T20:06:48.593225+00:00",
  "action": "payment_intent.status_updated",
  "api_version": "2024-01-31",
  "entity_id": "ce0e9fc7-b3e7-4f12-ad86-bfb0725a99f0",
  "description": "payment_intent_status_updated",
  "object": {
    "id": "f7dcd6bc-2cc9-4cb9-be9c-d7bf2404acd7"
  },
  "object_type": "payment_intent",
  "webhook_subscription_id": "c7f37127-44e5-494a-833a-21e60585f187"
}

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

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

The successful response contains information about the payment intent:

{
  "payer": {
    "id": "deaef523-cfd7-48ce-9de9-6d280dca1d6c",
    "type": "entity",
    "bank_accounts": [
      {
        "id": "6d280dca1d6c-5717-4562-b3fc-3fa85f64",
        "iban": "DE36442345678904488881",
        "bic": "GETT48ENOD8",
        "name": "Testbank Fiducia",
        "is_default": true
      }
    ]
  },
  "recipient": {
    "id": "deaef523-cfd7-48ce-9de9-6d280dca1d6c",
    "type": "entity",
    "bank_accounts": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "iban": "DE36444488881234567890",
        "bic": "GENODETT488",
        "name": "Testbank Fiducia",
        "is_default": true
      }
    ],
    "name": "Alayna Corkery"
  },
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "created",
  "amount": 11781,
  "payment_methods": [
    "card"
  ],
  "selected_payment_method": "card",
  "payment_link_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "currency": "EUR",
  "payment_reference": "Inv 158",
  "provider": "Payment provider",
  "application_fee_amount": 0,
  "invoice": {
    "issue_date": "2023-01-18",
    "due_date": "2023-01-18",
    "file": {
      "name": "test",
      "mimetype": "application/pdf",
      "url": "https://monite-file-saver-payables-eu-central-1-dev.s3.amazonaws.com/0d02290c689c.pdf"
    }
  },
  "object": {
    "id": "9db02d38-ae6e-492f-8544-705dccf08bd0",
    "type": "payable"
  },
  "updated_at": "2023-01-18T08:52:04.120Z"
}

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:

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

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

{
  "data": [
    {
      "id": "3fa85f64-4626-8255-b5dd-2c963f649fcd5",
      "payment_intent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "created",
      "created_at": "2023-01-30T15:46:41.106Z",
      "updated_at": "2023-01-30T15:46:41.106Z"
    },
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "payment_intent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "succeeded",
      "created_at": "2023-01-30T18:27:30.115Z",
      "updated_at": "2023-01-30T18:27:30.115Z"
    }
  ]
}

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.