---
updatedAt: 2026-11-02T15:13:49.000Z
agentTools:
  projectIndex: https://developer.spreedly.com/llms.txt
---

# iFrame testing

API docs for version 1 of the Spreedly iFrame Javascript API

<Callout icon="🚧" theme="warn">
  Legacy iFrame (version 1.140 and older) and non-secure tokenization was deprecated on October 31, 2026; end of life will be December 31, 2028. See the [iFrame payment form](https://developer.spreedly.com/docs/iframe-payment-form) guide for what's changing and how to stay supported.
</Callout>

Many development teams utilize automated testing to test their browser-based workflows. The following functions should aid in that endeavor.

## setValue

Set the value the iFrame fields to a known test value. Any values that are not on the allowed list will be silently rejected.

```javascript
Spreedly.on("ready", function() {
  Spreedly.setValue("number", "4111111111111111");
  Spreedly.setValue("cvv", "123");
});
```

### Signature

`setValue(field, value)`

### Arguments

| Name    | Description                                                                                                                                                  |
| :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `field` | The iFrame field to set the value. Can be one of `number` or `cvv`.                                                                                          |
| `value` | The value to set the field to. The number field will only accept [test card numbers](https://developer.spreedly.com/docs/test-data). The `cvv` field will only accept `12`, `123`, or `1234` |

## Scheduled releases

Spreedly offers staggered, scheduled iFrame release channels for users that wish to test changes before accepting them. This can be declared in the script tag before initializing iFrame.

```html
<head>
    <script> src="https://core.spreedly.com/iframe/iframe-[desired channel].min.js" </script>
</head>
```

The recommended release channels are:

* `v1` is the most current version and is continuously updated with no set release schedule.
* `candidate` is updated on the 1st Tuesday of every month to match`iframe-v1`
* `stable` is updated on the 3rd Tuesday of every month to match the latest version of `iframe-candidate`

iFrame Changelog RSS feed is available here: <https://core.spreedly.com/iframe/feed.xml>.

If you encounter issues while using these release channels, please contact support for assistance.