# 通知回调说明

## 使用场景 <a href="#spgvh" id="spgvh"></a>

***

用户发起支付，当交易完成之后，Supefina支付系统会通过调用商户提供的回调接口告知交易结果详情，商户需要按响应规则接受并实现自己的处理逻辑。

## 回调配置 <a href="#wqsls" id="wqsls"></a>

***

1. 商户在发起交易前，需要在<商户后台-安全中心>中配置回调地址，否则将无法正常接收交易结果。
2. 回调地址可以配置多个。如需更换或新增回调地址，请先在商户后台进行配置，然后再发起交易。
3. 为保持回调地址的唯一性，建议不要在地址中加入订单号、支付产品等变量。
4. 为确保交易安全，Supefina会对callbackUrl字段与配置的回调地址进行规则校验，请确保二者一致。

## 注意 <a href="#cgzaw" id="cgzaw"></a>

***

1. 支付系统不保证一定能成功通知，在某些情况下可能会通知失败导致商户收不到回调，包括但不限于商户提供的回调地址有误。
2. 商户系统对于结果通知的内容需要做签名验证，签名和验签逻辑见“[签名算法](/huan-ying-shi-yong-supefina-de-api-wen-dang/qian-ming-suan-fa.md)”。
3. 某些渠道在某些情况下可能存在多次回调的情况，如：先成功，再失败，需要自行增加处理逻辑。

## 常见问题：

Q：Supefina系统显示“通知失败”是什么原因导致的？需要怎么处理？

A：Supefina 系统将订单信息发送至商户提供或配置的回调地址。如果商户未按规则返回"SUCCESS"或返回其他内容，Supefina 系统会认为商户未收到通知。系统会以 3 分钟的间隔进行 5 次连续通知，直到商户返回"SUCCESS"后停止。需要注意的是，通知失败并不一定意味着 Supefina 未进行回调，也可能是商户系统在接收回调后处理失败，这种情况需要商户自行排查解决。

***

Q：如果用户取消支付或者支付失败的话，会通知商户吗？

A：用户取消支付或支付失败时，Supefina通知商户。如果用户在订单过期时间截止前仍未完成支付，系统会向商户发送交易失败通知。<mark style="color:red;">SPEI不包含此通知处理方法。</mark>

***

Q：订单的结算状态是否会进行回调？

A：结算状态不包含在回调信息中。您可以通过[结算状态查询](/huan-ying-shi-yong-supefina-de-api-wen-dang/cha-xun/jie-suan-zhuang-tai-cha-xun.md)接口查询订单的结算状态。

***

Q：异步通知没收到怎么办？

A：可在对接群内联系运营再次进行通知

***

Q：交易查询API的回调内容里是否包含失败原因？

A：交易失败原因将在回调内容的 errorMsg 字段中显示。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/tong-zhi-hui-tiao-shuo-ming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
