Product Docs Help

invoices

Get the invoices for a merchant

GET method/invoices

Returns a list of invoices for a merchant

Responses

[ { "mexcCustomerinvoicesid": 1234, "mm3servicesid": 123, "mexcModulesid": 123, "flags": { "type": "Buffer", "data": [ 10 ] }, "mexcParamvaluesetsid_customer": 123, "date": "Mon Aug 15 00:00:00 UTC 2022", "comments": "This is a comment", "fileurl": "example", "status": "Created", "createddate": "2022-08-15T12:00:22Z", "sentdate": "2019-01-10T23:18:45Z", "invoicedate": "2022-08-15T12:00Z", "duedate": "2022-09-14T12:00Z", "deliverydate": "Mon Aug 15 00:00:00 UTC 2022", "currency": "SEK", "interest": "11.00%", "invoiceid_real": 123456, "customername": "Nisse Hult", "customerno": "", "statuslog": "example", "street": "Gatan 1", "postalcode": "12345", "city": "Testinge", "yourreference": "Purchaser N.N.", "ourreference": "Seller N.N.", "invoicetype": "f", "creditinvoiceid": 81, "housework": 0, "houseid": "example", "houseorgnr": "example", "paymentterms": 14, "topay": "123", "mexcCustomeroffersid": 0, "offerid_real": 0, "mexcCustomerordersid": 0, "orderid_real": 0, "withtax": 1, "sharing_reductions": "example", "paiddate": "2003-11-16T00:11:13Z", "balancedue": "example", "handlingcharge": "0", "freight": "0", "projectname": "project X", "distributor_status": "example", "deliveryterms": "example", "delivery": "example", "rounding": "0", "yourorder": "1234556789", "orgnum": "000000-0000", "reminderfee": "example", "attachment": "example", "address2": "", "logopath": "example", "ocr": "example", "deliveryenabled": 1, "country": "Sverige", "language": "sv", "email": "nisse.hult@example.com", "creditcheck": "Pending", "json_data": "[]", "hash": "29220704685725e3a09002f3794a67562334e220", "ip": "::1", "phonenumber": "0700000000", "enduserid": 0, "payment_id": "example", "batch_id": "example", "commission_percentage": 58, "commission_fee": 34, "glncode": "example", "awsSESmsgid": "example", "mexcCreditchecksid": 0, "mpuResponse": "example", "mpaStatus": "example", "mpaComments": "example", "transactionId": "example", "mm3useraccountsid": 97, "mexcQuickpaymentsid": "example", "swedbankpayId": "example", "attachmentFiles": [ "attachment1.pdf" ], "jsonData": { "pclass": -1 }, "JSON": { "delivery": {}, "Cart": {}, "Avrakning": {}, "PaymentData": {}, "InternallyData": {} }, "statuslogRows": [ "2022-01-01 08:29:15, Faktura annulleras via API (2,0): OnlineBillmate.v2 apiLogsid: 234567", "2022-01-01 08:05:29, Consumer, PDF is opened", "2022-01-01 07:51:28, Faktura skapas med API (Ny): Pluginname:BillMate:1.0 apiLogsid: 123456", "2022-01-01 07:51:28, Faktura skapas med API (Ny): Pluginname:BillMate:1.0 apiLogsid: 123456" ], "statuslogFiltered": [ "2022-01-01 08:29:15, Faktura annulleras via API (2,0): OnlineBillmate.v2 apiLogsid: 234567", "2022-01-01 07:51:28, Faktura skapas med API (Ny): Pluginname:BillMate:1.0 apiLogsid: 123456", "2022-01-01 07:51:28, Faktura skapas med API (Ny): Pluginname:BillMate:1.0 apiLogsid: 123456" ], "biFlags": "148713242640,", "INVOCE_FLAGS_SEND": false, "INVOCE_FLAGS_PAPER": false, "INVOCE_FLAGS_MAIL2CUSTOMER": false, "INVOCE_FLAGS_EBREV": false, "INVOCE_FLAGS_FACTORING": true, "INVOCE_FLAGS_HANDLING": false, "INVOCE_FLAGS_SENTBYDISTRIBUTOR": false, "INVOCE_FLAGS_CARD": false, "INVOCE_FLAGS_BANK": false, "INVOCE_FLAGS_CREDITCREATED": false, "INVOCE_FLAGS_PARTPAYMENT": false, "INVOCE_FLAGS_CASH": false, "INVOCE_FLAGS_CHECKOUT": false, "INVOCE_FLAGS_SIMPLE": false, "INVOCE_FLAGS_RECURRING_SOURCE": false, "INVOCE_FLAGS_RECURRING_DEBITS": false, "INVOCE_FLAGS_AUTOCREDIT": false, "INVOCE_FLAGS_EXPORTED2DISTRIBUTOR": false, "INVOCE_FLAGS_EFAKTURAISAVAILABLE": false, "INVOCE_FLAGS_CHATUNREAD": false, "INVOCE_FLAGS_QUEUED2SEND": false, "INVOCE_FLAGS_SENT2INKASSO": false, "INVOCE_FLAGS_FAILED2SEND": false, "INVOCE_FLAGS_SENT2STRALFORS": false, "INVOCE_FLAGS_SENT2TIETO": false, "INVOCE_FLAGS_SWISH": false, "INVOCE_FLAGS_AVRAKNAT": false, "INVOCE_FLAGS_REGRESS": false, "INVOCE_FLAGS_MONTHLYREPORTED": false, "INVOCE_FLAGS_MULPURINFORMED": true, "INVOCE_FLAGS_QUEUED2CREATEPDF": false, "INVOCE_FLAGS_CREDITCHECKPENDING": true, "INVOCE_FLAGS_BILLMATEAGREMENT": false, "INVOCE_FLAGS_BILLMATEFEE": true, "INVOCE_FLAGS_QUEUED2AUTOCANCEL": false, "INVOCE_FLAGS_BILLMATEFEECREDITTOBECHECKED": false, "INVOCE_FLAGS_ISINDISTRIBUTORSLIST": false, "INVOCE_FLAGS_QUEUEDPENDING2SEND": true, "INVOCE_FLAGS_REVIEW": false, "INVOCE_FLAGS_STATUS_DUE": false, "INVOCE_FLAGS_STATUS_COLLECTION": false, "INVOCE_FLAGS_ISBOUGHT": false, "INVOCE_FLAGS_ISREGRESSABLE": false, "INVOCE_FLAGS_CREDIFLOW_EFAKTURA": false, "INVOCE_FLAGS_CREDIFLOW_EFAKTURA_QUEUED": false, "INVOCE_FLAGS_CREDIFLOW_EFAKTURA_SENT": false, "INVOCE_FLAGS_INTEGRATION_ISEXPORTED": false, "INVOCE_FLAGS_CONFIRMED_BY_ACTIVATION": false, "INVOCE_FLAGS_PAYMENT_EXPORTED": false, "INVOCE_FLAGS_PAUSED": false, "INVOCE_FLAGS_PAYMENTFLOW2": false, "isFactoring": true, "isService": false, "isDirect": false, "isOwnAgreement": false, "paymentmethod": "14Days" } ]

