Thông tin thanh toán

Kiểm tra trạng thái thanh toán của bạn

GET

https://api.fps.pro/invoices/{invoice}

Định dạng yêu cầupathParam

invoice

required

uuid

ID hóa đơn

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

id

uuid

ID hóa đơn

info.currency

string | null

Mã tiền fiat của hóa đơn

info.token

string | null

Token thanh toán

info.network

string | null

Mạng thanh toán

info.address

string | null

Địa chỉ ví để thanh toán

amount.starting_price

number

Số tiền ban đầu của hóa đơn bằng fiat

amount.discount_percent

number

Mức giảm giá theo phần trăm

amount.merchant_fee_percent

number

Phí merchant theo phần trăm

amount.service_fee_percent

number | null

Phí dịch vụ nền tảng theo phần trăm

amount.total

number

Số tiền cuối cùng sau giảm giá và phí

url.webhook

url | null

URL Webhook của merchant

url.success

url | null

URL chuyển hướng sau khi thanh toán thành công

url.error

url | null

URL chuyển hướng sau khi thanh toán lỗi

url.payment

url

Liên kết trang thanh toán

options.part_payment

boolean

Có cho phép thanh toán một phần hay không

options.ignore_client_amount

boolean

Có bỏ qua số tiền chính xác của client hay không

options.payment_accuracy

number

Sai số thanh toán được phép

additional.order_id

string | null

ID đơn hàng bên ngoài

additional.info

string | null

Thông tin bổ sung của đơn hàng

status

string

Trạng thái hiện tại của hóa đơn

expired_at

string (ISO 8601, UTC)

Ngày hết hạn hóa đơn

created_at

string (ISO 8601, UTC)

Ngày tạo hóa đơn

payment.transactions

array

Danh sách giao dịch blockchain đến

payment.transactions[].txid

string | null

Hash giao dịch

payment.transactions[].from

string | null

Địa chỉ người gửi

payment.transactions[].amount

string | null

Số tiền giao dịch đến theo đơn vị nhỏ nhất của token

payment.fiat_payment_amount

number

Số tiền fiat đã thanh toán

payment.service_fee_amount

number

Phí dịch vụ đã cộng dồn bằng fiat

Ví dụ yêu cầu

curl --request GET 'https://api.fps.pro/invoices/0a718b02-131d-495a-9641-39ca52139c07' \

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

{
  "status": 200,
  "message": "success",
  "data": {
    "id": "0a718b02-138d-495a-9661-39ca52139c07",
    "info": {
      "currency": "USD",
      "token": "tether",
      "network": "tron",
      "address": "TQ5x...abc"
    },
    "amount": {
      "starting_price": 1000,
      "discount_percent": 0,
      "merchant_fee_percent": 10,
      "service_fee_percent": 1,
      "total": 1100
    },
    "url": {
      "webhook": "https://merchant.example/webhook",
      "success": "https://merchant.example/success",
      "error": "https://merchant.example/error",
      "payment": "https://frontend.example/0a718b02-138d-495a-9661-39ca52139c07"
    },
    "options": {
      "part_payment": true,
      "ignore_client_amount": false,
      "payment_accuracy": 0
    },
    "additional": {
      "order_id": "1",
      "info": "test order"
    },
    "status": "paid",
    "expired_at": "2026-01-05 14:30:43",
    "created_at": "2026-01-05T13:30:43.000Z",
    "payment": {
      "transactions": [
        {
          "txid": "f4d4f497e6b32b6a4b8e...",
          "from": "TFgN...sender",
          "amount": "1100000000"
        }
      ],
      "fiat_payment_amount": 1100,
      "service_fee_amount": 11
    }
  }
}

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": "invoice",
      "message": "The invoice must be UUID."
    }
  ]
}
{
  "status": 404,
  "message": "The invoice is not found"
}
{
  "status": 500,
  "message": "Internal Server Error"
}