# Confirm payment for Proforma Invoices

Use this method to confirm the payment for proforma invoices issued to your partners on the Direct Payment module.&#x20;

To confirm the payment for a proforma invoice, you need to follow these steps before calling the **confirmInvoicePayment** API method:

1. Authenticate to 2Checkout API based on [these](/channel-manager-api/channel-manager-api/api-6.0/soap-6.0/authentication.md) instructions.
2. Set the partner for which you want to confirm the payment (method explained in the sample below).
3. Set the proforma invoice  (method explained in the sample below).
4. Confirm the payment using the instructions below.

## Requirements

You can confirm payments only for partners set with Direct business model. Learn [here](/partners-resellers/partners-resellers/adding-new-partners.md) how to set a business model to your partners.

## Request parameters

<table><thead><tr><th width="137.800048828125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Session identifier, output of the Login method. An exception is thrown if the values are incorrect.</p></td></tr><tr><td><code>partnerCode</code></td><td><p><strong>Required (string)</strong></p><p>The unique identifier that you need to specify when creating a partner in the Control Panel. You can find it under the <strong>General Information</strong> area when editing partner details.</p></td></tr><tr><td><code>proformaNo</code></td><td><p><strong>Required (string)</strong></p><p>The unique identifier of a partner invoice from the 2Checkout system.</p></td></tr><tr><td><code>rrn</code></td><td><p><strong>Optional (string)</strong></p><p>The code associated with the proforma invoice <strong>payment reference</strong> (receipt registration number).</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.2checkout.com/Integration/07Channel_Manager_API/SOAP/02Authentication
require ('PATH_TO_SET_PARTNER'); // setPartner example: https://knowledgecenter.2checkout.com/Integration/07Channel_Manager_API/SOAP/06Reference/00Partner/00Set_partner

$partnerCode = 'partner_code'; // direct

try {
    $setPartner = $client->setPartner($sessionID, $partnerCode);
    var_dump($setPartner);
} catch (SoapFault $e) {
    echo "<pre>";
    echo $e->xdebug_message;
    echo $e->getMessage();
}

$proformaNo = '6';

try {
    $setProforma = $client->setProforma($sessionID, $proformaNo);
    var_dump($setProforma);
} catch (SoapFault $e) {
    echo "<pre>";

    echo $e->getMessage();
}

try {
    $confirmInvoicePayment = $client->confirmInvoicePayment($sessionID);
    var_dump($confirmInvoicePayment);
} catch (SoapFault $e) {

    echo $e->getMessage();
}
```

## Response parameters

<table><thead><tr><th width="103">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Boolean</strong></td><td><p><strong>True</strong>: method is successful. </p><p><strong>False</strong>: method is not successful.</p></td></tr></tbody></table>

## Error messages

<table><thead><tr><th width="215.800048828125">Error code</th><th>Error description</th></tr></thead><tbody><tr><td><strong>INVALID_PARTNER</strong></td><td>No partner is set or the proforma does not belong to the partner set.</td></tr><tr><td><strong>PAYMENT_PROFORMA</strong></td><td>The proforma invoice has already been paid.</td></tr><tr><td><strong>INVALID_PROFORMA</strong></td><td>The proforma invoice number is invalid.</td></tr><tr><td><strong>INVALID_METHOD</strong></td><td>The partner set is not on the Direct business model.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/soap-2.1/reference/partner-invoices/confirm-payment-for-proforma-invoices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
