Skip to content
× FreshBooks App Logo
FreshBooks
Official App
Free - Google Play
Get it
You're currently on our US site. Select your regional site here:

Online Payments

General Info

In FreshBooks, invoices can be paid online via a variety of payment gateways setup on the sender’s account. In order for this to be available on an invoice, the online payments must be set up through a separate call after the invoice has been created.

While default payment options exist, they are not automatically applied to new invoices and must be retrieved and added manually.

Access Requirements

AccessRequires Authorization
Scopesuser:online_payments:read
user:online_payments:write

Includes

There are no includes for online payments.

Filters

There are no filters for online payments.

Field Descriptions

underlined fields are required on creation

FieldTypeDescription
gateway_namestringPayment gateway name. 
The available gateway_names are as follows:
– WePay: “fbpay”
– Stripe: “stripe”
– PayPal: “paypal”
has_credit_cardboolIf the invoice can accept credit cards
has_ach_transferboolIf the invoice can accept ACH bank transfers
has_bacs_debitbool 
has_sepa_debitbool 
has_paypal_smart_checkoutbool 
allow_partial_paymentsboolIf the client can use the gateway to pay part of the invoice or only the full amount.
entity_typestringEg. “invoices”
entity_idintinvoice_id of the connected invoice
gateway_infoobjectAdditional gateway details

Get the Default Invoice Payment Options

Request: GET https://api.freshbooks.com/payments/account/<accountid>/payment_options?entity_type=invoice

Response:

{
   "payment_options": {
      "gateway_name": "stripe",
      "has_credit_card": true,
      "has_ach_transfer": false,
      "has_bacs_debit": false,
      "has_sepa_debit": false,
      "has_paypal_smart_checkout": false,
      "allow_partial_payments": false,
      "entity_type": "invoice",
      "entity_id": "5370347",
      "gateway_info": {
      ...
      }
   }
}

Add a Payment Option to an invoice

Request: POST https://api.freshbooks.com/payments/account/<accountid>/invoice/<invoiceid>/payment_options

{
   "gateway_name":"stripe",
   "entity_id": 2168250,
   "entity_type":"invoice",
   "has_credit_card":true
}

Response:

{
   "payment_options": {
      "gateway_name": "stripe",
      "has_credit_card": true,
      "has_ach_transfer": false,
      "has_bacs_debit": false,
      "has_sepa_debit": false,
      "has_paypal_smart_checkout": false,
      "allow_partial_payments": false,
      "entity_type": "invoice",
      "entity_id": "5370347",
      "gateway_info": {
      ...
      }
   }
}

See Payment Options on an invoice

Request: GET https://api.freshbooks.com/payments/account/<accountid>/invoice/<invoiceid>/payment_options

Response:

{
   "payment_options": {
      "gateway_name": "stripe",
      "has_credit_card": true,
      "has_ach_transfer": false,
      "has_bacs_debit": false,
      "has_sepa_debit": false,
      "has_paypal_smart_checkout": false,
      "allow_partial_payments": false,
      "entity_type": "invoice",
      "entity_id": "5370347",
      "gateway_info": {
      ...
      }
   }
}