Introduction
Welcome to the EveryPay's Marketplace Integration Test Guide. This document provides a set of test scenarios and payment flows designed to help external developers implement and test their marketplace integration with EveryPay. Following these scenarios ensures a smooth integration process, covering both basic and advanced payment flows, split payments, and edge cases.
Getting Started
Before diving into specific test scenarios, make sure your API keys are set up and your marketplace account has the desired configurations. You will need:
- EveryPay API Credentials: Ensure you have valid API keys (sandbox).
- Marketplace Setup: Your marketplace should be registered and configured in the Sandbox environment. You can contact EveryPay's customer support team to help you with that.
- You will need a testing card to interact with our Test Environment. You may use one or more from the Testing section. There are different types to choose from depending on the case you wish to test.
Authentication and API Keys
All API requests should be authenticated using the provided API key. Ensure that:
- Successful Authentication: Test with valid keys.
- Error Handling: Handle cases where invalid.
Test Scenarios
The following scenarios cover various payment flows, ensuring all marketplace interactions—such as payment splitting, commissions, refunds, transfers and payouts—are handled correctly. These tests help validate the correct implementation of pricing and money flows between buyers, sellers, and the marketplace.
1. Payment
Scenario 1.1: Single Seller Payment (Success)
Description: Buyer purchases an item for €100 from a single seller. Create a payment with split = 1
and Capture the payment using our provided test cards.
Expected Outcome: Retrieve the payment and verify that the payment object has status=Captured
and ensure Marketplace's Current Account Balance should be credited with the payment amount.
Tip! Execute multiple Successful transactions, to use for later scenarios.
Scenario 1.2: Single Seller Payment (Fail)
Description: Buyer purchases an item for €100 from a single seller. Create a payment with split = 1
and Fail the payment using our provided test cards.
Expected Outcome: Retrieve the payment and verify that the payment object has status=Failed
. Check that Marketplaces' Current Account Balance has not been changed.
2. Refund on Payment
Scenario 2.1: Full Refund
Description: A buyer purchases an item for €100 but requests a full refund. Create a Refund with amount equal to Original Payment amount.
Expected Outcome: Marketplace's Current Account should be debited with the Refund Amount.
Scenario 2.2: Partial Refund
Description: A buyer purchases an item for €150 but later requests a partial refund of €50. The marketplace processes this partial refund, reducing the seller's balance and refunding the buyer.
Expected Outcome: Marketplace's Current Account should be debited with the Refund Amount.
Scenario 2.3: Failed Refund
Description: Using the payment from Scenario 2.2, attempt to execute a partial refund where the refund amount is greater than the remaining balance of the original payment (e.g., the original payment was €200, and a €150 refund has already been issued, leaving only €50 available. The marketplace now attempts to refund €100).
Expected Outcome: The refund should fail, and the system should return an appropriate error message indicating that the refund amount exceeds the remaining available balance for the payment. No changes should be made to the seller's balance or the payment history.
Key Test Points:
- Confirm that no partial refund is issued if the requested refund exceeds the available amount.
- Check that the original payment status and seller balance remain unchanged after the Failed refund attempt.
3. Transfer
Direct Transfer vs Payment Transfer
Before diving into the test cases, let's clarify the key differences between direct transfers and payment transfers:
- Direct Transfer:
- A fund movement between accounts within the marketplace (e.g., from marketplace to seller, seller to marketplace) without a customer's involvement.
- Typically used for moving funds already held by the marketplace for services, commission refunds, or adjustments.
- Payment Transfer:
- A transfer that follows a customer payment transaction. The funds are split or transferred to sellers (or beneficiaries) after a customer purchases goods/services.
- Marketplace may deduct fees or commissions from the total payment before sending the remaining amount to the seller(s).
Transfers Scenarios
Transfers are included on GET Payment
Scenario 3.1: Direct Transfer Between Marketplace and Seller
Description: The marketplace manually transfers €100 to a seller's balance as an adjustment (e.g., refund of excess commission).
Type: Direct Transfer
Expected Outcome: The seller's available balance is credited with €100 and Marketplaces Available balance is debited with the amount.
Key Test Points: Verify that the correct amount is transferred without involving a customer payment.
Scenario 3.2: Payment Transfer from Marketplace to Seller
Description: A customer pays €300 (payment) for goods, and the marketplace processes a payment transfer to the seller after deducting a 10% commission.
Type: Payment Transfer
Expected Outcome: Ensure correct deduction of commission from the payment amount, and verify that the remaining balance is transferred to the seller(s).
Key Test Points:
- Verify that the marketplace available balance is correctly debited by €270.
- Ensure that the seller's balance account receives €270 (€300 - €30 commission).
Scenario 3.3: Payment Transfer to Multiple Sellers
Description: A customer purchases from two sellers in one transaction, splitting €400 (€250 for Seller A, €150 for Seller B). The marketplace processes payment transfers to both sellers.
Type: Payment Transfer
Expected Outcome: Seller A should receive €225 (€250 - €25 commission). Seller B should receive €135 (€150 - €15 commission). The marketplace's balance should reflect a total debit of €360 (€225 for Seller A and €135 for Seller B), and the marketplace retains €40 in commission (€25 from Seller A and €15 from Seller B).
Key Test Points:
- Validate that the total payment of €400 is properly split between the two sellers.
- Confirm that the 10% commission is accurately deducted for both Seller A (€25) and Seller B (€15).
- Ensure that the marketplace's account is debited the total transfer amount of €360 (€225 + €135), and the €40 commission is retained by the marketplace.
Scenario 3.4: Transfer with Additional Amount
You'll need to contact customer support to enable you this Feature
Description: A customer purchases goods worth €120, but they only pay €100 due to a special discount or promotion. The marketplace's loyalty program contributes an additional €20 to cover the full payment to the seller. The marketplace processes a transfer of €120 to the seller, where €100 comes from the customer's payment and €20 from the marketplace's account (as the loyalty reward). A 10% commission is deducted from the total amount, and the marketplace keeps the commission.
Expected Outcome:
- The seller should receive €108 after the 10% commission is deducted from the total €120.
- The marketplace's account should be debited €20 for the loyalty contribution, and it retains €12 as commission (10% of €120).
Key Test Points:
- Validate that the total transfer amount is €120 (including the additional €20 from the marketplace).
- Ensure the 10% commission is correctly deducted from the full €120, resulting in the seller receiving €108.
- Confirm that the marketplace's balance is debited €20 for the additional loyalty amount.
- Verify that the marketplace retains the €12 commission.
- Ensure notifications are sent to both the marketplace and seller, with a clear breakdown of the payment (€100), additional amount (€20), commission (€12), and the final €108 transferred to the seller.
4. Reversal
Scenario 4.1: Full Reversal of a Payment Transfer
Description: The marketplace initiates a full reversal of the payment transfer to the seller.
Expected Outcome: The full amount is returned to the marketplace, and the seller's account is debited accordingly.
Key Test Points: Ensure that the reversal includes both the seller's portion and any marketplace commissions that were initially deducted.
Scenario 4.2: Full Reversal of a Payment Transfer (Different Refund commission)
Description: The marketplace initiates a full reversal of the payment transfer to the seller. With different refund commission.
Expected Outcome: The full amount is returned to the marketplace, and the seller's account is debited accordingly.
Key Test Points: Ensure that the reversal includes both the seller's portion and any marketplace commissions that were initially deducted.
Scenario 4.3: Partial Reversal of a Payment Transfer
Description: A customer partially refunds €50 out of a €200 purchase, and the marketplace reverses the respective amount from the seller.
Expected Outcome: €50 is debited from the seller, and the marketplace account is credited with the reversed amount.
Key Test Points: Validate that the reversal amount does not exceed the initial transfer and that commissions are correctly adjusted for the partial refund.
Scenario 4.4: Multiple Reversals on the Same Payment Transfer
Description: Multiple reversals are applied to the same payment transfer (e.g., a partial refund followed by a full refund).
Expected Outcome: The system allows reversals up to the total transferred amount but prevents reversals exceeding the original payment.
Key Test Points: Ensure proper handling of multiple reversals, avoiding any over-refunds or incorrect account balances.
Scenario 4.5: Reversal Due to Insufficient Seller Funds
Description: A reversal is attempted, but the seller's account has insufficient funds to cover the full reversal.
Expected Outcome: The reversal fails.
Key Test Points: Ensure proper error handling when the seller's account cannot cover the reversal amount, and that no partial reversals occur unless configured to allow them.
Scenario 4.6: Direct Transfer Reversal
Description: The marketplace mistakenly made a direct transfer to a seller and now needs to reverse it.
Expected Outcome: The full amount is debited from the seller's account and returned to the marketplace.
Key Test Points: Ensure that direct transfers can be fully reversed without customer involvement and that both accounts are updated correctly.
5. Payout
Step 1: Ensure Payments and Transfers Exist
In order to test the payout mechanism, developers need to ensure that the merchant account has completed successful payments and transfers. This is essential because payouts are based on the available balance generated by these transactions.
- Make a payment: Execute a transaction where a customer makes a purchase through the marketplace.
- Transfer funds to the seller: Once the payment is successful, transfer the relevant amount to the seller to generate a balance available for payout.
Step 2: Wait for the Default Daily Payout Schedule
Payouts are processed once per day, so after testing payments and transfers, developers should wait for the next business day to verify that the payout has been successfully processed.
- Check the payout: On the following day, the merchant should check their bank account and/or use the API to check payout records. This will confirm that the previous day's funds have been automatically disbursed to their account.