vial-circle-checkTC: Pay at Table

TC: Pay at Table

OrderType 3: PosTransaction - Test Suite


Test Case PSPT_TC01: Standard Payment

Objective: Verify standard payment can be processed successfully

Prerequisites:

  • Valid authentication token

  • POS terminal connected

  • Valid company code and location

  • Open order on Table 1

Steps:

  1. Call GetTransactionList for Table 1 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order is open and has items

  6. Call UpdateOrder to calculate final totals:

  1. Verify response contains calculated totals

  2. Note the amountdue value from response

  3. Take payment via payment provider

  4. Call UpdateOrder with payment to close order:

  1. Verify response has error: false

  2. Verify amountpaid = amountdue

  3. Verify isOpen: false

  4. Verify order cannot be modified after closure

Expected Result:

  • Payment processed successfully

  • Order closed successfully

  • amountpaid matches amountdue

  • Order state is immutable after closure

Pass/Fail Criteria: Order closed with balanced payment, no errors returned


Test Case PSPT_TC02: Standard Payment with Discount

Objective: Verify payment processes correctly with POS-initiated discount

Prerequisites:

  • Valid authentication token

  • Open order on Table 2

  • Discount configured in POS

Steps:

  1. Call GetTransactionList for Table 2 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has items

  6. Call UpdateOrder to calculate POS discounts and final totals:

  1. Verify adjustmentitems array contains POS-calculated discount

  2. Verify saletotal reflects discounted amount

  3. Note the amountdue value from response

  4. Take payment via payment provider

  5. Process payment for discounted total:

  1. Verify amountpaid = amountdue

Expected Result:

  • POS discount applied correctly

  • Sale total recalculated

  • Payment processed for correct amount

Pass/Fail Criteria: POS discount appears in order, payment matches discounted total


Test Case PSPT_TC03: Standard Payment with Discount and Service Charge

Objective: Verify payment processes correctly with both POS discount and service charge

Prerequisites:

  • Valid authentication token

  • Open order on Table 3

  • Discount and service charge configured in POS

Steps:

  1. Call GetTransactionList for Table 3 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has items

  6. Call UpdateOrder to calculate POS discount, service charge and final totals:

  1. Verify adjustmentitems array contains both POS-calculated discount and service charge

  2. Verify saletotal includes both adjustments

  3. Note the amountdue value from response

  4. Take payment via payment provider

  5. Process payment for final total:

  1. Verify all business rules triggered

Expected Result:

  • POS discount applied correctly

  • Service charge applied correctly

  • All adjustments visible in response

  • Correct final total calculation

Pass/Fail Criteria: Both POS adjustments applied, payment matches final calculated total


Test Case PSPT_TC04: Partial Payment - Transaction Remains Open

Objective: Verify partial payment leaves order in open state

Prerequisites:

  • Valid authentication token

  • Open order on Table 4 with amountdue = 50.00

Steps:

  1. Call GetTransactionList for Table 4 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has amountdue = 50.00

  6. Call UpdateOrder to calculate final totals:

  1. Verify calculated amountdue in response

  2. Take partial payment via payment provider (30.00)

  3. Call UpdateOrder with partial payment:

  1. Verify response has error: false

  2. Verify amountpaid = 30.00

  3. Verify amountdue = 20.00 (remaining balance)

  4. Verify isOpen: true

  5. Verify order can still be modified

Expected Result:

  • Partial payment processed successfully

  • Outstanding balance calculated correctly

  • Order remains open

  • Order can accept additional payments

Pass/Fail Criteria: Partial payment accepted, correct balance remaining, order stays open


Test Case PSPT_TC05: Multiple Payments - App Split Bill

Objective: Verify multiple guests can pay their portions via app

Prerequisites:

  • Valid authentication token

  • Open order on Table 5 with amountdue = 100.00

