Virtual Credit Cards

Learn how to test real payments in production using Rainforest virtual credit cards.

Rainforest lets you perform on-demand testing of payment functionality in production. Our virtual credit cards (VCC) represent real credits and generate monetary transactions. Use them anyplace where major credit cards are accepted.

You can test payments with virtual credit cards without using dummy credit card number generators, gift cards, or corporate credit cards. Credit card generators don’t work in production. Gift cards, including reloadable cards by Visa, can be costly and don’t represent actual credit cards. Usually, they can be detected as gift cards by the payment processor. And some companies block them from being used.

How VCC Works

Virtual credit cards are single use and have a maximum transaction limit, typically between $1.00 and $50.00. You can toggle the amount under Settings > Test Data.


Setting your maximum transaction limit.

Incorporate virtual credit cards into your tests using the corresponding built-in test data. The following fields are available:

  • card_number
  • expiry
  • cvc
  • zip
  • address

Rainforest provides all values to each tester when the test executes. The zip code is 94111, and the card type is Mastercard.


A test using virtual credit card numbers.


Virtual credit card test data.

Virtual Credit Card Expiry Date Options

By default, the {{virtual_card.expiry}} placeholder returns the date in the format YYYY-MM. You can pass an argument to the placeholder to change the date format using the Ruby programming language date format implementation.

Using May 2022 as an example, here are some ways you can make the test data output match your platform:

  • {{virtual_card.expiry}} => 2022-05
  • {{virtual_card.expiry(%m-%y)}} => 05-22
  • {{virtual_card.expiry(%Y/%-m)}} => 2022/5


After the test completes, Rainforest immediately destroys the virtual credit card. Each card is single use. There is no way to reuse it, even if the last tested transaction amount was below the limit.

Note: For security reasons, virtual credit card numbers do not appear in Preview mode.


A test preview with placeholders for virtual credit card information.

Deposits and Refunds

Rainforest holds a fully refundable deposit to serve as collateral for the virtual credit card. Rainforest only issues virtual credit cards when the sum of the total virtual credit card limit outstanding does not exceed the deposit amount, including refunded transactions.

We track all transactions charged by the merchant IDs associated with your account. As you receive payments from Rainforest via this feature, you should issue refunds as soon as possible. Any unreimbursed transactions count against your balance. Refunds generally take 2–3 days to appear in your account.

Amount to Deposit

Rainforest recommends a fully refundable deposit of $5,000 to ensure there’s ample room for testing and scaling.

Use the following formula to calculate how much of a deposit is required. Assume the client issues refunds within 24 hours.

(Max Card Amount x No. of Tests Run with VCC in 3 days x No. of Platforms) x 2


Virtual Credit Card Limit Example

A customer with a card limit of $50 runs a daily smoke of 2 VCC tests on 2 browsers. Assume all transactions are refunded immediately.

($50 x 2 tests x 3 days x 2 platforms) x 2 = $1200

Enabling VCC for My Account

If you want to learn more about virtual credit cards or are interested in enabling the feature for your account, we’re here to help. Contact our Support team.

If you have any questions, reach out to us at [email protected].

Related Articles & Links