// When player clicks "Top Up", your game server calls:
POST https://mtpay.shop/api/v1/orders
Headers: { "X-API-Key": "tcp_live_YOUR_KEY", "Content-Type": "application/json" }
Body: {
"amount": 80.00,
"player_id": "58291048",
"phone": "9876543210",
"description": "FreeFire 100 Diamonds Topup",
"redirect_url": "https://mtpay.shop/demo_game/topup_success.php",
"webhook_url": "https://mtpay.shop/demo_game/webhook.php"
}
// Response returns: "checkout_url"
// Simply redirect your player or open in iframe:
header("Location: " . $response['data']['checkout_url']);