Steps:

  1. Call GetTransactionList for Table 5 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has amountdue = 100.00

  6. Call UpdateOrder to calculate final totals:

  1. Note the calculated amountdue value

  2. Guest 1 takes payment via payment provider (40.00)

  3. Guest 1 pays their portion:

  1. Verify amountpaid = 40.00, amountdue = 60.00

  2. Guest 2 takes payment via payment provider (35.00)

  3. Guest 2 pays their portion:

  1. Verify amountpaid = 75.00, amountdue = 25.00

  2. Guest 3 takes final payment via payment provider (25.00)

  3. Guest 3 pays final portion:

  1. Verify amountpaid = amountdue = 100.00

  2. Verify isOpen: false

  3. Verify all payment items recorded in paymentitems array

Expected Result:

  • All partial payments processed

  • Running balance calculated correctly

  • Final payment closes order

  • All payments tracked individually

Pass/Fail Criteria: Multiple guests can pay separately, order closes when fully paid


Test Case PSPT_TC06: Standard Payment - PoS Split Bill

Objective: Verify payment works with POS-initiated split bills

Prerequisites:

  • Valid authentication token

  • Order on Table 6 split into 3 bills via POS

Steps:

  1. Call GetTransactionList for Table 6 to retrieve available bills

  2. Verify response contains 3 split bills with their amounts

  3. Select split bill 1 to process

  4. Call GetTransaction to retrieve full details for split bill 1

  5. For split bill 1 (position 0), call UpdateOrder to calculate totals:

  1. Note the amountdue for split bill 1

  2. Take payment via payment provider

  3. Process payment for split bill 1:

  1. Repeat steps 3-6 for remaining split bills (transactionpos: 1 for bill 2, transactionpos: 2 for bill 3)

  2. Verify each split bill can be paid independently

  3. Verify original order closes when all splits are paid

  4. Verify payment totals sum to original order total

Expected Result:

  • Each split bill paid successfully

  • Original order marked as complete

  • Total payments match original order value

Pass/Fail Criteria: All split bills process correctly, order completes when all paid


Test Case PSPT_TC07: Payment using Gift Card (Optional)

Objective: Verify gift card payment method is processed correctly

Prerequisites:

  • Valid authentication token

  • Open order on Table 7

  • Gift card payment type configured in POS

  • Valid gift card number

Steps:

  1. Call GetTransactionList for Table 7 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has items and total

  6. Call UpdateOrder to calculate final totals:

  1. Note the calculated amountdue value

  2. Take payment via gift card payment provider

  3. Process payment with gift card:

  1. Verify response has error: false

  2. Verify gift card balance deducted

  3. Verify order closed successfully

Expected Result:

  • Gift card payment processed

  • Order closed successfully

  • Gift card balance updated

Pass/Fail Criteria: Gift card accepted as payment method, order closes successfully


Test Case PSPT_TC08: Deposit Payment (Optional)

Objective: Verify deposit payment followed by balance payment

Prerequisites:

  • Valid authentication token

  • Open order on Table 8 with amountdue = 100.00

Steps:

  1. Call GetTransactionList for Table 8 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has amountdue = 100.00

  6. Call UpdateOrder to calculate final totals:

  1. Note the calculated amountdue value

  2. Take deposit payment via payment provider (20.00)

  3. Process deposit payment:

  1. Verify amountpaid = 20.00, amountdue = 80.00

  2. Verify order remains open

  3. Take final payment via different payment provider (80.00)

  4. Process final payment with different method:

  1. Verify both payment types recorded

  2. Verify order closed successfully

Expected Result:

  • Deposit payment processed

  • Multiple payment methods supported

  • Final payment closes order

Pass/Fail Criteria: Deposit recorded, final payment completes transaction with multiple payment types


Test Case PSPT_TC09: App Triggered Discount and Payment (Optional)

Objective: Verify app can apply discount then process payment

Prerequisites:

  • Valid authentication token

  • Open order on Table 9

  • App has permission to apply discounts

