Add/Edit Template

This endpoint is used to add/edit template details for invoice plugin

Method

POST https://api.ninjapay.me/webextension/api/v1/fiat/invoice/user/template/create

Parameters

  • id (number): If need to update template add value here from get template api response

  • template (object): Contains the following properties:

    • business_logo (string): URL of the business logo NOTE: use upload Attachment API response for value

    • business_name (string, required): Name of the business

    • phone (string, required): Contact phone number (without country code)

    • phone_code (string, required): Country code for the phone number

    • email (string, required): Contact email address

    • billing_address (string): Billing address

    • city (string): City of the business

    • state (string): State of the business

    • zipcode (string): Zipcode of the business

    • country (string): Country of the business

    • documents (object): Contains document details:

      • doc_1 (object): First document:

        • title (string): Title of the document

        • value (string): Value of the document

      • doc_2 (object): Second document:

        • title (string): Title of the document

        • value (string): Value of the document

    • default_currency (string): Default currency for transactions

    • enable_qr (boolean): Enable or disable QR code generation

    • redirect_url (string): URL to redirect after payment

    • include_invoice_id (boolean): Include invoice ID in the documentation

    • webhook_url (string): URL for webhook callbacks

    • terms_condition_url (string): URL for terms and conditions

    • custom_thanks_message (string): Custom thank you message

    • custom_button_text (string): Custom text for the payment button

    • green_donation_link (string): URL for green donation link

    • donation_percentage (number): Percentage of donation

    • donation_message (string): Message regarding donations

    • tax_details (object): Contains tax details:

      • tax_title (string): Title for tax

      • tax_percentage (number): Tax percentage

      • tax_country (string): Country where the tax is applicable

      • is_all_states (boolean): If tax is applicable to all states

      • tax_states (array): List of states where tax is applicable (empty if all states)

Request Body

Response

Code Example

Last updated