These identity methods are deprecated. Use the Customer
API instead, which keys on
customerId
instead of a separate identity resource. Build new integrations against the
Customer API, and migrate existing integrations before MoonPay removes these
methods.Result
pattern as the rest of the client:
The identity methods require an authenticated client. Run
client.getConnection() with
skipKyc: true first, and authenticate the customer with
client.setupAuth() when the status
is "connectionRequired".client.createIdentity()
createIdentity() is deprecated. Customers are created automatically now, so
call getCustomer directly
instead.Create an identity
createIdentity() parameters
createIdentity() result
Returns a Result<{ data: Identity | null }, DevPlatformApiError>.
data is null (HTTP 204) when the customer has no outstanding requirements —
they are already onboarded.
client.getIdentity()
getIdentity() is deprecated. Use
getCustomer instead.Get an identity
getIdentity() parameters
getIdentity() result
Returns a Result<{ data: Identity }, DevPlatformApiError>.
client.updateIdentity()
updateIdentity() is deprecated. Use
submitCustomerKyc instead.incomplete in requirements.
Update an identity
updateIdentity() parameters
updateIdentity() result
Returns a Result<{ data: Identity }, DevPlatformApiError>
reflecting the updated requirement states.
client.verifyIdentity()
verifyIdentity() is deprecated and has no direct replacement call. Customer
API verification starts automatically once you submit the last outstanding
requirement. See the Customer API guide for
the flow.Verify an identity
"challengeRequired", pass challenge.url to
client.setupChallenge(). The
challenge completes with flow: "identity" and the identityId.
verifyIdentity() parameters
verifyIdentity() result
Returns a Result<{ data: IdentityVerificationResponse }, DevPlatformApiError>.
client.getIdentityUploadUrl()
getIdentityUploadUrl() is deprecated. Use getCustomerUploadUrl instead.
See Upload a file in the
Customer API guide for the replacement flow.PUT to the returned url, sending the returned headers.
Upload a document
getIdentityUploadUrl() parameters
getIdentityUploadUrl() result
Returns a Result<{ data: IdentityFileUploadUrl }, DevPlatformApiError>.
client.submitIdentityFiles()
submitIdentityFiles() is deprecated. Use submitCustomerFiles instead. See
Upload a file in the Customer
API guide for the replacement flow.Submit uploaded documents
submitIdentityFiles() parameters
submitIdentityFiles() result
Returns a Result<{ data: Identity }, DevPlatformApiError>
reflecting the updated requirement states.
Shared types
Identity
IdentityStatus
"created", "collecting", "verifying", "challengeRequired",
"approved", "rejected", "manualReview", or "blocked".
Requirements
Each category is present when it applies to the customer’s jurisdiction, with a
status of "incomplete" or "complete" and, for field-based categories, the
requiredFields still outstanding.
Errors
All identity methods return the standard MoonPay Platform API error shape,DevPlatformApiError, with code, message, and optional field-level
errors. Notable codes: "requirements_incomplete" when verifying too early,
"verification_rejected" on a terminal rejection, and "country_mismatch"
when submitted data conflicts with the declared country.