Top-up
DocsTop-up

Top-up

Add GB to an active proxy package using your wallet balance, and review past top-ups for the package.

POST /packages/{id}/top-up

Charges your wallet balance and adds the requested traffic in whole GB to the package. Pricing uses the same volume tiers as the original purchase. On success the package quota grows immediately and traffic is provisioned at the upstream provider in the same request.

Payment by wallet only

This endpoint requires the cost to be fully covered by your wallet balance. If balance is insufficient the call returns 402 with no side effects. To buy a brand-new package or top up your wallet with crypto / Stripe, use the web checkout. Billing · Buy.

POST/api/v1/packages/{id}/top-up
request.json
{ "quantity_gb": 25 }
response.json
{
  "data": {
    "order_id":            8421,
    "traffic_added_gb":    25,
    "new_quota_gb":        125.0,
    "amount_charged_usd":  42.25,
    "balance_usd":         157.7500
  },
  "meta": { "version": "v1" }
}
402.json
{
  "error": { "code": "payment_required", "message": "Insufficient balance" },
  "meta":  { "version": "v1" }
}

GET /packages/{id}/top-ups

Returns previous top-ups for this package, newest first. Use limit and offset to paginate; defaults are 50 and 0.

GET/api/v1/packages/{id}/top-ups?limit=50&offset=0
history.json
{
  "data": {
    "package_id": 12,
    "limit":      50,
    "offset":     0,
    "top_ups": [
      { "order_id": 8421, "traffic_gb": 25.0, "amount_usd": 42.25, "paid_at": "2026-05-29T11:00:00+00:00" },
      { "order_id": 8127, "traffic_gb": 10.0, "amount_usd": 16.90, "paid_at": "2026-05-15T08:32:00+00:00" }
    ]
  },
  "meta": { "version": "v1" }
}

Code examples

topup.sh
curl -X POST https://raxyproxy.com/api/v1/packages/12/top-up \
     -H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{"quantity_gb": 25}'

# History (paginated)
curl "https://raxyproxy.com/api/v1/packages/12/top-ups?limit=20&offset=0" \
     -H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
topup.py
import requests, sys

API_KEY    = 'raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
PACKAGE_ID = 12

# Top up by 10 GB; on insufficient balance the call returns 402
r = requests.post(
    f'https://raxyproxy.com/api/v1/packages/{PACKAGE_ID}/top-up',
    headers={'Authorization': f'Bearer {API_KEY}'},
    json={'quantity_gb': 10},
    timeout=15,
)

if r.status_code == 402:
    sys.exit('Wallet balance too low — top up your wallet via the web app first.')

r.raise_for_status()
data = r.json()['data']
print(f"Now {data['new_quota_gb']} GB quota; balance left $${data['balance_usd']:.2f}")