POST
https://api.fps.pro/invoices/webhook/test
Định dạng yêu cầuapplication/json
iduuid | Định danh của thanh toán không tồn tại Mặc định: generated |
webhook_linkrequired url | URL nhận trạng thái thanh toán |
statusstring | Trạng thái thanh toán Mặc định: paid |
Định dạng phản hồidata object
statusnumber | Trạng thái HTTP khi gửi webhook tới endpoint của bạn |
response_bodyjson | 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/test' \
--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",
"webhook_link": "https://merchant.example.com/webhooks/fps",
"status": "paid"
}'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": 422,
"message": "Validation Error",
"data": {
"field": "name",
"message": "field validation error"
}
}{
"status": 500,
"message": "Internal Server Error"
}