Create a new invoice

POST method/invoices

Create a new invoice

Request parameters

{ "PaymentData": { "method": "1", "paymentplanid": "", "currency": "SEK", "language": "sv", "country": "SE", "autoactivate": "0", "orderid": "P123456789TXXxX", "logo": "Logo2.jpg", "accepturl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "cancelurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "callbackurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "status": "Created", "paymentid_related": "", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8" }, "PaymentInfo": { "paymentdate": "Mon Aug 15 00:00:00 UTC 2022", "paymentterms": "14", "yourreference": "Purchaser X", "ourreference": "Seller Y", "projectname": "Project Z", "deliverymethod": "Post", "deliveryterms": "FOB", "autocredit": "false", "invoiceStatus": "", "balancedue": "231700" }, "Card": { "promptname": "", "3dsecure": "", "recurring": "", "recurringnr": "", "accepturl": "https://www.mystore.se/completedpayment", "cancelurl": "https://www.mystore.se/failedpayment", "returnmethod": "", "callbackurl": "https://www.mystore.se/callback.php" }, "Customer": { "nr": "12", "pno": "550101-1018", "Billing": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0712-345678", "email": "test@developer.billmate.se" }, "Shipping": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Shipping Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0711-345678" } }, "Articles": [ { "artnr": "A123", "title": "Article X", "quantity": "2", "aprice": "1234", "discount": "0", "withouttax": "2468", "taxrate": "25" } ], "Cart": { "Handling": { "withouttax": "1000", "taxrate": "25" }, "Shipping": { "withouttax": "3000", "taxrate": "25" }, "Total": { "withouttax": "185325", "tax": "46331", "rounding": "44", "withtax": "231700" } }, "apiLogsid": "386151", "apiVersion": "2.3.0", "apiClient": "OnlineBillmate.v2" }

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Get the number of matching invoices according to the supplied filters

