# Real-time offer delivered at merchant checkout
source: https://developer.mastercard.com/unified-installments/documentation/use-cases/mastercard-installments-program-with-merchant-participation/installments/index.md

## Installments Plan API Overview {#installments-plan-api-overview}

During the merchant checkout, an IPP's loan initiation URL will be invoked along with a unique plan ID that corresponds to the consumer's chosen offer. The URL consists of three parts:

1. The loan initiation URL, which the IPP provides at the time of onboarding.
2. planId: A Mastercard generated unique ID assigned to an installment plan.
3. failureCallback: If the IPP is unable to successfully call the Approvals API, this failureCallback URL must be used to navigate the consumer back to the merchant's payment page.

The IPP must call the Installments Plan API with the same plan ID to retrieve the details of the consumer's selected offer.  

The Plan API provides details such as:

* Consumer chosen offer information
* Transaction information
* Consumer information, and
* Merchant information.

<br />

If at the time of onboarding, an IPP has disabled the consumer's offer selection, then the plan ID will contain information about all the available offers to the consumer and not any specific offer.  

The IPP must call the Installments Plan API with the same plan ID to retrieve details such as:

* All available offers' information
* Transaction information
* Consumer information, and
* Merchant information.  

### Endpoint {#endpoint}


API Reference: `GET /plans/{plan_id}`

## Installments Approval API Overview {#installments-approval-api-overview}

Once the IPP has retrieved the required details using the Installments Plan API, the consumer is assessed for installment loan eligibility. If the consumer is eligible, the IPP requests repayment details from the consumer and then approves the loan.

The IPP must call the Approval API using the same plan ID to inform Mastercard about the approval/denial of the loan.

If the IPP approves the loan, they must pass installment credential details to Mastercard. Mastercard then informs the merchant to trigger authorization on the provided credentials.
If the IPP declines the loan, then they must pass a decline reason code to Mastercard.

If at the time of onboarding, an IPP has disabled the consumer's offer selection then the approval must also contain the approved offer information. This approved offer must be one of the offers provided through Plan API.

### Endpoint {#endpoint-1}


API Reference: `GET /approvals`


API Reference: `GET /approvals/{plan_id}`

### Workflow {#workflow}

In response to the Loan Approval API, Mastercard sends a successful callback URL to the IPP. The IPP must display the loan approval status to the consumer and call the Mastercard Success callback URL.   

Mastercard then routes the consumer,

* to the merchant's confirmation page if the loan is approved, or
* to the merchant's payment page if the loan is declined.

Note: Mastercard recommends that onboarded merchants trigger authorization when the loan is approved and not provide a Place Order button to the consumer.

Mastercard provides a failure callback URL to the IPP during initialization for exception handling. If the Mastercard API does not respond with a successful callback URL to the IPP, the IPP must display a decline message to the consumer and call Mastercard's failed callback URL. Mastercard will then route the consumer to the merchant's payment page to select another method of payment.

#### Loan Approval Integration Points - IPP and Mastercard {#loan-approval-integration-points---ipp-and-mastercard}

Diagram integration-success

#### Loan Decline Integration Points - IPP and Mastercard {#loan-decline-integration-points---ipp-and-mastercard}

Diagram integration-failure

#### Loan Approval and Decline Exception Handling Scenario Integration Points - IPP and Mastercard {#loan-approval-and-decline-exception-handling-scenario-integration-points---ipp-and-mastercard}

Diagram integration-appvl-decline
