Testing Your Integration

Basqet provides a Test (Sandbox) environment that allows you to fully validate your integration before going live.

Because Test wallets do not accept real blockchain transfers, Basqet provides built-in tools that let you simulate payment outcomes directly from the payment page. This allows you to test your application logic, webhooks, and transaction handling without sending real crypto.

How Testing Works in Basqet

In Test mode, when you initiate a pay-in transaction, Basqet generates a payment page with:

  • A test wallet address
  • A QR code
  • A transaction expiry timer

Since no real funds can be sent to this address, you complete the test by manually marking the transaction outcome using the available buttons or by using the transaction update test API.

This simulates how Basqet would behave if a real blockchain transaction occurred.

Simulating Payment Outcomes

In Test mode, you can simulate how a real customer payment would resolve through any of the following means:

Testing Payment Outcomes via Payment Link

In Test mode, payment outcomes can be simulated using a payment link.

Steps

  1. Create a payment link from your Basqet dashboard or via the API.
  2. Open the generated payment link.
  3. Enter the required payment details.
  4. Select the currency you want to pay with.
  5. On the test payment page, choose the button that corresponds to the outcome you want to simulate.

The button you select determines the transaction status that will be returned by the system. Refer to the table below for the available payment outcomes and the corresponding actions to simulate them.

Payment OutcomeWhat It RepresentsWhat You Should TestHow to Simulate
Successful PaymentCustomer completes payment in fullWebhook delivery, transaction verification, balance updates, order fulfillmentClick Mark as Paid
OverpaymentCustomer pays more than the required amountOverpayment handling, reconciliation logic, credit/refund behaviorClick Mark as Overpaid
UnderpaymentCustomer pays less than required amountPartial payment handling, retry/top-up flows, webhook behaviorClick Mark as Underpaid
Abandoned PaymentCustomer starts but does not complete paymentPayment expiry, order cancellation, webhook processing for abandoned paymentsClick Mark as Abandoned

What Happens When You Click a Button

When you mark a transaction:

  • The transaction status is updated immediately
  • A webhook event is triggered (if configured)
  • Your application receives the same signals it would in Live mode

This means your webhook handlers, transaction verification logic, order processing logic etc. can all be tested end-to-end without real payments.

Testing Payment Outcomes Via API

You can simulate payment outcomes programmatically using the Update a Test Transaction Status API. This is useful for testing how your system responds to different transaction scenarios without making real payments.

Endpoint Details

POST https://api.basqet.com/v1/{transaction\_id}/trigger

Action: Update Test transaction status
Method: Post
Path: /v1/transaction_id}/trigger

Headers

Authorization: Bearer bq\_sk\_{domain}\_s3cr3tk3y  
Accept: application/json  
Content-Type: application/json

Request Body

{  
 "status": "successful"  
}

The transaction_id is obtained after you initialize a transaction in test mode.

Simulated Payment Outcomes via API

Payment OutcomeWhat It RepresentsWhat You Should TestHow to Simulate via API
Successful PaymentCustomer completes payment in fullWebhook delivery, transaction verification, balance updates, order fulfillment{"status": "successful"}
OverpaymentCustomer pays more than the required amountOverpayment handling, reconciliation logic, credit/refund behavior{"status": "overpaid"}
UnderpaymentCustomer pays less than required amountPartial payment handling, retry/top-up flows, webhook behavior{"status": "underpaid"}
Abandoned PaymentCustomer starts but does not complete paymentPayment expiry, order cancellation, webhook processing for abandoned payments{"status": "abandoned"}

Example cURL Request

curl \--request POST \\  
 \--url <https://api.basqet.com/v1/{transaction\_id}/trigger> \\  
 \--header 'Authorization: Bearer bq\_sk\_{domain}\_s3cr3tk3y' \\  
 \--header 'accept: application/json' \\  
 \--header 'content-type: application/json' \\  
 \--data '{  
   "status": "overpaid"  
 }'

What You Should Test

Before going live, you should test:

  • Successful payment flow
  • Failed or abandoned payments
  • Overpayment and underpayment scenarios
  • Webhook delivery and signature verification
  • Transaction verification using the API
  • UI behavior for each transaction state

Overall, your integration should correctly handle transactions in the following states:

  • initiated
  • pending
  • successful
  • overpaid
  • underpaid
  • abandoned

Important Notes

  • The test buttons are only available in Test mode, as they do not exist in Live mode
  • These test transactions do not move real funds and as such cannot be used for real payments
  • Real wallet addresses only exist in Live mode

Recommended Testing Flow

  1. Initiate a test pay-in transaction
  2. Use the ‘update test transaction status API’ to send a simulated outcome (Successful, Overpaid, Underpaid, or Abandoned)
  3. Listen for the webhook event
  4. Verify the transaction using the API
  5. Confirm your system reacts correctly

Repeat this for all scenarios before switching to Live.