Skip to main content

Sandbox testing

Test payment outcomes without moving real money. Use the same account, payment requests and webhook integration that your application uses in sandbox. Simulation endpoints are unavailable in production and require your usual collections permissions.

What to testGuideAction
Basic card, bank transfer or crypto successSimulate a paymentsimulate-payment
Full crypto payment through checkoutFull paymentConfirm a quote deposit, then complete it
Detected funds awaiting confirmationPending confirmationSwitch the same deposit from PENDING to CONFIRMED
Several deposits funding one quoteSplit paymentsCreate a deposit ID for each transfer
Quote timeout and partial settlementQuote expiryExpire the quote, then complete received funds
Stop new attempts or expire unpaid checkoutCheckout expirySelect the deadline or final expiry
Deposit still waiting for confirmation at expiryDeposit at expiryExpire checkout, then confirm the pending deposit
Wallet credit and optional payout creationCompletion and payoutsComplete the confirmed deposits for a quote

API reference: simulate a crypto deposit, simulate expiry, and complete a crypto payment.

Start with crypto scenario setup. The deposit simulator uses a real checkout quote, including its selected cryptocurrency, network and exchange rate. It does not submit a blockchain transaction. For wallet connection, token transfer and blockchain confirmation testing, also follow Set up a test crypto wallet.

What each action does

  • Deposit confirmation updates received funds and the payment request's PAID or PART_PAID status. It does not credit the wallet.
  • Quote expiry prevents new simulated deposits for that quote. It does not expire checkout, settle funds or complete a payment.
  • Checkout expiry applies the normal expiry rules to the payment request. A payment that is still being processed can keep the request open.
  • Payment completion simulates settlement where needed: the provider makes the received funds available to Hubpay. Hubpay then credits your sandbox wallet and creates a payout if the payment request meets the payout requirements. Check the payout status separately to confirm its outcome.

These actions do not simulate provider outages, blockchain reorganisations, overpayments/refunds, rejected compliance decisions or final bank payout outcomes. Simulated deposits do not test checks on actual blockchain transactions. Use real testnet transfers for that part of your integration.

Observe outcomes

Read the status in the API response and retrieve the payment request and its payments to check their current status. Webhooks may arrive later, more than once, or in a different order. Make sure processing the same event again does not repeat an action, such as fulfilling an order twice.

This section uses short event names such as payment.received. The full collection event is v1.collection.payment_request.payment.received; request events use names such as v1.collection.payment_request.paid and v1.collection.payment_request.expired. See payment lifecycle and webhooks and testing webhooks.