Full API reference for claiming TrueWallet vouchers. Auth, retries, error codes, and examples included.
Dokmai Angpao API processes TrueWallet voucher claims through one secure endpoint with authentication, idempotency, and traceable request IDs.
https://api.dokmaistore.com
Production requests support either:
x-dokmai-api-key: <your_api_key>
Authorization: Bearer <buyer_jwt>
If both are provided, API key authentication is evaluated first.
/api/v1/angpao/redeem
Claims a voucher using a Thai phone number and voucher input.
Content-Type: application/json x-dokmai-api-key: your_api_key_here Idempotency-Key: claim-20260306-001
8-128
[A-Za-z0-9._:-]
{ "phoneNumber": "0900000000", "voucher": "https://gift.truemoney.com/campaign/?v=abc123..." }
Send at least one voucher field:
voucher
voucherCode
voucherUrl
link
phoneNumber
0xxxxxxxxx
* One voucher field is required.
*
{ "success": true, "data": { "source": "dokmai_angpao", "provider": "truewallet", "amount": 88, "currency": "THB", "voucherId": "641f0e2e31b9f8xxxx", "detail": "Voucher redemption", "ownerName": "Gift Sender", "redeemerPhoneMasked": "090-***-0000", "redemptionDate": "2026-03-06T09:10:11.000Z", "expireDate": "2026-03-10T12:00:00.000Z", "providerCode": "SUCCESS" }, "requestId": "89e7b18a-dad3-4eca-beb2-d8a4f0d8d8fa" }
{ "success": false, "error": { "code": "angpao_not_found", "message": "Voucher not found", "retryable": false, "requestId": "89e7b18a-dad3-4eca-beb2-d8a4f0d8d8fa", "details": { "providerCode": "VOUCHER_NOT_FOUND" } } }
unauthorized
forbidden
forbidden_service_scope
invalid_api_key
rate_limited
invalid_json
invalid_body
missing_required_fields
invalid_phone_number
invalid_voucher_code
invalid_idempotency_key
unsupported_content_type
application/json
angpao_not_found
angpao_already_redeemed
angpao_expired
angpao_recipient_mismatch
angpao_redeem_failed
provider_rate_limited
provider_unavailable
provider_invalid_payload
storage_unavailable
internal_error
Every response includes:
X-RateLimit-Limit: 120 X-RateLimit-Remaining: 119 X-RateLimit-Reset: 1760000000 X-Request-Id: 89e7b18a-dad3-4eca-beb2-d8a4f0d8d8fa
Throttled responses include:
Retry-After: 30
curl -X POST "https://api.dokmaistore.com/api/v1/angpao/redeem" \ -H "Content-Type: application/json" \ -H "x-dokmai-api-key: YOUR_API_KEY" \ -H "Idempotency-Key: claim-20260306-001" \ -d '{ "phoneNumber": "0900000000", "voucher": "https://gift.truemoney.com/campaign/?v=YOUR_CODE" }'
const response = await fetch('https://api.dokmaistore.com/api/v1/angpao/redeem', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-dokmai-api-key': process.env.DOKMAI_API_KEY, 'Idempotency-Key': `claim-${Date.now()}`, }, body: JSON.stringify({ phoneNumber: '0900000000', voucher: 'https://gift.truemoney.com/campaign/?v=YOUR_CODE', }), }); const payload = await response.json(); if (payload.success) { console.log('Claimed amount:', payload.data.amount); } else { console.error(payload.error.code, payload.error.message, payload.error.requestId); }
/api/dokmaiservice/v1/angpao/redeem
This endpoint powers the claim form at angpao.dokmai.app.
angpao.dokmai.app
POST https://api.dokmaistore.com/api/v1/angpao/redeem
requestId
retryable: true
Your Angpao Claim Engine.
Dokmai Angpao API processes TrueWallet voucher claims through one secure endpoint with authentication, idempotency, and traceable request IDs.
Base URL
Authentication
Production requests support either:
x-dokmai-api-key: <your_api_key>Authorization: Bearer <buyer_jwt>If both are provided, API key authentication is evaluated first.
Main Endpoint
/api/v1/angpao/redeemClaims a voucher using a Thai phone number and voucher input.
Required Headers
Idempotency-Key Rules
8-128characters.[A-Za-z0-9._:-].Request Body
{ "phoneNumber": "0900000000", "voucher": "https://gift.truemoney.com/campaign/?v=abc123..." }Voucher Field Aliases
Send at least one voucher field:
vouchervoucherCodevoucherUrllinkField Validation
phoneNumber0xxxxxxxxxvouchervoucherCodevouchervoucherUrlvoucherlinkvoucher*One voucher field is required.Response Format
Success (200)
{ "success": true, "data": { "source": "dokmai_angpao", "provider": "truewallet", "amount": 88, "currency": "THB", "voucherId": "641f0e2e31b9f8xxxx", "detail": "Voucher redemption", "ownerName": "Gift Sender", "redeemerPhoneMasked": "090-***-0000", "redemptionDate": "2026-03-06T09:10:11.000Z", "expireDate": "2026-03-10T12:00:00.000Z", "providerCode": "SUCCESS" }, "requestId": "89e7b18a-dad3-4eca-beb2-d8a4f0d8d8fa" }Error (Non-2xx)
{ "success": false, "error": { "code": "angpao_not_found", "message": "Voucher not found", "retryable": false, "requestId": "89e7b18a-dad3-4eca-beb2-d8a4f0d8d8fa", "details": { "providerCode": "VOUCHER_NOT_FOUND" } } }Error Codes
unauthorizedforbiddenforbidden_service_scopeinvalid_api_keyrate_limitedinvalid_jsoninvalid_bodymissing_required_fieldsphoneNumberor voucher fieldinvalid_phone_numberinvalid_voucher_codeinvalid_idempotency_keyunsupported_content_typeapplication/jsonangpao_not_foundangpao_already_redeemedangpao_expiredangpao_recipient_mismatchangpao_redeem_failedprovider_rate_limitedprovider_unavailableprovider_invalid_payloadstorage_unavailableinternal_errorRate Limit Headers
Every response includes:
Throttled responses include:
Quick Start (cURL)
curl -X POST "https://api.dokmaistore.com/api/v1/angpao/redeem" \ -H "Content-Type: application/json" \ -H "x-dokmai-api-key: YOUR_API_KEY" \ -H "Idempotency-Key: claim-20260306-001" \ -d '{ "phoneNumber": "0900000000", "voucher": "https://gift.truemoney.com/campaign/?v=YOUR_CODE" }'Quick Start (Node.js)
const response = await fetch('https://api.dokmaistore.com/api/v1/angpao/redeem', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-dokmai-api-key': process.env.DOKMAI_API_KEY, 'Idempotency-Key': `claim-${Date.now()}`, }, body: JSON.stringify({ phoneNumber: '0900000000', voucher: 'https://gift.truemoney.com/campaign/?v=YOUR_CODE', }), }); const payload = await response.json(); if (payload.success) { console.log('Claimed amount:', payload.data.amount); } else { console.error(payload.error.code, payload.error.message, payload.error.requestId); }Web Form Endpoint (No-Auth UI Proxy)
/api/dokmaiservice/v1/angpao/redeemThis endpoint powers the claim form at
angpao.dokmai.app.phoneNumberandvoucher.POST https://api.dokmaistore.com/api/v1/angpao/redeemusing server-side credentials.Operational Guidance
requestIdin logs for support and reconciliation.retryable: true.