Invoice
Invoice Solution API
This document includes sample data and responses. For more information on the JSON to be sent in the body of
various requests, please refer to the request body (via the inspect manager) in your browser.
Retrieve a Set of Invoices
GET: https://sandbox-apigateway.payfirma.com/invoice?limit=
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Body
{
"invoices": [
{
"business_name": "minim est laboris",
"currency": "CAD",
"description": "velit in exercitation ",
"due_date": "3531-08-23T03:48:44.205Z",
"items": [
{
"amount": 21205659,
"price": 36802057,
"quantity": 86105452
},
{
"amount": 75168813,
"price": 28006167,
"quantity": 77763053
}
],
"recipient_email": "non id adipisicing occaecat ut",
"sub_total": 4276908,
"support_email": "id enim magna amet",
"support_phone_number": "sit incididunt proident quis",
"total": 86155452
},
{
"business_name": "dolore",
"currency": "CAD",
"description": "dolore elit",
"due_date": "4058-01-07T13:55:08.748Z",
"items": [
{
"amount": 58142303,
"price": 95874711,
"quantity": 33654873
},
{
"amount": 12219611,
"price": 85181105,
"quantity": 39277805,
"item": "eiusmod dolore Lorem aliqua",
"discount": false,
"tax2": {
"percentile": false,
"amount": 72115005
},
"tax1": {
"percentile": false
}
},
{
"amount": 40940975,
"price": 88962037,
"quantity": 91777342,
"discount": false,
"tax1": {
"percentile": false
}
}
],
"recipient_email": "et sit",
"sub_total": 70297709,
"support_email": "ipsum mollit culpa dolore ut",
"support_phone_number": "anim est irure magna ullamco",
"total": 27483070,
"title": "quis labore"
},
{
"business_name": "deserunt temp",
"currency": "CAD",
"description": "Ut pariatur veniam mollit laboris",
"due_date": "4547-08-27T09:50:05.575Z",
"items": [
{
"amount": 26003082,
"price": 20071213,
"quantity": 71668202,
"discount": false
},
{
"amount": 78488376,
"price": 76528102,
"quantity": 46544365,
"tax2": {
"percentile": false
},
"tax1": {
"percentile": false
}
}
],
"recipient_email": "dolor",
"sub_total": -93202187,
"support_email": "sunt deserunt dolor",
"support_phone_number": "tempor reprehenderit in",
"total": 88580010,
"business_city": "Duis eiusmod",
"company": "enim Lorem minim occaecat"
},
{
"business_name": "consequat incididunt",
"currency": "CAD",
"description": "irure proident ",
"due_date": "2993-11-20T10:31:58.241Z",
"items": [
{
"amount": 15229749,
"price": 86517784,
"quantity": 74153427,
"tax2": {
"percentile": false,
"amount": 4247601
},
"discount": false,
"tax1": {
"percentile": false
}
}
],
"recipient_email": "eiusmod",
"sub_total": 52722642,
"support_email": "cupidatat nulla",
"support_phone_number": "velit culpa quis",
"total": 75387860
}
]
}
Create a New Invoice
POST: https://sandbox-apigateway.payfirma.com/invoice
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Body
{
"due_date":1549958399000,
"title":"",
"language":"ENGLISH",
"description":"New Invoice 55",
"logo_image_path":"invoice_logos/INVOICE_LOGO_17538_1510.png",
"business_name":"James Bond Business",
"business_address1":"Address line 1. Address line 2",
"business_address2":"",
"business_city":"Vancouver",
"business_state":"British Columbia",
"business_country":"Canada",
"business_postal_code":"g4d8y6",
"support_email":"ravinder.singh@payfirma.com",
"support_phone_number":"9888175447",
"customer_id":1271438,
"customer_lookup_id":"YOLm9lxgMNjmNdz6Z2pk",
"recipient_email":"ravinder.singh@payfirma.com",
"recipient_first_name":"Ravinder",
"recipient_last_name":"Kainth",
"order_id":"",
"items":
[
{
"item":"Item 1",
"quantity":"10",
"price":10,
"tax1":
{
"percentile":true,
"amount":0.5
},
"tax2":
{
"percentile":true,
"amount":2
},
"amount":100,
"discount":false
}
],
"sub_total":100,
"currency":"CAD",
"tax1":0.5,
"tax1_label":"Tax1",
"tax2":2,
"tax2_label":"Tax2",
"total":102.5,
"status":"Unpaid",
"invoice_id":"",
"resend_invoice":true
}
Create a New Invoice (Draft)
POST: https://sandbox-apigateway.payfirma.com/invoice/draft
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Body
{
"due_date":1549958399000,
"title":"Draft Invoice",
"language":"ENGLISH",
"description":"New Invoice 55",
"logo_image_path":"invoice_logos/INVOICE_LOGO_17538_1510.png",
"business_name":"James Bond Business",
"business_address1":"Address line 1. Address line 2",
"business_address2":"",
"business_city":"Vancouver",
"business_state":"British Columbia",
"business_country":"Canada",
"business_postal_code":"g4d8y6",
"support_email":"ravinder.singh@payfirma.com",
"support_phone_number":"9888175447",
"customer_id":1271438,
"customer_lookup_id":"YOLm9lxgMNjmNdz6Z2pk",
"recipient_email":"ravinder.singh@payfirma.com",
"recipient_first_name":"Ravinder",
"recipient_last_name":"Kainth",
"order_id":"",
"items":
[
{
"item":"Item 1",
"quantity":"10",
"price":10,
"tax1":
{
"percentile":true,
"amount":0.5
},
"tax2":
{
"percentile":true,
"amount":2
},
"amount":100,
"discount":false
}
],
"sub_total":100,
"currency":"CAD",
"tax1":0.5,
"tax1_label":"Tax1",
"tax2":2,
"tax2_label":"Tax2",
"total":102.5,
"status":"Unpaid",
"invoice_id":"",
"resend_invoice":true
}
Retrieve Invoices for a Specific Customer
GET: https://sandbox-apigateway.payfirma.com/invoice/customer/customer_id_here?limit=
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Response Sample
{
"invoices": [
{
"business_name": "voluptate",
"currency": "CAD",
"description": "laboris",
"due_date": "4916-06-08T21:43:53.742Z",
"items": [
{
"amount": 52118831,
"price": 10585243,
"quantity": 9188639
},
{
"amount": 90270953,
"price": 33201694,
"quantity": 30082123,
"tax2": {
"percentile": false
}
}
],
"recipient_email": "cupidatat deserunt culpa velit",
"sub_total": 87403083,
"support_email": "tempor",
"support_phone_number": "Lorem",
"total": 13381180
},
{
"business_name": "in deserunt commodo tempor eiusmod",
"currency": "USD",
"description": "in laborum do voluptate",
"due_date": "2375-04-03T16:43:12.236Z",
"items": [
{
"amount": 73345847,
"price": 87788734,
"quantity": 56505832,
"tax1": {
"percentile": false,
"amount": 99891139
}
},
{
"amount": 14155827,
"price": 3169245,
"quantity": 75793364
}
],
"recipient_email": "esse",
"sub_total": 62469,
"support_email": "ad Duis anim",
"support_phone_number": "in aute",
"total": 10610020,
"business_city": "dolor sint",
"recipient_first_name": "fugiat velit reprehenderit culpa "
},
{
"business_name": "sit ex",
"currency": "CAD",
"description": "voluptate occaecat ipsum",
"due_date": "2591-01-30T12:44:49.897Z",
"items": [
{
"amount": 73710998,
"price": 11112996,
"quantity": 90545291
},
{
"amount": 71481433,
"price": 75895451,
"quantity": 90806548
},
{
"amount": 7334195,
"price": 36953280,
"quantity": 70363194,
"tax2": {
"percentile": false,
"amount": 26050468
},
"item": "do cupidatat id",
"tax1": {
"percentile": false
},
"discount": false
},
{
"amount": 31094607,
"price": 47045855,
"quantity": 57280184,
"tax2": {
"percentile": false
},
"discount": false,
"tax1": {
"percentile": false,
"amount": 74074788
}
}
],
"recipient_email": "dolor eu enim aliqua dolor",
"sub_total": -65427494,
"support_email": "id voluptate",
"support_phone_number": "laboris eiusmod",
"total": 30645866,
"tax2_label": "labore esse enim",
"email_message": "aute",
"business_country": "velit in in"
},
{
"business_name": "exercitation enim",
"currency": "CAD",
"description": "tempor",
"due_date": "4124-06-18T22:07:03.946Z",
"items": [
{
"amount": 88085144,
"price": 7236757,
"quantity": 81684860,
"discount": false
},
{
"amount": 14762525,
"price": 96923105,
"quantity": 59513772,
"item": "nostrud"
}
],
"recipient_email": "incididunt ut ipsum",
"sub_total": 4847582,
"support_email": "elit aute consectetur ut",
"support_phone_number": "aliquip",
"total": 45785781,
"order_id": "eu et",
"tax1_label": "dolor eiusmod ad"
},
{
"business_name": "aliquip",
"currency": "CAD",
"description": "nisi",
"due_date": "3033-08-23T06:47:56.317Z",
"items": [
{
"amount": 59892726,
"price": 16546646,
"quantity": 74894792,
"item": "tempor",
"tax1": {
"percentile": false,
"amount": 85001526
},
"discount": false
}
],
"recipient_email": "irure",
"sub_total": 33920695,
"support_email": "occaecat proident",
"support_phone_number": "ullamco non",
"total": 15477362,
"customer_id": -15595687,
"billing_state": "sit in esse",
"business_address2": "sed consequat eiusmod"
}
]
}
Retrieve a Specific Invoice
GET: https://sandbox-apigateway.payfirma.com/invoice/invoice_id_here
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Response Sample
{
"invoice_id": 212947,
"status": "UNPAID",
"description": "New Invoice 55",
"created_date": 1549912952000,
"due_date": 1549958399000,
"resend_invoice": true,
"language": "ENGLISH",
"logo_image_path": "invoice_logos/INVOICE_LOGO_17538_1510.png",
"business_name": "James Bond Business",
"business_address1": "Address line 1. Address line 2",
"business_city": "Vancouver",
"business_state": "British Columbia",
"business_country": "Canada",
"business_postal_code": "g4d8y6",
"support_email": "ravinder.singh@payfirma.com",
"support_phone_number": "9888175447",
"customer_id": 1271438,
"recipient_email": "ravinder.singh@payfirma.com",
"recipient_first_name": "Ravinder",
"recipient_last_name": "Kainth",
"items": [
{
"item": "Item 1",
"quantity": 10,
"price": 10,
"tax1": {
"percentile": true,
"amount": 0.5
},
"tax2": {
"percentile": true,
"amount": 2
},
"amount": 100,
"discount": false
}
],
"sub_total": 100,
"currency": "CAD",
"tax1": 0.5,
"tax1_label": "Tax1",
"tax2": 2,
"tax2_label": "Tax2",
"total": 102.5
}
Send an Email
POST: https://sandbox-apigateway.payfirma.com/invoice/invoice_id_here/send
Headers
Content-Type:application/json
Accept:application/json
Authorization:Bearer
Response Sample
{
"email_address": "email_address_here"
}
Send an Email to a Specific Email Address
POST: https://sandbox-apigateway.payfirma.com/invoice/invoice_id_here/send/email_address_here
Headers
Content-Type:application/json Accept:application/json Authorization:Bearer
Response Sample
{
"email_address": "email_address_here"
}
Last updated