Skip to content
Docs
Menu
View as Markdown

Create new document

POSThttps://restapidev.payplus.co.il/api/v1.0/books/docs/new/{docType}

Environment

Headers

stringrequired
API Key
stringrequired
Secret Key

Path parameters

stringrequired
Type of document to createOne of: inv_tax_receipt, inv_tax, inv_receipt, inv_proforma, inv_refund, crt_delivery, crt_return, order_purchase, purchase, dc_quote, inv_don_receipt, inv_pay_request

Request body application/json

FieldTypeDescription
tagsstring[]Array of arbitrary strings used to catalogue/ tag documents
draftbooleanCreate a draft document. No actual document will be generated if set to true
itemsobject[]
items[].namestringItem/product name
items[].priceinteger (int)
items[].barcodestring
items[].quantityinteger (int)
items[].currency_codestringEX: ILS
items[].discount_typestring'percentage' OR 'amount'One of: percentage, amount
items[].vat_type_codestringIf omitted, document level value will be used instead.One of: vat-type-included, vat-type-not-included, vat-type-exempt
items[].discount_valueinteger (int)See previous entry for more details
items[].conversion_rateinteger (int)Required if currency code is specified and is different from the base currency.
items[].is_summary_itembooleanShow item as a summary line
previewbooleanGet a preview of the document. No document will be generated if set to true
vatTypestringIf omitted, configuration values will be used insteadOne of: vat-type-included, vat-type-not-included, vat-type-exempt
customerobject
customer.citystring
customer.namestringName, to be displayed as the document recipient. Required unless existing valid customer uuid provided
customer.emailrequiredstringShall be displayed on the document. Additionally, if provided, an email message containing the original document will be dispatched to this address.
customer.phonestringIf specified, this number will appear on the document. Also the phone number to send an SMS message if applicable
customer.paying_vatboolean
customer.vat_numberstringRecipient vat number/ID to be displayed on the document
customer.country_ISOstringEX: IL
customer.postal_codestring
customer.street_namestring
customer.balance_namestringWill be used as the balance name for journal exports
customer.customer_uidstringReference code of a previously created customer. If specified, document customer information shall be taken from the customer record
customer.street_numberstring
customer.create_customerbooleanIf true, will attempt to create a new customer from the provided information. If customer with similar details already exists, it will be used instead and all missing details will be added from th
doc_datestringstring Document issue date. Format: YYYY-MM-DD. Defaults to current da
languagestringOne of: he, en
paymentsobject[]
payments[].rateinteger (int)
payments[].amountnumberTotal payment amount
payments[].paymentsstringPayment type: credit-card. Number of payments
payments[].card_typestringpayment type: credit-cardOne of: mastercard, american-express, discover, visa, diners, other, jcb, maestro
payments[].bank_numberstringpayment type: payment-check,bank-transfer
payments[].descriptionstringPayment description
payments[].four_digitsstringPayment type: credit-card/ payment-app. Last four digits of the credit card number
payments[].payment_appstringpayment type: payment-appOne of: bit, string, max, string, apple-pay, string, google-pay, string, multipass, string, pay-box, string, tav-zahav, string, praxell, string, valuecard, string, verifone
payments[].check_numberstringpayment type: payment-check
payments[].payment_datestringDate in the format YYYY-MM-DD. Defaults to whatever was set for doc_date
payments[].payment_typestringType of the payment being submittedOne of: credit-card, cash, paypal, bank-transfer, payment-check, payment-app, other, withholding-tax
payments[].branch_numberstring
payments[].currency_codestringSee currencies for more information
payments[].first_paymentstringPayment type: credit-card. First payment amount
payments[].payer_accountstring
payments[].account_numberstringpayment type: payment-check,bank-transfer
payments[].transaction_typestringpayment type: credit-cardOne of: normal, payments
payments[].other_payment_typestringpayment type: otherOne of: crypto, giftcard, credit, vcheck
payments[].transaction_numberstringpayment type: paypal
payments[].subsequent_paymentsstringPayment type: credit-card. The amount of the subsequent payments
close_docstringUUID of a previously created document. If supplied, the new document will also close the document indicated by the UUID
more_infostringnullable Optional identifier. Will appear at the bottom of the document
brand_uuidstringIf multiple brands exist, specify brand uuid to create document associated with a specific brand. If none provided, the default brand
cancel_docstringUUID of a previously created document. If supplied, the new document will also cancel the document indicated by the UUID
totalAmountinteger (int)Total sum of the document.
callback_urlstringIf valid url is specified, payplus will send a notification to the specified URL upon successful document creation
currency_codestring
prevent_emailbooleanIf true, will not send
vat_percentageinteger (int)Vat percentage to use for calculations. If omitted, configuration values will be used instead
conversion_ratenumber (float)If document currency specified is not ILS, this value will be used as the conversion rate for all the prices into the base currency.
transaction_uuidstringUUID of a PayPlus transaction
send_document_smsbooleansend_document_sms
unique_identifierstringArbitrary, unique string. If supplied, the system will refuse further creation attempts if it finds a duplicate, ensuring that this value will always be unique per document.
autocalculate_ratebooleanIf the conversion rate parameter is omitted, determine conversion rate automatically
hide_base_currencybooleanWhether or not to hide the base currency (usually ILS) in a foreign currency document.
send_document_emailbooleanSend email upon document creation. Will override the whatever's defined in your account
Edit the request body

Responses

200 200
FieldTypeDescription
brandobject
brand.namestringExample: Company Name
brand.uuidstringExample: 67a8cc93-75ac-4832-8386-3eb5b24bf3d0
docUIDstringExample: 1fa79282-61d1-4898-b7b9-afa67f46d34a
numberstringExample: SCP/50042
barcodestringExample: 472819632332439
customerobject
customer.uuidstringExample: faa6280f-dba5-4889-9b15-de60e1527bdc
customer.emailstringExample: [email protected]
customer.phonestringExample: 123456789
customer.vat_numberstringExample: 1231231
customer.subject_codestringExample: 987654321
customer.customer_namestringExample: John Doe
doc_datestringExample: 2022-11-15
doc_typestringExample: inv_tax
more_infoany
currency_codestringExample: ILS
customer_uuidstringExample: faa6280f-dba5-4889-9b15-de60e1527bdc
copyDocAddressstringExample: https://restapi.payplus.co.il/getdoc/s/c/1fa79282-61d1-4898-b7b9-afa67f46d34a.pdf
originalDocAddressstringExample: https://restapi.payplus.co.il/getdoc/s/o/1fa79282-61d1-4898-b7b9-afa67f46d34a.pdf
validDocumentGeneratedbooleanExample: true
total_items_base_currencyintegerExample: 150
400 400
Was this page helpful?
Ask AI

Ask a question about PayPlus. Answers come from the published docs, with links to the pages they use.

AI answers can be wrong. Check the linked pages.

Your PayPlus accountOpen in a new tab