PATCH
/
v0
/
users
/
{userId}
/
update
curl --request PATCH \
  --url https://api.fungies.io/v0/users/{userId}/update \
  --header 'Content-Type: application/json' \
  --header 'x-fngs-public-key: <api-key>' \
  --header 'x-fngs-secret-key: <api-key>' \
  --data '{
  "password": "Password123!",
  "username": "test-user",
  "internalId": "abcd-1234-5678-90ab-cdef-1234-5678-90ab",
  "paymentData": {
    "stripeCustomerId": "cus_QzHuLRwfKfp2WX",
    "paypalCustomerId": "KCE4828GQ37LL"
  },
  "email": "test@example.com",
  "billingDetails": {
    "type": "individual",
    "countryCode": "US",
    "state": "CA",
    "firstName": "John",
    "lastName": "Doe",
    "dialCode": "+1",
    "phoneNumber": "1234567890",
    "address": "123 Main St",
    "addressLine2": "Apt 1",
    "city": "San Francisco",
    "postalCode": "94101"
  }
}'
{
  "status": "<string>",
  "data": {
    "user": {
      "object": "user",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "username": null,
      "email": null,
      "details": null,
      "internalId": null
    }
  }
}

Authorizations

x-fngs-public-key
string
header
required
x-fngs-secret-key
string
header
required

Body

application/json
PATCH /v0/users/:userId/update Request body
email
string
required

Email of the user.

Example:

"test@example.com"

password
string | null

User password used for logging in to the Store application. Password must contain at least one special character, one number and one uppercase letter. Password must be between 8 and 72 characters long.

Required string length: 8 - 72
Example:

"Password123!"

username
string | null

Username of the user.

Minimum length: 1
Example:

"test-user"

internalId
string | null

Internal/custom ID of the user. Used for integration with external systems. If provided, it will be sent in webhook notifications.

Minimum length: 1
Example:

"abcd-1234-5678-90ab-cdef-1234-5678-90ab"

paymentData
object

Payment data of the user. Set automatically during the first payment. Use in case user's customer account in Stripe/Paypal already exists and you want to link it before the first payment.

Example:
{
  "stripeCustomerId": "cus_QzHuLRwfKfp2WX",
  "paypalCustomerId": "KCE4828GQ37LL"
}
billingDetails
object

Billing details of the User used for the Payments and Invoices.

In order to complete the purchase at least 'countryCode' is required. Also those countries requires providing postalCode: US, CA, UA, IN.

Example:
{
  "type": "individual",
  "countryCode": "US",
  "state": "CA",
  "firstName": "John",
  "lastName": "Doe",
  "dialCode": "+1",
  "phoneNumber": "1234567890",
  "address": "123 Main St",
  "addressLine2": "Apt 1",
  "city": "San Francisco",
  "postalCode": "94101"
}

Response

200
application/json
PATCH /v0/users/:userId/update Positive response
status
string
required
Allowed value: "success"
data
object
required