Skip to main content

Confirm payment for Proforma Invoices

Last updated: 08-Feb-2019
Rate this article:


Use this method to confirm the payment for proforma invoices issued to your partners on the Direct Payment module. 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 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.


You can confirm payments only for partners set with Direct business model. Learn here how to set a business model to your partners.


Parameters Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.
partnerCode Required (String)
  The unique identifier that you need to specify when creating a partner in the Control Panel. You can find it under the General Information area when editing partner details.
proformaNo Required (String)
  The unique identifier of a partner invoice from the 2Checkout system.
rrn Optional (String)
  The code associated with the proforma invoice payment reference (receipt registration number).


Parameters Type/Description




True - method is successful

False - method is not successful

Error messages

Error code Error description
INVALID_PARTNER No partner is set or the proforma does not belong to the partner set.
PAYMENT_PROFORMA The proforma invoice has already been paid.
INVALID_PROFORMA The proforma invoice number is invalid.
INVALID_METHOD The partner set is not on the Direct business model.



require ('PATH_TO_AUTH');  // Authentication example:
require ('PATH_TO_SET_PARTNER'); // setPartner example:

$partnerCode = 'partner_code'; // direct

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

$proformaNo = '6';

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

    echo $e->getMessage();

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

    echo $e->getMessage();
Rate this article:
Logo of Verifone