Prerequisites: Your API key (
zupy_pk_*) and familiarity with the Authentication page. OTP is an additional verification layer on top of API key auth.OTP Policy Per Integration
Each integration has its own OTP policy, configured by Zupy during onboarding. The policy determines which customer-facing actions require identity verification.Policy Settings
| Setting | Description |
|---|---|
require_otp_for_enrollment | Verify identity before enrolling in loyalty program |
require_otp_for_redemption | Verify identity before redeeming rewards |
require_otp_for_coupon_usage | Verify identity before using coupons |
trust_partner_validation | Trust that the partner already verified the customer |
Trust Levels
Zupy defines three trust level presets:| Level | Enrollment OTP | Redemption OTP | Coupon OTP | Trust Partner | Use Case |
|---|---|---|---|---|---|
| Strict | Required | Required | Required | No | New or unknown partners (default) |
| Relaxed | Not required | Required | Required | No | Tablet/kiosk integrations (e.g., Goomer) |
| Trusted | Not required | Not required | Not required | Yes | Verified CRMs with existing identity checks (e.g., Repediu) |
Trust level examples by partner type
Trust level examples by partner type
| Partner | Type | Trust Level | Rationale |
|---|---|---|---|
| Repediu | CRM | Trusted | iFood/Rappi already verify customer identity — orders come from authenticated delivery platforms |
| Goomer | Tablet | Relaxed | Open tablet in restaurant — customer types their phone number, no prior identity verification |
| Saipos | POS | Relaxed | POS identifies customer by phone, but coupon usage at checkout needs confirmation |
When OTP Is Required vs. Not
| Action | OTP Possible? | Depends On |
|---|---|---|
| Search customers | Never | — |
| View points balance / history | Never | — |
| Award points | Never | B2B operation, no customer interaction |
| List rewards / coupons | Never | — |
| View loyalty programs | Never | — |
| Send webhook | Never | — |
| Redeem reward | Per config | require_otp_for_redemption |
| Validate / use coupon | Per config | require_otp_for_coupon_usage |
| Enroll customer | Per config | require_otp_for_enrollment |
The OTP Flow
When your integration requires OTP for an action, follow this 3-step flow:Request OTP
Send the customer’s identifier (phone, email, or CPF) to request a verification code.Zupy sends a 6-digit code to the customer via WhatsApp (primary) or email (fallback). The code expires in 5 minutes.
Verify OTP
The customer provides the code. Send it back to Zupy for verification.On success, you receive an
otp_session token along with the customer’s profile.Step 1: Request OTP
X-API-Key)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | Customer’s phone (+5511987654321), email, or CPF |
Step 2: Verify OTP
X-API-Key)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | Same identifier used in Step 1 |
otp_code | string | Yes | 6-digit code the customer received |
Verify OTP — Errors
| Status | Type | When |
|---|---|---|
| 400 | validation-error | Missing identifier or otp_code |
| 401 | authentication-required | Invalid or expired OTP code |
| 404 | not-found | OTP was not requested for this identifier |
| 429 | rate-limit-exceeded | Maximum verification attempts reached |
Step 3: Use the OTP Session
Include theX-OTP-Session header in requests that require OTP verification:
Session Expiry
The OTP session token is valid for 30 minutes (cache-backed). After expiry:- Requests with the expired token return
403with typeotp-required - Request a new OTP to get a fresh session
What Happens Without OTP
If your integration’s OTP policy requires verification for an action and you don’t provide a validX-OTP-Session header, you receive a 403 error:
This error only occurs when your specific integration’s policy requires OTP for the attempted action. If your policy doesn’t require OTP (e.g., trusted partners), you won’t see this error.
Full OTP Example
Complete end-to-end flow: request OTP, verify, then redeem a reward.Next Steps
Webhook Setup
Configure webhooks for automatic order processing
Partner Onboarding
Complete the onboarding checklist for production deployment
API Reference
Browse all endpoints with request/response schemas