> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gr4vy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS events

The following events can be raised by the iOS SDK.

`transactionCreated`

Returns data about the transaction object when the transaction was
successfully created.

```json theme={"system"}
{
  "transactionID": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
  "status": "pending",
  "paymentMethodID": "17d57b9a-408d-49b8-9a97-9db382593003"
}
```

`transactionFailed`

Returned when the transaction encounters an error.

```json theme={"system"}
{
  "transactionID": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
  "status": "pending",
  "paymentMethodID": "17d57b9a-408d-49b8-9a97-9db382593003"
}
```

When a network error occurs, the payload includes a `responseCode`.

```json theme={"system"}
{
  "transactionID": "",
  "status": "",
  "paymentMethodID": null,
  "responseCode": "ETIMEDOUT",
}
```

Here's a list of potential values for `responseCode`:

| Code | Definition |
| - | - |
| `ERR_BAD_OPTION_VALUE` | Invalid or unsupported value provided in axios configuration. |
| `ERR_BAD_OPTION` | Invalid option provided in axios configuration. |
| `ECONNABORTED` | Request timed out due to exceeding timeout specified in axios configuration. |
| `ETIMEDOUT` | Request timed out due to exceeding default axios time limit. |
| `ERR_NETWORK` | Network-related issue. |
| `ERR_FR_TOO_MANY_REDIRECTS` | Request is redirected too many times; exceeds max redirects specified in axios configuration. |
| `ERR_DEPRECATED` | Deprecated feature or method used in axios. |
| `ERR_BAD_RESPONSE` | Response cannot be parsed properly or is in an unexpected format. |
| `ERR_BAD_REQUEST` | Requested has unexpected format or missing required parameters. |
| `ERR_CANCELED` | Feature or method is canceled explicitly by the user. |
| `ERR_NOT_SUPPORT` | Feature or method not supported in the current axios environment. |
| `ERR_INVALID_URL` | Invalid URL provided for axios request. |

`cancelled`

Returned when the user closes the payment sheet without creating a transaction.

`generalError`

Returned when the SDK encounters an error.

```json theme={"system"}
{
  "Gr4vy Error: Failed to load"
}
```

`cardDetailsChanged`

Returned when the card BIN changes in the form. It contains information on the inputted card, such as the BIN, card type and scheme.

```json theme={"system"}
{
  "bin": "42424242",
  "scheme": "visa",
  "cardType": "debit"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.