Skip to content
Last updated

Callback for Hosted Pages

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

Example callback for Payments v1

{
    "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

{
    "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