FreshBooks

Search


API Calls

Resources

Payments

Staff have access to the API calls listed below if the Invoices tab is enabled for staff. Staff users can only access payments that belong to clients they are assigned to.

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

<?xml version="1.0" encoding="utf-8"?>

  
    13
    207      
    2007-05-30           
    129.88           
    CAD 
    Check                
    Prompt payment!    
  

Response

<?xml version="1.0" encoding="utf-8"?>

  103

payment.update

Update an existing payment. All fields besides payment_id are optional - unpassed fields will retain their existing value.

Note that 'currency_code' can only be provided when updating a credit, not a regular payment. Regular payments will default to the currency code of the invoice they are being made against.

Request

<?xml version="1.0" encoding="utf-8"?>

  
    103
    0.00
    Payment refunded.
    CAD
  

Response

<?xml version="1.0" encoding="utf-8"?>
	

payment.get

Retrieve payment details according to payment_id.

Request

<?xml version="1.0" encoding="utf-8"?>

  322

Response

<?xml version="1.0" encoding="utf-8"?>

  
    109
    13
    207
    2007-05-30 00:00:00
    129.88
    CAD 
    Check
    Prompt payment!
    2009-08-12 09:00:00 
  

payment.delete

Permanently delete a payment. This will modify the status of the associated invoice if required.

Request

<?xml version="1.0" encoding="utf-8"?>

   321

Response

<?xml version="1.0" encoding="utf-8"?>
	

payment.list

Returns a list of recorded payments. You can optionally filter by invoice_id or client_id.

Request

<?xml version="1.0" encoding="utf-8"?>

  3            
  133        
  2007-01-01   
  2007-04-01       
  2007-01-01   
  2007-04-01       

  1                      
  10             

Response

<?xml version="1.0" encoding="utf-8"?>

  
    
      165
      203
      2007-03-02 12:04:11
      Cash
      
      43
      CAD 
      2009-08-12 09:00:00
    
    ...