Mode of Payment
A payment method the till and the back office accept: cash, a card, a voucher, a wallet.
Area: Payments and payment methods · Why it is here: recipe payment_method_rules; recipe refund_rules; retail core · Fields: 29
Read and write it
Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.
Read a list (only name unless you ask for fields):
curl -s "https://⟨site⟩/api/resource/Mode%20of%20Payment?fields=%5B%22*%22%5D&limit_page_length=20" \
-H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Read one, with its tables:
curl -s "https://⟨site⟩/api/resource/Mode%20of%20Payment/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Create one (the required fields first), if your app's role may:
curl -s -X POST "https://⟨site⟩/api/resource/Mode%20of%20Payment" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
-H "Content-Type: application/json" -d '{"mode_of_payment": …}'
Change one with PUT /api/resource/Mode%20of%20Payment/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.
Samples that use it
s22_customer_loyalty · s46_payment_method_rules · s51_refund_rules
Fields
Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Mode of Payment | mode_of_payment |
Data | yes | |||
| Description (added by iVendNext) | custom_description |
Text | yes | |||
| Enabled | enabled |
Check | ||||
| Type | type |
Select | one of: Cash, Bank, General, Phone | |||
| Accounts | accounts |
Table | Mode of Payment Account | |||
| Payment Fieldname (added by iVendNext) | payment_fieldname |
Select | yes | |||
| Currency Denomination (added by iVendNext) | custom_currency_denomination |
Table | Currency Denomination | |||
| Min Amount (added by iVendNext) | custom_min_amount |
Currency | ||||
| Max Amount (added by iVendNext) | custom_max_amount |
Currency | ||||
| Check Credit Limit (added by iVendNext) | custom_check_credit_limit |
Check | ||||
| Counted (added by iVendNext) | custom_counted |
Check | ||||
| Count Type (added by iVendNext) | custom_count_type |
Select | one of: Summary, Detail | |||
| Print Payment Receipt (added by iVendNext) | custom_print_payment_receipt |
Check | ||||
| Payment Receipt Format (added by iVendNext) | custom_payment_receipt_format |
Link | Print Format | |||
| Open Cash Drawer (added by iVendNext) | custom_open_cash_drawer |
Check | ||||
| Rounding Method (added by iVendNext) | custom_rounding_method |
Select | one of: No Rounding, Round to Five Hundredth, Round to One Hundredth, Round to One, Round to Ten, Round to Fifty, Round to Hundred | |||
| Allow Over Tender (added by iVendNext) | custom_allow_over_tender |
Check | ||||
| Over Tender Rate Type (added by iVendNext) | custom_over_tender_rate_type |
Select | one of: Amount, Percentage | |||
| Over Tender Rate (added by iVendNext) | custom_over_tender_rate |
Float | ||||
| Affects Tipple Point (added by iVendNext) | custom_affects_tipple_point |
Check | ||||
| Enable Tender Discount (added by iVendNext) | custom_enable_tender_discount |
Check | ||||
| Discount Type (added by iVendNext) | custom_tender_discount_type |
Select | one of: Percentage, Amount | |||
| Discount Value (added by iVendNext) | custom_tender_discount_value |
Currency | ||||
| Maximum Discount Amount (added by iVendNext) | custom_tender_discount_max_amount |
Currency | ||||
| Minimum Transaction Amount (added by iVendNext) | custom_tender_discount_min_txn_amount |
Currency | ||||
| Maximum Transaction Amount (added by iVendNext) | custom_tender_discount_max_txn_amount |
Currency | ||||
| Valid From (added by iVendNext) | custom_tender_discount_valid_from |
Date | ||||
| Valid Upto (added by iVendNext) | custom_tender_discount_valid_upto |
Date | ||||
| Card Details Required (added by iVendNext) | custom_card_details_required |
Select | one of: Holder, number and expiry, Last four digits only, Not required |
Table: Currency Denomination
The rows of custom_currency_denomination. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Code | code |
Data | yes | |||
| Description | description |
Data | ||||
| Value | value |
Float | yes |
Table: Mode of Payment Account
The rows of accounts. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Company | company |
Link | Company | |||
| Default Account | default_account |
Link | Account |