Steps:

  1. Call GetTransactionList for Table 9 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has items

  6. App applies discount via UpdateOrder:

  1. Verify discount applied

  2. Call UpdateOrder to calculate final totals:

  1. Verify saletotal recalculated with discount

  2. Note the calculated amountdue value

  3. Take payment via payment provider

  4. Process payment:

  1. Verify payment matches discounted total

  2. Verify order closed successfully

Expected Result:

  • App-initiated discount applies correctly

  • Payment processes for discounted amount

  • Discount tracked as app-initiated

Pass/Fail Criteria: App can apply discount, payment processes for correct amount


Test Case PSPT_TC10: App Calculated Discount and Payment (Optional)

Objective: Verify app can calculate and apply percentage-based discount

Prerequisites:

  • Valid authentication token

  • Open order on Table 10 with saletotal = 50.00

  • App has discount calculation capability

Steps:

  1. Call GetTransactionList for Table 10 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has saletotal = 50.00

  6. App calculates 15% discount (7.50)

  7. App applies discount:

  1. Call UpdateOrder to calculate final totals:

  1. Verify saletotal = 42.50

  2. Note the calculated amountdue value

  3. Take payment via payment provider

  4. Process payment for discounted amount:

  1. Verify order closes successfully

Expected Result:

  • Calculated discount applies correctly

  • Payment matches calculated total

  • Order completes successfully

Pass/Fail Criteria: Percentage discount calculated and applied correctly


Test Case PSPT_TC11: Standard Payment with Donation (Optional)

Objective: Verify optional donation can be added to payment

Prerequisites:

  • Valid authentication token

  • Open order on Table 11

  • Donation functionality enabled

Steps:

  1. Call GetTransactionList for Table 11 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has items

  6. Add donation to order:

  1. Call UpdateOrder to calculate final totals:

  1. Verify saletotal increased by donation amount

  2. Note the calculated amountdue value

  3. Take payment via payment provider

  4. Process payment including donation:

  1. Verify donation tracked separately in reporting

Expected Result:

  • Donation added to total

  • Payment includes donation

  • Donation identifiable in order data

Pass/Fail Criteria: Donation added correctly, payment includes full amount


Test Case PSPT_TC12: Standard Payment with Tips (Optional)

Objective: Verify gratuity can be added via app

Prerequisites:

  • Valid authentication token

  • Open order on Table 12 with amountdue = 50.00

Steps:

  1. Call GetTransactionList for Table 12 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has amountdue = 50.00

  6. Add tip via app:

  1. Call UpdateOrder to calculate final totals:

  1. Verify saletotal = 60.00

  2. Note the calculated amountdue value

  3. Take payment via payment provider

  4. Process payment including tip:

  1. Verify tip tracked for staff allocation

Expected Result:

  • Tip added to total

  • Payment includes tip amount

  • Tip identifiable for distribution

Pass/Fail Criteria: Tip added correctly, payment processes full amount including gratuity


Test Case PSPT_TC13: Invalid Payment Method

Objective: Verify system rejects invalid payment method

Prerequisites:

  • Valid authentication token

  • Open order on Table 13 with amountdue = 25.50

Steps:

  1. Call GetTransactionList for Table 13 to retrieve available bills

  2. Verify response contains bill(s) with amounts

  3. Select the bill to process

  4. Call GetTransaction to retrieve full order details

  5. Verify order has amountdue = 25.50

  6. Call UpdateOrder to calculate final totals:

  1. Note the calculated amountdue value

  2. Attempt payment with invalid payment type:

  1. Verify response has error: true

  2. Verify error message indicates invalid payment method

  3. Verify order remains open

  4. Verify no payment recorded

Expected Result:

  • error: true

  • errorMessage: "Invalid payment method"

  • Order still open

  • No payment applied

Pass/Fail Criteria: System rejects invalid payment method, order remains unchanged


Last updated

Was this helpful?