Note: Replace YOUR_ACCESS_TOKEN with a valid access token when making requests.
Learn more about Authorization
/api/vouchers/activation/infoThis endpoint retrieves information needed for activating a voucher, including the calculated amount that will be credited to the wallet after commission fees are deducted. The response helps users understand the net amount they will receive before proceeding with the actual voucher activation.
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 Validation: The voucher must be valid, not expired, and in awaiting activation status.
User Type Restriction: Partners can only activate merchant vouchers, and merchants can only activate partner vouchers.
Commission Calculation: The system calculates commission based on user type and deducts it from the voucher amount.
POSThttps://api.money-go.com/api/vouchers/activation/infoAuthorization: Bearer YOUR_ACCESS_TOKENContent-Type: application/json
Note: Replace YOUR_ACCESS_TOKEN with a valid access token when making requests.
Learn more about Authorization
The following JSON body must be sent with the POST request:
{ "voucher_number": "1001", "voucher_code": "VCH-ABC123-XYZ789-DEF456-GHI012", "wallet_to": "U123456"}| Field | Type | Required | Description |
|---|---|---|---|
| voucher_number | string | Yes | The voucher number (internal ID) to activate. |
| voucher_code | string | Yes | The voucher activation code (32-character code). |
| wallet_to | string | Yes | Your USD wallet number to which funds will be credited. |
curl -X POST "https://api.money-go.com/api/vouchers/activation/info" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "voucher_number": "1001", "voucher_code": "VCH-ABC123-XYZ789-DEF456-GHI012", "wallet_to": "U123456" }'<?php$url = "https://api.money-go.com/api/vouchers/activation/info";$data = [ "voucher_number" => "1001", "voucher_code" => "VCH-ABC123-XYZ789-DEF456-GHI012", "wallet_to" => "U123456"];
$options = [ 'http' => [ 'header' => [ "Authorization: Bearer YOUR_ACCESS_TOKEN", "Content-Type: application/json" ], 'method' => 'POST', 'content' => json_encode($data) ]];
$context = stream_context_create($options);$result = file_get_contents($url, false, $context);
if ($result === FALSE) { die('Error occurred while fetching voucher activation info');}
$response = json_decode($result, true);print_r($response);import fetch from 'node-fetch';
interface VoucherActivationInfoRequest { voucher_number: string; voucher_code: string; wallet_to: string;}
async function getVoucherActivationInfo(): Promise<void> { const url = "https://api.money-go.com/api/vouchers/activation/info"; const requestData: VoucherActivationInfoRequest = { voucher_number: "1001", voucher_code: "VCH-ABC123-XYZ789-DEF456-GHI012", wallet_to: "U123456" };
try { const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify(requestData) });
if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); }
const data = await response.json(); console.log("Voucher Activation Info:", data); } catch (error) { console.error("Error fetching voucher activation info:", error); }}
getVoucherActivationInfo();{ "voucher_number": "1001", "voucher_code": "VCH-ABC123-XYZ789-DEF456-GHI012", "voucher_amount": 100.00, "voucher_currency": "USD", "fee_percent": 1.5, "wallet_amount": 98.50, "wallet_currency": "USD", "status": 0, "date_created": "2024-01-15T10:00:00Z", "expired_at": "2024-04-15T10:00:00Z"}| Field | Type | Description |
|---|---|---|
| voucher_number | string | The voucher number (internal ID). |
| voucher_code | string | The voucher activation code (decrypted for display). |
| voucher_amount | number | The original voucher amount. |
| voucher_currency | string | The voucher currency (always “USD”). |
| fee_percent | number | The commission percentage charged by MoneyGo for activation. |
| wallet_amount | number | Net amount to be credited to wallet (voucher - commission). |
| wallet_currency | string | The currency of the destination wallet. |
| status | number | Voucher status (0 = awaiting activation, 1 = activated, 2 = expired, 3 = cancelled). |
| date_created | string | ISO 8601 timestamp when the voucher was created. |
| expired_at | string | ISO 8601 timestamp when the voucher expires. |
When a POST request is made to the /api/vouchers/activation/info 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"). |
expired_at)type = 2)type = 1)Before providing activation information, the system validates:
Important: This endpoint only provides calculation information. To actually activate the voucher, you’ll need to use a separate voucher activation confirmation endpoint after reviewing the net amount presented by this endpoint.