Skip to main content

Create partner invoice

Last updated: 05-May-2017
Rate this article:

Overview

Generate a partner invoice for one or more orders, based on their unique reference numbers.

Requirements

You can include only confirmed/approved orders in partner invoices. To include multiple orders in the same partner invoice they must share the same currency.

Parameters

Parameters Type/Description
sessionID Required (String)
  Session identifier, output of the Login method. An exception is thrown if the values are incorrect.
Sales Required (Array of strings)
  Array with the reference number of the orders you want included on the same partner invoice.

Response

Parameters Type/Description

Proforma

Object

 

A partner invoice object with the structure detailed below.

 

Number

String

 

 

Unique partner invoice identifier

 

CreateDate

String

 

 

Partner invoice creation date

 

DueDate

String

 

 

The date before which the partner needs to pay the invoice.

 

Status

String

 

 

Partner invoice status. Possible values:

  • Unpaid
  • Overdue
  • Paid
  • Canceled

 

Currency

String

 

 

Partner invoice currency ISO code

 

Total

String

 

 

Total costs of all orders included in the partner invoice

 

PaymentMethod

String

 

 

Payment method used to pay for the partner invoice. NULL if the invoice was not paid.

 

Orders

String / Array

 

 

Order references array of strings. A partner invoice only groups approved orders with the same currency.

 

BusinessModel

String

 

 

The business model governing the relationship between you and the partner company. Possible values:

  • RESELLER: payments made to Avangate as a master reseller
  • SERVICE_PROVIDER: direct payments to your accounts via wire transfer

 

ProformaPDF

String

 

 

Partner invoice PDF download link. Valid for 1 hour.

Request

<?php

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

$sales = array(
'ORDER_REFERENCE_1',
'ORDER_REFERENCE_2'
);

try {
    $NewProforma= $client->createProforma($sessionID, $sales);
} catch (SoapFault $e) {
    echo "NewP: " . $e->getMessage();
    exit;
}
var_dump ("NewP ", $NewProforma);

Errors

Error Description

INVALID_ORDER

You must provide an array with orders

INVALID_PARTNER

No partner was set.

INVALID_PARTNER

This partner does not have rights to create a partner invoice.

INVALID_ORDER

We cannot create partner invoices for some of your orders.

INVALID_ORDER

Some of your orders already have a partner invoice invoice.

INVALID_ORDER

The order is not approved. We cannot create a partner invoice.

INVALID_ORDER

Your orders must all have the same currency. They now have:

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