GET method/invoices/count

Returns object with a count representing the number of invoices that matches the current filter.

Responses

{ "count": 7 }

Activate multiple invoices by invoiceNumber

POST method/invoices/activate

Activate multiple invoices

Request parameters

[ 1202237, 1202238, 1202239 ]

Responses

null

Cancel multiple invoices by invoiceNumber

POST method/invoices/cancel

Cancel an invoices

Request parameters

[ 1202237, 1202238, 1202239 ]

Responses

null

Credit multiple invoices by invoiceNumber

POST method/invoices/credit

Credit an invoices

Request parameters

[ 1202237, 1202238, 1202239 ]

Responses

null

Get data per service

GET method/invoices/statistics/services

Return data for services per currency

Responses

{ "SEK": { "total": 12321, "number": 906, "services": { "factoring": 1223, "service": 12, "direct": 1234, "ownagreement": { "card": 213, "bank": 1234, "swish": 2134 } } } }

Get data for not activated invoices

GET method/invoices/statistics/not-activted

Return data for not activated invoices per currency

Responses

null

Get data per payment method

GET method/invoices/statistics/paymentmethods

Return data for payment methods per currency

Responses

null

Get grouped data summed up per day and currency

GET method/invoices/statistics/groupedData

Returns data per day separated by currency

Responses

null

Find invoice by invoiceNumber

GET method/invoices/{invoiceNumber}

Returns an invoice

Request parameters

Responses

{ "PaymentData": { "method": "1", "paymentplanid": "", "currency": "SEK", "language": "sv", "country": "SE", "autoactivate": "0", "orderid": "P123456789TXXxX", "logo": "Logo2.jpg", "accepturl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "cancelurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "callbackurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "status": "Created", "paymentid_related": "", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8" }, "PaymentInfo": { "paymentdate": "Mon Aug 15 00:00:00 UTC 2022", "paymentterms": "14", "yourreference": "Purchaser X", "ourreference": "Seller Y", "projectname": "Project Z", "deliverymethod": "Post", "deliveryterms": "FOB", "autocredit": "false", "invoiceStatus": "", "balancedue": "231700" }, "Card": { "promptname": "", "3dsecure": "", "recurring": "", "recurringnr": "", "accepturl": "https://www.mystore.se/completedpayment", "cancelurl": "https://www.mystore.se/failedpayment", "returnmethod": "", "callbackurl": "https://www.mystore.se/callback.php" }, "Customer": { "nr": "12", "pno": "550101-1018", "Billing": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0712-345678", "email": "test@developer.billmate.se" }, "Shipping": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Shipping Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0711-345678" } }, "Articles": [ { "artnr": "A123", "title": "Article X", "quantity": "2", "aprice": "1234", "discount": "0", "withouttax": "2468", "taxrate": "25" } ], "Cart": { "Handling": { "withouttax": "1000", "taxrate": "25" }, "Shipping": { "withouttax": "3000", "taxrate": "25" }, "Total": { "withouttax": "185325", "tax": "46331", "rounding": "44", "withtax": "231700" } }, "apiLogsid": "386151", "apiVersion": "2.3.0", "apiClient": "OnlineBillmate.v2" }

Delete an invoice

DELETE method/invoices/{invoiceNumber}

Cancels the invoice rather than deletes it

Request parameters

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Update an existing invoice

PATCH method/invoices/{invoiceNumber}

Update an existing invoice by invoice number

Request parameters

