Skip to main content

Confirm payment for Proforma Invoices

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

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'setPartner';
$jsonRpcRequest->params = array($sessionID, $partnerCode);
$jsonRpcRequest->id = $i++;

$partner = callRPC($jsonRpcRequest, $host, true);

// call setPartner
$proformaNo = '6'; //  not paid reseller direct but before was reseller

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'setProforma';
$jsonRpcRequest->params = array($sessionID, $proformaNo);
$jsonRpcRequest->id = $i++;

$proforma = callRPC($jsonRpcRequest, $host, true);

$rrn = 'refnostril'; // controls payment reference
// $rrn = '';

//call confirmInvoicePayment
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'confirmInvoicePayment';
$jsonRpcRequest->params = array($sessionID, $rrn);
$jsonRpcRequest->id = $i++;

$paymentConfirmation = callRPC($jsonRpcRequest, $host, true);
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo