The v2 API tops up your wallet. Create a payment with a method, show the returned QR / checkout to the payer, then poll until it confirms. All calls need your API key.
Methods
GET
/api/v2/methodsReturns { success, methods, usd_to_vnd }. The enabled rails are oxapay (crypto) and payos (VietQR). Use usd_to_vnd to show a VND amount.
Create a payment
POST
/api/v2/payment/create| Field | Type | Notes |
|---|---|---|
amount | number | USD, between $1 and $10,000. |
method | string | oxapay or payos. |
description | string | Optional label (max 80 chars). |
Returns the order: { success, id, status, method, amount, amount_vnd, payment }. payment holds the rail's QR / checkout URL and account details.
curl -X POST "https://tools.eimted.us/api/v2/payment/create" \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"amount":10,"method":"payos","description":"Wallet top-up"}'const res = await fetch("https://tools.eimted.us/api/v2/payment/create", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ amount: 10, method: "payos", description: "Wallet top-up" }),
});
const order = await res.json();
console.log(order.id, order.payment); // show order.payment (QR / checkout)import requests
order = requests.post(
"https://tools.eimted.us/api/v2/payment/create",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"amount": 10, "method": "payos", "description": "Wallet top-up"},
).json()
print(order["id"], order["payment"])package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
body := []byte(`{"amount":10,"method":"payos","description":"Wallet top-up"}`)
req, _ := http.NewRequest("POST", "https://tools.eimted.us/api/v2/payment/create", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var order map[string]any
json.NewDecoder(resp.Body).Decode(&order)
fmt.Println(order["id"], order["payment"])
}Poll until paid
GET
/api/v2/payment/status?id=...Also GET /api/v2/payment/:id. status moves through:
| status | Meaning |
|---|---|
pending / awaiting | Created, waiting for the transfer. |
paid / delivered | Confirmed - the wallet is credited. |
expired | No payment arrived in time. |
cancelled | The order was cancelled. |
List your payments
GET /api/v2/payment returns your recent orders.