0

Closed

Support payment.create

description

http://developers.freshbooks.com/docs/payments/
 
payment.create
 
Create a new payment and returns the corresponding payment_id.
This function can have one of three possible effects depending on the presence of invoice_id and client_id:
 
  • If you specify an invoice_id only, the payment will be recorded as an invoice payment.
  • If you specify a client_id only, the payment will be recorded as a client credit.
  • If you specify both an invoice_id and client_id, the payment will be recorded as an invoice payment, and the amount will be subtracted from the client’s credit.
     
    Payment type must be one of: ‘Check’, ‘Credit’, ‘Credit Card’, ‘Bank Transfer’, ‘Debit’, ‘PayPal’, ’2Checkout’, ‘VISA’, ‘MASTERCARD’, ‘DISCOVER’, ‘NOVA’, ‘AMEX’, ‘DINERS’, ‘EUROCARD’, ‘JCB’ or ‘ACH’.
    Note that ‘currency_code’ can only be provided when creating a credit, not a regular payment. Regular payments will default to the currency code of the invoice they are being made against.
     
    Request
     
    view plaincopy to clipboardprint?
     
  • <?xml version="1.0" encoding="utf-8"?> 
  • <request method="payment.create"> 
  •   <payment> 
  •     <client_id>13</client_id>           <!-- Optional --> 
  •     <invoice_id>207</invoice_id>        <!-- Associate this payment with an invoice (Optional) --> 
  •     <date>2007-05-30</date>             <!-- Default value is today's date (Optional) --> 
  •     <amount>129.88</amount>             <!-- Default is zero (Optional) --> 
  •     <currency_code>CAD</currency_code>  <!-- Default is system's base currency (Optional) --> 
  •     <type>Check</type>                  <!-- Default is Check (Optional) --> 
  •     <notes>Prompt payment!</notes>      <!-- (Optional) --> 
  •   </payment> 
  • </request> 
     
    Response
     
    view plaincopy to clipboardprint?
     
  • <?xml version="1.0" encoding="utf-8"?> 
  • <response xmlns="http://www.freshbooks.com/api/" status="ok"> 
  •   <payment_id>103</payment_id> 
  • </response>
Closed Jul 23, 2012 at 5:18 PM by stemarie

comments

wrote Jul 23, 2012 at 5:18 PM

Resolved with changeset 94086.

wrote Jan 31, 2013 at 11:24 PM

wrote May 13, 2013 at 6:24 PM