Refund Test Card: How to Test Refunds in a Sandbox

Our Cards

Choose from any of our gift cards to give to your loved ones

Test Card for Refund

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

Top Card Test Refund Process Guide

Where to Buy?

You can purchase a gift card from any of these locations

test card refund

ABOUT US

about

What is ONYX GiftCards?

Onyx Gift Cards is a Grenadian company designed to introduce, market and manage gift cards systems in Grenada for retailers and corporations. We are enthusiastic about the effect and influence we will have on the local market. We intend to expand our systems regionally with a range of product offerings and services.

What is a Gift Card?

Gift cards are the preferred way of giving and receiving gifts. They carry a monetary value that can be redeemed for gifts at your favorite store.
Onyx GiftCards are “Open Gift Cards” which means that they can be redeemed at multiple merchant locations. They are standard credit card size, can fit into the average wallet and made of PVC plastic. Onyx GiftCards are Barcoded for security and safety for the consumer and bear a disclaimer at the back.
Onyx Giftcards can be bought with a branded Card backer which is black in colour and is designed to fit the card. There is an area to write a brief message to the recipient as well.

How it Works?

  • Buy an Onyx Gift Card at these local stores
  • Give your gift card to friends, family, co-workers, etc.
  • The recipient can shop at our select merchants nationwide
  • Your friends, family, co-workers, etc. will present their gift card at checkout to pay for your item(s)
  • They will walk away happy with the best gift ever...the gift of Choice

Why ONYX GiftCards?

  • Save TIME. No need to run around looking for the perfect gift
  • Redeem from a variety of business island-wide. We will continue adding businesses as fast as ONYX grows.
  • ONYX Gift Cards do not expire
  • Cards are valued at convinient amounts to meet every need and occasion

A refund test card is a card number that a payment processor publishes for sandbox use. You charge it in test mode, send a refund request, and the processor returns a simulated result. It lets you check refund code, webhooks, and ledger entries before real money moves.

What makes a card a refund test card?

Most processors publish one set of test card numbers rather than a separate refund card. Each number maps to a behavior such as success, decline, or a specific error code. A refund test is a sequence: create a charge with a test number, then refund that charge in the same test environment.

Why use a test card instead of a real card for refunds?

A real card refund moves real money. It can create fees, statement entries, and support tickets if your code sends a duplicate request. A test card keeps the same API shape with no money at risk.

Test mode also gives you repeatable results. You can refund the same test charge across builds, compare webhook payloads, and check that your database stays in sync. Real refunds settle once, so you cannot replay them.

How do you run a refund test with a test card?

  1. Switch your environment to test mode. Use test keys, test endpoints, and a test database.
  2. Create a payment with a test card number from your processor docs. Use a number that returns a successful charge unless you are testing a decline.
  3. Capture the payment if your flow uses separate authorization and capture. Refund rules differ for uncaptured authorizations.
  4. Send a refund request for the full amount or a partial amount. Record the refund ID and status.
  5. Check the API response, the charge object, and the refund object. Confirm that amounts, currencies, and statuses match your expected values.
  6. Read the webhook events. Confirm order, idempotency keys, and retry handling.
  7. Repeat with edge cases: a second partial refund, a refund that exceeds the remaining balance, and a refund on a charge that already has a declined refund.

Which refund scenarios should you cover?

Full and partial refunds

Test a full refund and at least two partial refunds on one charge. The sum of partial refunds must not exceed the captured amount. Your code should block or flag any request above the remaining balance before it reaches the processor.

Multiple refunds and idempotency

Send the same refund request twice with the same idempotency key. The processor should return the first result, not create a second refund. Then send the same request with a new key and confirm that your code handles the duplicate or rejects it.

Void versus refund

An uncaptured authorization can be voided, and a captured payment can be refunded. These are different operations with different webhook events. Test both paths if your checkout authorizes and captures at separate steps.

Failed and rejected refunds

Some test cards trigger a decline on the charge, not on the refund. To test a refund failure, use the error simulation tools in your processor test environment or point your client at a mock server. Check that your code shows a clear message and leaves the charge state unchanged.

Webhooks, retries, and ledger entries

Refund webhooks can arrive out of order or more than once. Store each event ID and ignore repeats. Confirm that your ledger records the refund once, with the correct fee treatment and currency.

Do test refunds settle at the same speed as real refunds?

No. A sandbox refund often resolves in seconds because no bank is involved. A live card refund often takes 5 to 10 business days to appear on a statement, and the issuer sets the exact timing. Test the customer message for that wait, not only the API response.

What are common mistakes when testing refunds with test cards?

Frequently asked questions

Does a refund test card cost money?

No. Test cards run in a sandbox, and sandbox transactions do not move funds. Your processor may charge for account features, but the test refund itself has no cost.

Can I refund a test charge to a real bank account?

No. A test charge has no real funding source and no real settlement. The refund exists only inside the test environment.

What if my processor has no card that triggers a refund failure?

Use the processor test error codes or a mock server. Many processors let you force a specific decline reason in test mode. If yours does not, stub the refund response in your test suite and keep one integration test for the success path.

Should test card numbers go in source control?

Yes, if they are public sandbox numbers and your test config is separate from production. Keep them in a test fixture or environment file. Never place live card data in source control.

Contact Us

Latest

Read our complete guide: Should You Buy CVV From a Card Shop? The Honest Buyer's Guide