Paymentwall website uses cookies to store your browsing preferences on your device. However, cookies do not collect personal information.

For more information about how we use cookies, check our cookie policy

Close

Documentation

New Documentation Getting Started API Libraries APIs Checklists Flows Integrations Mobile SDKs Reference Smart TV SDK SpiderPipe Testing Payments
Contacts
If you still have questions regarding integration, please email us at devsupport@paymentwall.com

Invoice API

Create Invoice

  • API Endpoint: https://api.paymentwall.com/developers/invoice-api/invoice
  • HTTP method: POST
  • Header: X-ApiKey: [YOUR_SECRET_KEY]
  • Sample data:
    {
    "invoice_number":"INV-00123",
    "currency":"USD",
    "date":"09/10/2014",
    "due_date":"09/10/2019",
    "contacts":[
        {
            "company_name":"ABCD Industries",
            "salutation":"Mr.",
            "first_name":"John",
            "last_name":"Doe",
            "email":"john@doe.com",
            "title":"CEO",
            "country":"US",
            "city":"Palo Alto",
            "address":"326 Market Street",
            "zipcode":"94103",
            "phone_number":"(800)5551000",
            "note":"This will show on your Invoice"
        }
    ],
    "items":[
        {
            "quantity":20,
            "title":"Red apple",
            "description":"Fresh apples",
            "unit_cost":2,
            "currency":"USD",
            "tax":{
                "type":"percentage",
                "value":"10"
            },
            "discount":{
                "type":"percentage",
                "value":"17"
            }
        },
        {
            "quantity":10,
            "title":"Green apple",
            "description":"Fresh apples",
            "unit_cost":2,
            "currency":"USD",
            "tax":{
                "type":"percentage",
                "value":"10"
            },
            "discount":{
                "type":"percentage",
                "value":"17"
            }
        },
    ],
    "taxes":[
        {
            "type":"percentage",
            "value":"20",
            "name":"VAT EU"
        },
        {
            "type":"percentage",
            "value":"10",
            "name":"USA NATIONAL TAX"
        }
    ],
    "discounts":[
        {
            "type":"percentage",
            "value":"50",
            "name":"1 000 000 user discount"
        }
    ]
    "key":"[YOUR_APPLICATION_KEY]"
    }

    Parameters

    Invoice

Parameter Required Type Description
invoice_number yes string Official Invoice number based on your paybook
currency yes string Currency code in ISO 4217
date yes string Invoice date in day/month/year format
due_date yes string Invoice due date in day/month/year format
clients yes array Array of your clients
items yes array Array of your Invoice items
taxes no array Array of your Invoice taxes
discounts no array Array of your Invoice discount
key yes string Your application key
sign yes string Your signature based on your invoice params
sign_version yes string version of signature
status no string sent, draft, outstanding, overdue, paid, deleted, cancelled, archived, failed. default: draft
template no integer numeric ID of the invoice template you can set up in Templates section
reference_number no string Your reference number, for example for paid invoices - reference ID of payment

Clients

Parameter Required Type Description
email yes string Client email
first_name yes string First name of your client
last_name yes string Last name of your client
company_name no string Company name
salutation no string Mr./Ms./Dr.
title no string Position in company_name
country no string Client country
city no string Client city
address no string Client address
zipcode no string Zip code
phone_number no string Phone number
note no string Internal information about this client

Items

Parameter Required Type Description
quantity yes int Client email
unit_cost yes float First name of your client
currency yes string Currency of your Invoice in ISO 4217 format (Note: Currency of Invoice and Items must be same!)
title yes string Item name
description no string Item description
tax no array Item tax
discount no array Item discount

Tax and Discount of item

Parameter Required Type Description
type yes string Type of tax/discount. Currently support: percentage
value yes float Value of tax/discount. Example: 10

Tax and Discount of invoice

Parameter Required Type Description
type yes string Type of tax/discount. Currently support: percentage
value yes float Value of tax/discount. Example: 10 (means 10%)
name yes string Name of your Tax/Discount

Example

curl https://api.paymentwall.com/developers/invoice-api/invoice \
-H "X-ApiKey: [YOUR_PRIVATE_KEY]" \
-d '{"invoice_number":"INV-00123","currency":"USD","date":"09/10/2014","due_date":"09/10/2019","contacts":[{"company_name":"ABCD Industries","salutation":"Mr.","first_name":"John","last_name":"Doe","email":"john@doe.com","title":"CEO","country":"US","city":"Palo Alto","address":"326 Market Street","zipcode":"94103","phone_number":"(800)5551000","note":"This will show on your Invoice"}],"items":[{"quantity":20,"title":"Red apple","description":"Fresh apples","unit_cost":2,"currency":"USD","tax":{"type":"percentage","value":"10"},"discount":{"type":"percentage","value":"17"}},{"quantity":10,"title":"Green apple","description":"Fresh apples","unit_cost":2,"currency":"USD","tax":{"type":"percentage","value":"10"},"discount":{"type":"percentage","value":"17"}}],"taxes":[{"type":"percentage","value":"20","name":"VAT EU"},{"type":"percentage","value":"10","name":"USA NATIONAL TAX"}],"discounts":[{"type":"percentage","value":"50","name":"1 000 000 user discount"}],"key":"[YOUR_PUBLIC_KEY]"}'
This page needs JavaScript
Your browser is
not supported anymore.
Please update to the more recent one.
This page needs JavaScript
This page needs JavaScript.
Please enable it in your browser settings and try again.
We use cookies on this website to make your browsing experience better. By using the Paymentwall website you agree to our Cookies Policy.