{ "PaymentData": { "method": "1", "paymentplanid": "", "currency": "SEK", "language": "sv", "country": "SE", "autoactivate": "0", "orderid": "P123456789TXXxX", "logo": "Logo2.jpg", "accepturl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "cancelurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "callbackurl": "https://webhook.site/ccb4825c-755b-47b2-95c9-4d6f95b573b1", "status": "Created", "paymentid_related": "", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8" }, "PaymentInfo": { "paymentdate": "Mon Aug 15 00:00:00 UTC 2022", "paymentterms": "14", "yourreference": "Purchaser X", "ourreference": "Seller Y", "projectname": "Project Z", "deliverymethod": "Post", "deliveryterms": "FOB", "autocredit": "false", "invoiceStatus": "", "balancedue": "231700" }, "Card": { "promptname": "", "3dsecure": "", "recurring": "", "recurringnr": "", "accepturl": "https://www.mystore.se/completedpayment", "cancelurl": "https://www.mystore.se/failedpayment", "returnmethod": "", "callbackurl": "https://www.mystore.se/callback.php" }, "Customer": { "nr": "12", "pno": "550101-1018", "Billing": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0712-345678", "email": "test@developer.billmate.se" }, "Shipping": { "firstname": "Testperson", "lastname": "Approved", "company": "Company", "street": "Teststreet", "street2": "Shipping Street2", "zip": "12345", "city": "Testcity", "country": "SE", "phone": "0711-345678" } }, "Articles": [ { "artnr": "A123", "title": "Article X", "quantity": "2", "aprice": "1234", "discount": "0", "withouttax": "2468", "taxrate": "25" } ], "Cart": { "Handling": { "withouttax": "1000", "taxrate": "25" }, "Shipping": { "withouttax": "3000", "taxrate": "25" }, "Total": { "withouttax": "185325", "tax": "46331", "rounding": "44", "withtax": "231700" } }, "apiLogsid": "386151", "apiVersion": "2.3.0", "apiClient": "OnlineBillmate.v2" }

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Activate invoice by invoiceNumber

POST method/invoices/{invoiceNumber}/activate

Activate an invoice

Request parameters

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Cancel invoice by invoiceNumber

POST method/invoices/{invoiceNumber}/cancel

Cancel an invoice

Request parameters

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Get the info of the credited invoices that are credited from invoiceNumber

GET method/invoices/{invoiceNumber}/credit

Sends the info of the credited invoices

Request parameters

Responses

{ "creditInvoices": [ 31, 31 ], "creditInvoiceSum": 213 }

Credit invoice by invoiceNumber

POST method/invoices/{invoiceNumber}/credit

Credit an invoice

Request parameters

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Duplicate an invoice by invoiceNumber

POST method/invoices/{invoiceNumber}/duplicate

Duplicate an invoice

Request parameters

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Get the attachments of the invoice

GET method/invoices/{invoiceNumber}/attachments

Returns the attachments of the invoice of the merchant that owns the token

Request parameters

Responses

[ { "Key": "attachments/17882/111731/attachment.pdf", "LastModified": "2022-08-25T11:57:37.000Z", "ETag": "230f0015b0475438892862e564b8a8a7", "ChecksumAlgorithm": [ "SHA-1" ], "Size": 28846, "StorageClass": "STANDARD", "Owner": { "DisplayName": "amazonservices", "ID": "5062f1fec6ea6ca653f3063ab7131ad2f8b37503644b47cb0e6a93220106e791" } } ]

Post the attachment(s) to the invoice

POST method/invoices/{invoiceNumber}/attachments

Place a new attachment(s) in the attachments of the invoice of a Merchant

Request parameters

Responses

{ "Attachments": "sample.pdf,sample.1.pdf" }

Get the attachment

GET method/invoices/{invoiceNumber}/attachments/{fileName}

Returns the attachment

Request parameters

Responses

{ "AcceptRanges": "bytes", "LastModified": "2022-08-25T12:05:52.000Z", "ContentLength": 28846, "ETag": "230f0015b0475438892862e564b8a8a7", "ContentType": "application/octet-stream", "Metadata": {}, "Body": { "type": "Buffer", "data": [ 10000 ] } }

Delete a logo

DELETE method/invoices/{invoiceNumber}/attachments/{fileName}

Removes a logo

Request parameters

Responses

{}

Split an invoice by invoiceNumber

POST method/invoices/{invoiceNumber}/split

Split an invoice

Request parameters

{ "Articles": [ 1, 1 ], "Handling": true, "Shipping": true }

Responses

{ "InvoiceResponse": { "number": "5816802", "orderid": "P123456789TXXxX", "url": "https://api.development.billmate.se/invoice/17882/20220817607e1295196ea16544a476b022b1fab8", "status": "example" } }

Precheck an invoice(s) before activation

POST method/invoices/activate/precheck

Precheck an invoice(s)

Request parameters

[ 88154 ]

Responses

{ "88154": { "code": 1005, "message": "Orgnum is test. Not possible to activate a invoice with test social security number", "type": "error" } }
Last modified: 13 September 2024