v2

latestOpenAPI 3.1.02026-08-01244220427.0 KB
Gift Card Customers

Verifycustomerotp

Verify OTP and Login Customer

Verify the OTP code sent to the customer's email or phone. On success, finds or creates a GiftCardCustomer record and returns a session token.

Flow:

  1. Verify the OTP code against Redis
  2. Find or create a GiftCardCustomer document in MongoDB
  3. Update customer's trust level and login metadata
  4. Create a Redis-backed session (24-hour TTL)
  5. Return session token and customer identity

Request Body:

  • target: Email or phone the OTP was sent to
  • code: 6-digit OTP code
  • name: Optional customer name (used during first registration)

Status Codes:

  • 200: OTP verified, session created
  • 400: Invalid code, expired, or too many attempts
post/v2/giftcards/customers/otp/verify

Request body

targetstring required

Email address or phone number the OTP was sent to

codestring required

6-digit OTP code

namestring nullable

Customer name (used during registration)

Response

Successful Response

successboolean required
errorstring nullable
verifiedTargetstring nullable
otpTypestring nullable
sessionTokenstring nullable

Example response

{
  "identity": {
    "id": "5eb7cf5a86d9755df3a6c593"
  }
}