Skip to main content

User Creation & Detail API

The User Creation & Detail APIs allow you to create a new user for the widget system and fetch detailed information about an existing user using their user_id.

User Creation API

This API is designed to help new users get started instantly — without requiring full KYC (Know Your Customer) upfront.

Once a user is created using this API:

  • They can browse and purchase digital goods within platform-defined limits.
  • No need to upload ID or complete identity verification right away.
  • This allows for a fast, frictionless onboarding experience.

The system applies low-KYC limits by default, ensuring compliance while reducing barriers for new users. Full KYC can be completed later, only if required based on user activity or purchase thresholds.

Ideal for platforms that want users to explore and purchase with minimal friction.

Endpoint

URL: For production: https://api.1buy.io/api/user/create_widget_user


HTTP Method

POST


Headers

HeaderDescription
api-keyYour API key for authentication.
Content-TypeMust be set to application/json.

Request Body

The following parameters are required to create a new widget user:

ParameterTypeDescriptionRequired
api_keystringYour API key.Yes
phonestringUser's phone number.Yes
first_namestringUser’s first name.Yes
last_namestringUser’s last name.Yes
date_of_birthstringDate of birth (ISO format: YYYY-MM-DD).Yes
country_of_residencestringalpha-3 country code; Must be on our list in the countries tableYes
emailstringUser’s email address.Yes
state_of_residencestringalpha-2 US state code; Must be on our list in the states tableYes

Example Request Body

{
"api_key": "YOUR_API_KEY",
"phone": "+11234567890",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"country_of_residence": "USA",
"email": "john.doe@example.com",
"state_of_residence": "CA"
}

Example CURL Command

curl --location "https://api.1buy.io/api/user/create_widget_user" \
--header "Content-Type: application/json" \
--data '{
"api_key": "YOUR_API_KEY",
"phone": "+11234567890",
"first_name": "John",
"last_name": "Doe",
"date_of_birth": "1990-01-01",
"country_of_residence": "USA",
"email": "john.doe@example.com",
"state_of_residence": "CA"
}'

Example Successful Response

{
"error": false,
"message": "User created successfully",
"data": {
"id": "some_internal_id",
"user_id": "01HXWQ5X0XHGMJNS53WCYK9ZZ8"
}
}

Fetch User Details API

Endpoint

URL: For production: https://api.1buy.io/api/user/fetch_user_details


HTTP Method

POST


Headers

HeaderDescription
Content-TypeMust be set to application/json.

Request Body

ParameterTypeDescriptionRequired
api_keystringYour API key.Yes
user_id or emailstringThe ID or email of the user.Yes

Example Request Body

{
"api_key": "YOUR_API_KEY",
"user_id": "01******8" // You will get it from webhook response as external_user_id
}

Example Successful Response

{
"data": {
"error": false,
"message": "User fetched successfully",
"data": {
"country": "CAN",
"created_at": "2024-05-14T23:32:16.883224Z",
"fkyc_status": "not initiated",
"limits": {
"crypto_remaining": "975.82",
"crypto_spending": "24.18",
"digital_goods_remaining": "4972.51",
"digital_goods_spending": "27.49"
},
"linked_payment_methods": [
{
"method": "bank_card",
"cards": [
{
"brand": "VISA",
"card_id": "01****BK",
"created_at": "2024-05-14T23:33:32.53592Z",
"last_digits": "9325"
},
{
"brand": "VISA",
"card_id": "01J****B0K",
"created_at": "2024-09-05T17:09:47.268938Z",
"last_digits": "9656"
}
]
}
],
"lkyc_status": "success",
"phone": "+1*****654",
"phone_country": "CA",
"user_id": "01H****98"
}
}
}

Notes

  • fkyc_status and lkyc_status represent KYC statuses: Full and Light KYC respectively.
  • limits reflect user’s remaining and spent limits on crypto and digital goods.
  • Users created through this API are placed in a low-KYC state by default and can begin transacting without delay.