# Callback for Hosted Pages

The callback received when using Hosted Pages v2 will depend on which version of Single Immediate Payments you're using.

### Payments v2

The following is an example callback for Payments v2 with Hosted Pages v2:

**Example callback for Payments v2**


```json
{
    "payment-id": "pm2:24YYrAZ34sTo4A6C47rYandHke2L:2gFUX1NDgoi",
    "state": "CallbackState1725556043"
}
```

The following fields are always returned:

- `payment-id`
- `state`


### Payments v1

The following is an example callback for Payments v1 with Hosted Pages v2:

**Example callback for Payments v1**


```json
{
    "request-id": "rq:3NWypnkxZRvoNH2C3AREsuZAXcmB:5zKtXEAq",
    "signature": {
        "memberId": "m:3rKtsoKaE1QUti3KCWPrcSQYvJj9:5zKtXEAq",
        "keyId": "lgf2Mn0G4kkcXd5m",
        "signature": "cUcOpIecynk3C7NCaNPP55S8mWbHIlium7toCH6NRegyLCiStJ6wy0VU1qWM1Jvm-TJ3P13gjHQw2hYkfnGTAg"
    },
    "token-id": "tt:EBJKuLEFNi7z3NaKCXUzbYSQQkQZPFPVNXvwHaYLAJhw:HK5cCSU5TAV8nJYQ1oVM",
    "transfer-id": "t:F9C2xPa16V7SdgSbzueyhuGxE8yvhvmGZ7wCuQMxEtri:HK5cCSU5TAV8nJYQ1oVM",
    "transfer-status": "PROCESSING"
}
```

The `request-id` is always returned in the callback for Payments v1.

The payment status is transmitted in a field called `transfer-status`.

The `transfer-id` is usually present, unless you're connecting to a 2-step bank and auto-redeem is NOT active.

`token-id` is not always returned. For example, if there is an error and a token isn't created, there will be no `token-id`, as shown below.

**Example callback for Payments v1 with error**


```json
{
    "error": "EXCEPTION_INITIATE_BANK_AUTH",
    "message": "INTERNAL: InitiateBankAuth failed for TokenRequest: rq:7oJUVi8s129JcYdzK1uGo2PTw81:5zKtXEAq due to INVALID_ARGUMENT: Expected username or OTP credential.",
    "request-id": "rq:7oJUVi8s129JcYdzK1uGo2PTw81:5zKtXEAq"
}
```

If you have any feedback about the developer documentation, please contact [devdocs@token.io](mailto:devdocs@token.io)