Skip to content
Logo MoneyGo

Activation Confirm

This endpoint confirms the activation of a voucher, transferring the voucher amount (minus commission) to the specified wallet. Upon successful activation, the voucher status changes to “activated” and a transaction is created to record the transfer.

Important Notes:

  • USD Wallets Only: Only USD wallets are allowed for voucher activation. Ensure your wallet currency is USD before making the request.

  • User Authorization: Valid bearer token is required. The user must not be blocked.

  • Voucher Status: The voucher must be in “pending” status (not already activated or closed).

  • Cross-User Type Validation: Partners can only activate merchant-purchased vouchers, and merchants can only activate partner-purchased vouchers.

  • Method: POST
  • URL: https://api.money-go.com/api/vouchers/activation/confirm
  • Headers:
    • Authorization: Bearer YOUR_ACCESS_TOKEN
    • Content-Type: application/json
{
"voucher_number": "string",
"voucher_code": "string",
"wallet_to": "string",
"additional": "string" // optional
}


Terminal window
curl -X POST https://api.money-go.com/api/vouchers/activation/confirm \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"voucher_number": "VON123456789",
"voucher_code": "ABC123XYZ",
"wallet_to": "USD123456789",
"additional": "PaymentID12345"
}'

{
"message": "voucher activated"
}
FieldTypeDescription
messagestringConfirmation message indicating successful voucher activation

  1. Bearer Token Validation: Valid access token is required
  2. Voucher Existence: The voucher must exist with the provided number and code
  3. Voucher Secret: The provided voucher code must match the stored encrypted secret
  4. User Status: Both the activating user and voucher creator must not be blocked
  5. Voucher Status: Voucher must be in status 0 (awaiting activation)
  6. Expiration Check: Voucher must not be expired (current time < expired_at)
  7. Transaction Status: Associated transaction must be in status 3 (completed)
  8. Cross-Type Activation:
    • Partners can only activate merchant vouchers (type = 2)
    • Merchants can only activate partner vouchers (type = 1)
  9. Wallet Ownership: The specified wallet must belong to the authenticated user
  10. Currency Restriction: Only USD wallets are allowed for voucher activation

When a POST request is made to the /api/vouchers/activation/confirm endpoint, the API may return error responses with HTTP status codes 401 or 422 if any validation fails. Below is a table summarizing the possible error responses:

Error CodeError MessageDescription
401UnauthorizedMissing or invalid bearer token.
422Voucher activation disabledVoucher activation is currently disabled.
422Voucher invalidInvalid voucher number or activation code.
Transaction Status: Related transaction must have status = 3 (“Completed”).
Type Validation: Partners can only activate merchant vouchers (type = 2), Merchants can only activate partner vouchers (type = 1).
Creator Status: Voucher creator is blocked.
422Voucher closedVoucher already activated or expired.
422Only USD wallet allowedOnly USD wallets are allowed for voucher activation.
422Wallet to not existsThe destination wallet (wallet_to) does not exist or is inactive (e.g., deleted or in status NEW).
422User is blockedThe user account is blocked. Please check the “translation” field for more details (e.g., "server_error.recipient_account_is_blocked" or "server_error.sender_account_is_blocked").

  1. Created - Voucher purchased and generated
  2. Pending - Available for activation (status = 0)
  3. Activated - Successfully redeemed (status = 1)
  4. Closed - Expired or manually closed (status = 2)

  • Cross-User Type Validation: Partners and merchants can only activate vouchers purchased by the opposite user type
  • Expiration Checks: Expired vouchers are automatically closed and cannot be activated
  • Concurrent Protection: Voucher updates use queue processing to prevent race conditions

Best Practice: Always call /api/vouchers/activation/info first to verify voucher details and calculate net amounts before confirming activation.