Tạo QR cho ví tĩnh

Tạo ảnh base64 chứa địa chỉ ví tĩnh của bạn

POST

https://api.fps.pro/invoices/wallet/qr

Định dạng yêu cầuapplication/json

wallet_id

required

uuid

ID ví tĩnh cần tạo QR

width

integer

Chiều rộng ảnh (min: 185, max: 585)

Mặc định: 185

Định dạng phản hồidata object

image

string

Mã QR dưới dạng Data URL (data:image/png;base64,...).

Ví dụ yêu cầu

curl --request POST 'https://api.fps.pro/invoices/wallet/qr' \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: YOUR_CLIENT_ID' \
  --header 'X-Timestamp: 1720000000' \
  --header 'X-Signature: YOUR_HMAC_SHA256_SIGNATURE' \
  --data '{
  "wallet_id": "6fd3f87a-c090-4702-82f9-e70c1323ef92",
  "width": 250
}'

Phản hồi thành công

{
  "status": 200,
  "message": "qr created",
  "data": {
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
  }
}

Lỗi

Danh sách lỗi ủy quyền chi tiết nằm trong Ủy quyền - Lỗi

{
  "status": 422,
  "message": "Validation Error",
  "errors": [
    {
      "field": "wallet_id",
      "message": "wallet_id must be UUID"
    }
  ]
}
{
  "status": 404,
  "message": "Wallet not found"
}
{
  "status": 500,
  "message": "Internal Server Error"
}