Copy PageCreate paymentposthttps://api.wafeq.com/v1/payments/Endpoint for creating a new payment. An update fails with 409 and code payment_changed when another request changed the payment while this update was waiting for it. Read the payment again, then retry the update.Query ParamsexpandstringComma-separated related objects to return in full instead of as IDs. Accepted values: attachments, contact, contact.persons, employee, employee.reimbursements_account, journal, paid_through_account, paid_through_account.parent, payment_fees_account, payment_fees_account.parent, project, payment_request, payment_request.attachments, payment_request.bank_account, payment_request.bills, payment_request.contact, payment_request.cost_center, cost_center. Nested relations are joined with a dot. Pass journal to replace the journal ID with its object (ID, date, currency, reference, notes and timestamps). Documents without a journal still return null. Journal line items are retrieved separately with GET /v1/journal-line-items/?journal={journal_id}.Body Paramsapplication/jsonapplication/x-www-form-urlencodedmultipart/form-dataA payment received from a customer or paid to a supplier or employee.amountdoublerequiredThe total amount of the payment, in the payment currency. It must reconcile against whichever list is set. The five document-linked lists (invoice_payments, bill_payments, credit_note_payments, debit_note_payments, payslip_payments) are summed by amount_to_pcy; advance blocks (credit_notes, debit_notes) without an explicit currency or rate are summed by amount. With an explicit advance currency or rate, the advance and payment must instead have equal base-currency values after fees. For money-out payments (bill_payments, credit_note_payments, payslip_payments, debit_notes) amount equals that sum plus payment_fees; for money-in payments (invoice_payments, debit_note_payments, credit_notes) it equals that sum minus payment_fees. Must be greater than zero.attachmentsarray of stringsFiles attached to this payment. Send an empty list to remove all links.Add stringbill_paymentsarray of objectsA list of objects to represent bill payments. Required if paying bills.Add objectcontactstringThe unique identifier of the contact associated with this payment.cost_centerstring | nullThe unique identifier of the cost center associated with this payment.credit_note_paymentsarray of objectsA list of objects to represent credit note payments. Required if applying credit notes.Add objectcredit_notesarray of objectsA list with a single object to record a customer advance (money received before any invoice exists). A matching credit note is auto-generated.Add objectcurrencystringenumrequiredThe currency code of the payment. View the enum referenceAEDSARUSDEURCADAFNALLAMDARSAUDAZNBAMBDTBGNBHDBIFBNDBOBBRLBWPBYNBZDCDFCHFCLPCNYCOPCRCCVECZKDJFDKKDOPDZDEGPERNETBGBPGELGHSGNFGTQHKDHNLHRKHUFIDRILSINRIQDIRRISKJMDJODJPYKESKGSKHRKMFKRWKWDKZTLBPLKRLYDMADMDLMGAMKDMMKMOPMURMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPHPPKRPLNPYGQARRONRSDRUBRWFSDGSEKSGDSOSSYPTHBTJSTNDTOPTRYTTDTWDTZSUAHUGXUYUUZSVESVNDXAFXOFYERZARZMWShow 117 enum valuesdatedaterequiredThe date when the payment was made or received.debit_note_paymentsarray of objectsA list of objects to represent debit note payments. Required if paying debit notes.Add objectdebit_notesarray of objectsA list with a single object to record a supplier advance (money paid before any bill exists). A matching debit note is auto-generated.Add objectemployeestringThe unique identifier of the employee associated with this payment. Required for payslip payments.exchange_ratedouble | nullThe exchange rate to the organization base currency at the time of the payment.external_idstringlength ≤ 255External identifier for the payment.invoice_paymentsarray of objectsA list of objects to represent invoice payments. Required if paying invoices.Add objectpaid_through_accountstringrequiredThe account used for this payment. Must be a valid payment account.payment_feesdoubleBank charges, or the residual left over when the lines do not add up to amount — typically the rounding and exchange-rate difference on a payment settling documents held in another currency. May be negative, and what that means depends on the direction: on a money-out payment a negative value means the lines convert to more than the cash actually paid, while on a money-in payment it means more was received than the lines convert to. Must not be zero; omit the field instead.payment_fees_accountstring | nullThe account to categorize payment_fees. Required if payment_fees is set, and cannot be a bank account. Use the Exchange Gain or Loss account when the residual is an exchange-rate difference.payslip_paymentsarray of objectsA list of objects to represent payslip payments. Required if paying payslips.Add objectprojectstring | nullThe unique identifier of the project associated with this payment.referencestringThe reference of the payment.HeadersX-Wafeq-Idempotency-KeystringClient-provided UUID to uniquely identify a requestX-Wafeq-OrganizationstringThe id of the organization to act on, from GET /v1/organizations/. Required when the OAuth token or accounting partner API key grants access to several organizations; optional otherwise. With an organization API key, it must name the key's own organization.content-typestringenumDefaults to application/jsonGenerated from available request content typesapplication/jsonapplication/x-www-form-urlencodedmultipart/form-dataAllowed:application/jsonapplication/x-www-form-urlencodedmultipart/form-dataResponse201Updated 8 days agoList paymentsDelete payment