MEXICOP2P

POST /users/:ref/kyc

Create a KYC verification session for a user.

POST /users/:ref/kyc

Create a KYC verification session. The user completes verification at the returned URL, then is redirected back to your application.

This endpoint is only available if your partner account uses the MexicoP2P-provided KYC model. If you manage KYC yourself (partner-managed model), pass kycAttestation when calling POST /users instead — this endpoint will return KYC_NOT_AVAILABLE. See KYC: Two models for details.

Request

curl -X POST \
  -H "X-API-Key: mp2p_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "level": "BASIC",
    "returnUrl": "https://your-app.com/kyc/complete"
  }' \
  https://mexicop2p.org/api/v1/users/user_12345/kyc

Request body

FieldTypeRequiredDescription
levelstringYes"BASIC" or "FULL"
returnUrlstringYesURL to redirect user after KYC

Response 201

{
  "sessionId": "did_session_abc123",
  "sessionUrl": "https://verify.didit.me/session/did_session_abc123"
}

Response fields

FieldTypeDescription
sessionIdstringDidit verification session ID
sessionUrlstringURL to redirect the user for KYC

KYC pricing

LevelPrice per verification
BASIC$1.00
FULL$2.50

Free and Growth tiers include a monthly KYC allocation. Overages are billed to the partner.

Errors

CodeHTTPWhen
KYC_NOT_AVAILABLE400Partner uses PARTNER_MANAGED KYC
VALIDATION_ERROR400Missing level or returnUrl
NOT_FOUND404User doesn't exist
KYC_LIMIT_REACHED403Monthly KYC limit exceeded for tier
KYC_SESSION_FAILED502Didit API returned an error

On this page