Skip to content
Logo MoneyGo

Buy Info

This endpoint retrieves information needed for purchasing a voucher, including the calculated amount to be charged from the wallet with the commission fee applied. The response helps users understand the total cost before proceeding with the actual voucher purchase.

Important Notes:

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

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

  • Minimum/Maximum Limits: Voucher amounts must be within the allowed range based on currency settings and application limits.

  • Commission Calculation: The system calculates commission based on user type (partner or merchant) and applies different fee percentages accordingly.

  • Balance Verification: The wallet must have sufficient funds to cover both the voucher amount and the commission fee.

  • Method: POST
  • URL: https://api.money-go.com/api/vouchers/buy/info
  • Headers:
  • Authorization: Bearer YOUR_ACCESS_TOKEN
  • Content-Type: application/json


The following JSON body must be sent with the POST request:

{
"voucher_amount": 100.00,
"wallet_from": "U123456"
}
FieldTypeRequiredDescription
voucher_amountnumberYesThe desired voucher amount in USD.
wallet_fromstringYesYour USD wallet number from which funds will be debited.
Terminal window
curl -X POST "https://api.money-go.com/api/vouchers/buy/info" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"voucher_amount": 100.00,
"wallet_from": "U123456"
}'
{
"voucher_amount": 100.00,
"voucher_currency": "USD",
"fee_percent": 2.5,
"wallet_amount": 102.50,
"wallet_currency": "USD"
}
FieldTypeDescription
voucher_amountnumberThe voucher amount (rounded according to ISO mathematical rules)
voucher_currencystringThe voucher currency (always “USD”)
fee_percentnumberThe commission percentage charged by MoneyGo
wallet_amountnumberTotal amount to be debited from wallet (voucher + commission)
wallet_currencystringThe currency of the wallet (should match voucher currency)

When a POST request is made to the /api/vouchers/buy/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 CodeError MessageDescription
401UnauthorizedMissing or invalid bearer token.
422Buy voucher disabledVoucher purchase is currently disabled.
422User is blockedThe user account is blocked. Please check the “translation” field for more details (e.g., "server_error.sender_account_is_blocked").
422Wallet from not existsThe source wallet (wallet_from) does not exist or is inactive (e.g., deleted or in status NEW) or Insufficient balance.
422Only USD wallet allowedOnly USD wallets are allowed for voucher purchase.
422Min amountMinimum amount constraint violated for voucher_amount.
422Max amountMaximum amount constraint violated for voucher_amount.
  1. Bearer Token Validation: Valid access token is required
  2. User Status: User must not be blocked (is_blocked = 0)
  3. Wallet Ownership: The specified wallet must belong to the authenticated user
  4. Currency Restriction: Only USD wallets are allowed for voucher purchases
  5. Balance Check: Wallet must have sufficient funds to cover voucher amount plus commission
  6. Amount Limits: Voucher amount must be within minimum and maximum limits for the currency
  7. Maximum Voucher Limit: Must not exceed the max_voucher_amount from application limits

Important: This endpoint only provides calculation information. To actually purchase a voucher, you’ll need to use a separate voucher purchase endpoint after reviewing the costs presented by this endpoint.