Note: Replace YOUR_ACCESS_TOKEN with a valid access token when making requests.
Learn more about Authorization
/api/vouchers/activation/confirmThis 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.
POSThttps://api.money-go.com/api/vouchers/activation/confirmAuthorization: Bearer YOUR_ACCESS_TOKENContent-Type: application/json{ "voucher_number": "string", "voucher_code": "string", "wallet_to": "string", "additional": "string" // optional}
Note: Replace YOUR_ACCESS_TOKEN with a valid access token when making requests.
Learn more about Authorization
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" }'<?php$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.money-go.com/api/vouchers/activation/confirm', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'voucher_number' => 'VON123456789', 'voucher_code' => 'ABC123XYZ', 'wallet_to' => 'USD123456789', 'additional' => 'PaymentID12345' ]), CURLOPT_HTTPHEADER => array( 'Authorization: Bearer YOUR_ACCESS_TOKEN', 'Content-Type: application/json' ),));
$response = curl_exec($curl);curl_close($curl);echo $response;?>const response = await fetch('https://api.money-go.com/api/vouchers/activation/confirm', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ voucher_number: 'VON123456789', voucher_code: 'ABC123XYZ', wallet_to: 'USD123456789', additional: 'PaymentID12345' })});
const data = await response.json();console.log(data);{ "message": "voucher activated"}| Field | Type | Description |
|---|---|---|
message | string | Confirmation message indicating successful voucher activation |
expired_at)type = 2)type = 1)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 Code | Error Message | Description |
|---|---|---|
| 401 | Unauthorized | Missing or invalid bearer token. |
| 422 | Voucher activation disabled | Voucher activation is currently disabled. |
| 422 | Voucher invalid | Invalid 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. |
| 422 | Voucher closed | Voucher already activated or expired. |
| 422 | Only USD wallet allowed | Only USD wallets are allowed for voucher activation. |
| 422 | Wallet to not exists | The destination wallet (wallet_to) does not exist or is inactive (e.g., deleted or in status NEW). |
| 422 | User is blocked | The 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"). |
Best Practice: Always call /api/vouchers/activation/info first to verify voucher details and calculate net amounts before confirming activation.