Create partner invoice
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.
Request parameters
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.
Request sample
<?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);Response parameters
Proforma
Object A partner invoice object with the structure detailed below.
Proforma.Number
String Unique partner invoice identifier
Proforma.CreateDate
String Partner invoice creation date
Proforma.DueDate
String The date before which the partner needs to pay the invoice.
Proforma.Status
String
Partner invoice status. Possible values:
Unpaid
Overdue
Paid
Canceled
Proforma.Currency
String Partner invoice currency ISO code
Proforma.Total
String Total costs of all orders included in the partner invoice
Proforma.PaymentMethod
String Payment method used to pay for the partner invoice. NULL if the invoice was not paid.
Proforma.Orders
String / Array Order references array of strings. A partner invoice only groups approved orders with the same currency.
Proforma.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
Proforma.ProformaPDF
String Partner invoice PDF download link. Valid for 1 hour.
Errors
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:
Last updated
Was this helpful?