Payments
Permissions
Permission to view, add, edit and remove payment information is governed by the group a staff member is a part of.
cb_addPayment
This is a brief description of the function name
Request
| string | $auth_string | Your authentication token returned from cb_setAuthCredentials() |
| int | $invoice_id | The invoice the payment is for |
| float | $amount | The amount the payment is for |
| string | $payment_gateway | The payment gateway used to make the payment |
| string | $date | optional; If no date is specified, the current date is used |
| int | $send_email | optional;
Defaults to sending an email upon successful payment. The valid values for this parameter are: 0 - Don't send a confirmation email 1 - Send a confirmation email |
| string | $notes | optional; |
Response
int payment_id
cb_getPayment
Return payment details using the given payment_id
Request
| string | $auth_string | Your authentication token returned from cb_setAuthCredentials() |
| int | $payment_id | The ID of the payment to retrieve |
Response
Array
(
[payment_id] => 1
[invoice_id] => 6
[amount] => 86.40
[date] => 7/2/2008 3:41PM
[payment_type] => paypal
[notes] => Notes for this payment
[is_void] => 0
)
(
[payment_id] => 1
[invoice_id] => 6
[amount] => 86.40
[date] => 7/2/2008 3:41PM
[payment_type] => paypal
[notes] => Notes for this payment
[is_void] => 0
)
cb_getPayments
Retrieve an array of all payments ordered by a given column.
Request
| string | $auth_string | Your authentication token returned from cb_setAuthCredentials() |
| string | $sort_column | optional; The column to sort payments on. The valid columns that can be used in this function are those returned by the cb_getPayment() function. |
Response
Array
(
[0] => Array
(
[payment_id] => 1
[invoice_id] => 6
[amount] => 86.40
[date] => 7/2/2008 3:41PM
[payment_type] => paypal
[notes] => Notes for this payment
[is_void] => 0
),
[1] => Array
(
[payment_id] => 2
[invoice_id] => 7
[amount] => 10.00
[date] => 7/3/2008 12:05PM
[payment_type] => check
[notes] => Notes for this payment
[is_void] => 0
)
)
(
[0] => Array
(
[payment_id] => 1
[invoice_id] => 6
[amount] => 86.40
[date] => 7/2/2008 3:41PM
[payment_type] => paypal
[notes] => Notes for this payment
[is_void] => 0
),
[1] => Array
(
[payment_id] => 2
[invoice_id] => 7
[amount] => 10.00
[date] => 7/3/2008 12:05PM
[payment_type] => check
[notes] => Notes for this payment
[is_void] => 0
)
)
cb_exportPaymentsCSV
Returns payment data for all payments in a comma separated format. Entries in the returned string are separated by a newline character.
Request
| string | $auth_string | Your authentication token returned from cb_setAuthCredentials() |
| int | $limit | optional; Limit the number of results that are returned. |
| int | $offset | optional; By default Clientbill will start with payment_id = 1. This paramater allows a different starting payment_id to be used. |
Response
1,6,86.40,7/2/2008 3:41PM,paypal,Notes for this payment,0
2,7,10.00,7/3/2008 12:05PM,check,Notes for this payment,0
2,7,10.00,7/3/2008 12:05PM,check,Notes for this payment,0
cb_exportPaymentsXML
Returns payment data for all payments in XML format.
Request
| string | $auth_string | Your authentication token returned from cb_setAuthCredentials() |
| int | $limit | optional; Limit the number of results that are returned. |
| int | $offset | optional; By default Clientbill will start with payment_id = 1. This paramater allows a different starting payment_id to be used. |
Response
<?xml version="1.0" standalone="yes"?>
<cbExportData>
<payment>
<payment_id>1</payment_id>
<invoice_id>6</invoice_id>
<amount>86.40</amount>
<date>7/2/2008 3:41PM</date>
<payment_type>paypal</payment_type>
<notes>Payment notes</notes>
<is_void>0</is_void>
</payment>
<payment>
<payment_id>2</payment_id>
<invoice_id>7</invoice_id>
<amount>10.00</amount>
<date>7/3/2008 12:05PM</date>
<payment_type>check</payment_type>
<notes>Payment notes</notes>
<is_void>0</is_void>
</payment>
</cbExportData>
<cbExportData>
<payment>
<payment_id>1</payment_id>
<invoice_id>6</invoice_id>
<amount>86.40</amount>
<date>7/2/2008 3:41PM</date>
<payment_type>paypal</payment_type>
<notes>Payment notes</notes>
<is_void>0</is_void>
</payment>
<payment>
<payment_id>2</payment_id>
<invoice_id>7</invoice_id>
<amount>10.00</amount>
<date>7/3/2008 12:05PM</date>
<payment_type>check</payment_type>
<notes>Payment notes</notes>
<is_void>0</is_void>
</payment>
</cbExportData>