Gửi lại webhook

Gửi lại webhook cho hóa đơn

POST

https://api.fps.pro/invoices/webhook/resend

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

id

required

uuid

ID hóa đơn

webhook_link

url

URL nhận trạng thái thanh toán

Mặc định: from invoice

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

status

number

Trạng thái HTTP khi gửi webhook tới endpoint của bạn

response_body

json

Nội dung phản hồi nhận được sau khi gửi dữ liệu tới endpoint của bạn

Ví dụ yêu cầu

curl --request POST 'https://api.fps.pro/invoices/webhook/resend' \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: YOUR_CLIENT_ID' \
  --header 'X-Timestamp: 1720000000' \
  --header 'X-Signature: YOUR_HMAC_SHA256_SIGNATURE' \
  --data '{
  "id": "0a718b02-131d-495a-9641-39ca52139c07"
}'

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

{
  "status": 200,
  "message": "success",
  "data": {
    "status": 200,
    "response_body": "Webhook receive"
  }
}

Lỗi

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

{
  "status": 403,
  "message": "Forbidden"
}
{
  "status": 404,
  "message": "The invoice is not found"
}
{
  "status": 422,
  "message": "Validation Error",
  "data": {
    "field": "name",
    "message": "field validation error"
  }
}
{
  "status": 500,
  "message": "Internal Server Error"
}