Bill

Create and manage bills for one-time payments with Metaprise Billing.

Overview

The Bill object represents products and/or services sold by a Vendor to your Organization. In adding to creating bills, you can attach bill images or related documents.


Before you begin

Sign up the Metaprise developer devhub platform to get your unique Client ID and API key.
Obtain your access token by authenticating to Metaprise using your unique Client ID and API key. You will need the access token to make API calls.
Set up webhooks to receive notifications on Global Account events.


Bill operations

The bill operations API provides a wide range of services.


Bill AttributesDescription
VendorAn individual or company that sells goods or services to your Organization.
InvoiceThe invoice sent from the vendor to link with a bill created in Metaprise.
AmountClear presentation of the subtotal, sales tax, and total due helps the customer understand the breakdown of the charges and the final amount they owe.
Due DateThe bill due date is prominently displayed in the invoice template and calculated based on the established payment terms.
AccountWhat businesses use to track transactions.

Create a new Bill

  1. Use dashboard to create a new invoice.

    1. Sign up and log in the Metaprise dashboard

    2. Click 'Create Bill' button.

    3. Fill the required information based on Bill operation table.

    4. Select 'Save as draft', 'Pay now' or 'Pay on Due Day'.


  2. Use API to create a new bill.

    1. Create a vendor who sends invoice to the customer.
    2. Create Account to track transactions
    3. Create the bill, call POST /payable and provide the quote ID in the based_on field in the request body:
      curl -X POST 'https://api.sandbox.metaprise.com/v1/payables' \
           -H 'X-Metaprise-Version: 2024-01-31' \
           -H 'X-Metaprise-Entity-Id: ENTITY_ID' \
           -H 'Authorization: Bearer ACCESS_TOKEN' \
           -H 'Content-Type: application/json' \
           -d '{
             "type": "bill",
             "based_on": "e9a25ceb-003d-4c82-9e90-5d568ccd8c47"
           }'
      

The request above creates a new draft bill with a copy of the quote data (that is, with the account and vendor). The ID and document number of the original quote are saved in the based_on and based_on_document_id properties, respectively:

{
    "result": "success",
    "data": {
        "uid": "12217",
        "bill_no": "100000002826",
        "bill_date": "2015-10-06T10:50:42-07:00", 
        "recurring_no": "100000002829",
         "invoice_no": 
        "customer_id": "12217",
        "customer_name": "Fantastic Juicy",
        "invoice_no": "100000006028",
        "invoice_date": "2015-10-06T10:50:42-07:00", 
        "vendor_id": "12247",
        "vendor_company_name": "Walmart inc.",
        "vendor_email": "[email protected]",
        "tax_id": "1221",
        "tax_rate": "10%",
        "sub_total_1": "78.00",
        "sub_total_2": "78.00",
        "tax": "13.26",
        "total": "91.26",
        "currency": "usd", 
        "po_no": "100000006029",
        "bill_desp": "Please pay the invoice within 30 days",
        "attach": "",   
        "bill_status": "Processing",
        "payment_status": "Not paid",  
        "payment_total": "91.26",  
        "payment_type": " ", 
        "payment_term": "Net 15", 
        "payment_date": "2015-10-06T10:50:42-07:00", 
        "is_equal": "true", 
        "is_soft_del": "true", 
        "quickbook_sync": "true
        "create_at": "2015-10-06T10:50:42-07:00",  
        "update_at": "2015-10-06T10:50:42-07:00",      
        "transaction_id": "Q240822154005791698",   
        "pm_card_bind_id": "23423423",
        "st_ticket_id_refund_1": "",     
        "st_ticket_id_refund_2": "",   
        "refund_total": "",  
        "refund_date": "2015-10-06T10:50:42-07:00",   
        "pay_to_name": "Alex Tang",
        "account_number": "2312321",
        "routing_number": "1346",
        "swift_code": "24323",
        "bank_type": "",
        "account_type": "",
        "pay_after": "",
        "due_date": "2015-10-06T10:50:42-07:00", 
        "pay_on_due_date": "false",
        "source": "Metaprise",
        "quickbook_id": "", 
    }
}

Update a bill

All newly created bill start in the draft status. You can edit draft bills before issuing them to a vendor.

To edit a draft bill , send a PATCH request to the /payable/{payable_id} endpoint with the request body containing the updated properties. You can update account data, vendor data and bill details data.

{
    "result": "success",
    "data": {
        "uid": "12217",
        "bill_no": "100000002826",
        "bill_date": "2015-10-06T10:50:42-07:00", 
        "recurring_no": "100000002829",
         "invoice_no": 
        "customer_id": "12217",
        "customer_name": "Fantastic Juicy",
        "invoice_no": "100000006028",
        "invoice_date": "2015-10-06T10:50:42-07:00", 
        "vendor_id": "12247",
        "vendor_company_name": "Walmart inc.",
        "vendor_email": "[email protected]",
        "tax_id": "1221",
        "tax_rate": "10%",
        "sub_total_1": "78.00",
        "sub_total_2": "78.00",
        "tax": "13.26",
        "total": "91.26",
        "currency": "usd", 
        "po_no": "100000006029",
        "bill_desp": "Please pay the invoice within 30 days",
        "attach": "",   
        "bill_status": "Processing",
        "payment_status": "Not paid",  
        "payment_total": "91.26",  
        "payment_type": " ", 
        "payment_term": "Net 15", 
        "payment_date": "2015-10-06T10:50:42-07:00", 
        "is_equal": "true", 
        "is_soft_del": "true", 
        "quickbook_sync": "true
        "create_at": "2015-10-06T10:50:42-07:00",  
        "update_at": "2015-10-06T10:50:42-07:00",      
        "transaction_id": "Q240822154005791698",   
        "pm_card_bind_id": "23423423",
        "st_ticket_id_refund_1": "",     
        "st_ticket_id_refund_2": "",   
        "refund_total": "",  
        "refund_date": "2015-10-06T10:50:42-07:00",   
        "pay_to_name": "Alex Tang",
        "account_number": "2312321",
        "routing_number": "1346",
        "swift_code": "24323",
        "bank_type": "",
        "account_type": "",
        "pay_after": "",
        "due_date": "2015-10-06T10:50:42-07:00", 
        "pay_on_due_date": "false",
        "source": "Metaprise",
        "quickbook_id": "", 
    }
}