Get Single Payment
Request: "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
Response:
{
"response": {
"result": {
"payment": {
"accounting_systemid": "zDmNq",
"amount": {
"amount": "10.00",
"code": "USD"
},
"bulk_paymentid": null,
"creditid": null,
"clientid": 1758507,
"date": "2013-12-10",
"from_credit": false,
"gateway": null,
"id": 10865326
"invoiceid": 2010190,
"logid": 10865326,
"note": "",
"orderid": null,
"overpaymentid": null,
"send_client_notification": null,
"transactionid": null,
"type": "Check",
"updated": "2016-09-28 21:00:46",
"vis_state": 1,
}
}
}
}
Create Single Payment
Request: POST "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments"
{
"payment":{
"invoiceid": 2214249,
"amount": {
"amount": "10.00"
},
"date": "2013-12-10",
"type": "Check"
}
}
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "zDmNq",
"updated": "2016-09-29 19:09:17",
"invoiceid": 2214249,
"creditid": null,
"amount": {
"amount": "0.00",
"code": "USD"
},
"clientid": 1831231,
"vis_state": 0,
"logid": 10865341,
"note": "",
"overpaymentid": 10865342,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865341
}
}
}
}
Update Single Payment
Request: PUT "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
{
"payment": {
"invoiceid": 2219739
}
}
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "KAG77",
"updated": "2016-09-28 18:46:36",
"invoiceid": 2219739,
"creditid": null,
"amount": {
"amount": "10.00",
"code": "USD"
},
"clientid": 2185379,
"vis_state": 0,
"logid": 10865291,
"note": "",
"overpaymentid": null,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865291
}
}
}
}
Delete Single Payment
Request: PUT "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
{
"payment": {
"vis_state": 1
}
}
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "zDmNq",
"updated": "2016-09-28 21:00:46",
"invoiceid": 2010190,
"creditid": null,
"amount": {
"amount": "10.00",
"code": "USD"
},
"clientid": 1758507,
"vis_state": 1,
"logid": 10865326,
"note": "",
"overpaymentid": null,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865326
}
}
}
}
List Payments
Request: GET https://api.freshbooks.com/accounting/account/<accountid>/payments/payments
Response:
{
"response": {
"result": {
"per_page": 15,
"pages": 1,
"total": 3,
"payments": [
{
// same format as single payment
},
{
// same format as single payment
},
{
// same format as single payment
}
],
"page": 1
}
}
}
Get Single Payment
Request: GET
"https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
url = "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.get(url, data=None, headers=headers)
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "zDmNq",
"updated": "2016-09-28 21:00:46",
"invoiceid": 2010190,
"creditid": null,
"amount": {
"amount": "10.00",
"code": "USD"
},
"clientid": 1758507,
"vis_state": 1,
"logid": 10865326,
"note": "",
"overpaymentid": null,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865326
}
}
}
}
Create Single Payment
Request: POST
"https://api.freshbooks.com/accounting/account/<accountid>/payments/payments"
url = "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = { 'payment': {
'invoiceid': 2214249,
'amount': {
'amount': "10.00"
},
'date': "2013-12-10",
'type': "credit"
}
}
res = requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "zDmNq",
"updated": "2016-09-29 19:09:17",
"invoiceid": 2214249,
"creditid": null,
"amount": {
"amount": "0.00",
"code": "USD"
},
"clientid": 1831231,
"vis_state": 0,
"logid": 10865341,
"note": "",
"overpaymentid": 10865342,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865341
}
}
}
}
Update Single Payment
Request: PUT
"https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
url = "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = { 'payment': {
'invoiceid': 2219739
}
}
res = requests.put(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "KAG77",
"updated": "2016-09-28 18:46:36",
"invoiceid": 2219739,
"creditid": null,
"amount": {
"amount": "10.00",
"code": "USD"
},
"clientid": 2185379,
"vis_state": 0,
"logid": 10865291,
"note": "",
"overpaymentid": null,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865291
}
}
}
}
Delete Single Payment
Request: PUT
"https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
url = "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments/<id>"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = { 'payment': {
'vis_state': 1
}
}
res = requests.put(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"payment": {
"orderid": null,
"accounting_systemid": "zDmNq",
"updated": "2016-09-28 21:00:46",
"invoiceid": 2010190,
"creditid": null,
"amount": {
"amount": "10.00",
"code": "USD"
},
"clientid": 1758507,
"vis_state": 1,
"logid": 10865326,
"note": "",
"overpaymentid": null,
"gateway": null,
"date": "2013-12-10",
"transactionid": null,
"from_credit": false,
"type": "Check",
"id": 10865326
}
}
}
}
List Payments
Request: GET
https://api.freshbooks.com/accounting/account/<accountid>/payments/payments
url = "https://api.freshbooks.com/accounting/account/<accountid>/payments/payments"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.get(url, data=None, headers=headers)
Response:
{
"response": {
"result": {
"per_page": 15,
"pages": 1,
"total": 3,
"payments": [
{
// same format as single payment
},
{
// same format as single payment
},
{
// same format as single payment
}
],
"page": 1
}
}
}