Checking User Status - DEP

Learn how to get the most up-to-date user status after user creation.

HIFI creates new users asynchronously, which means you should either regularly poll or register a Webhook with HIFI to get the most up-to-date user information. For a robust integration, HIFI recommends doing both.

1. Polling

The get-user endpoint allows you to get the most up-to-date user status. To implement polling to regularly check the user status, you can either use a cron job or a background thread/process that regularly calls the get-user endpoint.

Request

curl --request GET \
     --url 'https://production.hifibridge.com/user?userId=75d7c01f-5f93-4490-8b93-a62fd8020358' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer zpka_123456789'

Response

{
  "wallet": {
    "walletStatus": "ACTIVE",
    "walletMessage": "",
    "actionNeeded": {
      "actions": [],
      "fieldsToResubmit": []
    },
    "walletAddress": {
      "POLYGON_MAINNET": {
        "address": "0xBe64088c19d2F06890ec6bbE03A6125D7A23dec5"
      },
      "ETHEREUM_MAINNET": {
        "address": "0xBe64088c19d2F06890ec6bbE03A6125D7A23dec5"
      },
      "OPTIMISM_MAINNET": {
        "address": "0xBe64088c19d2F06890ec6bbE03A6125D7A23dec5"
      }
    }
  },
  "user_kyc": {
    "status": "ACTIVE",
    "actionNeeded": {
      "actions": [],
      "fieldsToResubmit": []
    }
  },
  "ramps": {
    "usdAch": {
      "onRamp": {
        "status": "ACTIVE",
        "actionNeeded": {
          "actions": [],
          "fieldsToResubmit": []
        },
        "message": "",
        "achPull": {
          "achPullStatus": "ACTIVE",
          "actionNeeded": {
            "actions": [],
            "fieldsToResubmit": []
          }
        }
      },
      "offRamp": {
        "status": "ACTIVE",
        "actionNeeded": {
          "actions": [],
          "fieldsToResubmit": []
        }
      }
    },
    "euroSepa": {
      "onRamp": {
        "status": "INACTIVE",
        "actionNeeded": {
          "actions": [],
          "fieldsToResubmit": []
        },
        "message": "SEPA onRamp will be available in near future"
      },
      "offRamp": {
        "status": "ACTIVE",
        "actionNeeded": {
          "actions": [],
          "fieldsToResubmit": []
        },
        "message": ""
      }
    }
  },
  "user": {
    "id": "75d7c01f-5f93-4490-8b93-a62fd8020358"
  }
}

2. Webhook

The webhook endpoint allows you to register and set up a webhook to receive real-time updates on a user's status. To learn more about webhooks, refer to this.

TO REGISTER A WEBHOOK.

Example webhook user event

{
  "eventId": "89c88a4e-803d-4eed-94aa-a66bd9441ebc",
  "eventType": "USER.STATUS",
  "eventAction": "UPDATE",
  "timestamp": "2024-06-29T20:03:58.735033+00:00",
  "data": {
    "user": {
      "id": "c67980b8-81c7-4d9a-a399-69a6e4aba828"
    },
    "ramps": {
      "usdAch": {
        "onRamp": {
          "status": "ACTIVE",
          "achPull": {
            "actionNeeded": {
              "actions": [],
              "fieldsToResubmit": []
            },
            "achPullStatus": "ACTIVE"
          },
          "message": "",
          "actionNeeded": {
            "actions": [],
            "fieldsToResubmit": []
          }
        },
        "offRamp": {
          "status": "ACTIVE",
          "actionNeeded": {
            "actions": [],
            "fieldsToResubmit": []
          }
        }
      },
      "euroSepa": {
        "onRamp": {
          "status": "INACTIVE",
          "message": "SEPA onRamp will be available in near future",
          "actionNeeded": {
            "actions": [],
            "fieldsToResubmit": []
          }
        },
        "offRamp": {
          "status": "INACTIVE",
          "message": "",
          "actionNeeded": {
            "actions": [
              "update"
            ],
            "fieldsToResubmit": [
              "proofOfResidency"
            ]
          }
        }
      }
    },
    "wallet": {
      "actionNeeded": {
        "actions": [],
        "fieldsToResubmit": []
      },
      "walletStatus": "ACTIVE",
      "walletAddress": {
        "POLYGON_MAINNET": {
          "address": "0xC537be24906297a8EbFFc82B350724992B095f3A"
        },
        "ETHEREUM_MAINNET": {
          "address": "0xC537be24906297a8EbFFc82B350724992B095f3A"
        },
        "OPTIMISM_MAINNET": {
          "address": "0xC537be24906297a8EbFFc82B350724992B095f3A"
        }
      },
      "walletMessage": ""
    },
    "user_kyc": {
      "status": "ACTIVE",
      "actionNeeded": {
        "actions": [],
        "fieldsToResubmit": []
      }
    }
  }
}

3. Ready for the next step?

After creating a new user and getting the most up-to-date user info, you need to activate fiat to stablecoin conversion for the user prior to adding accounts and doing transfers. Learn more about how to activate fiat to stablecoin conversion for the user.