# Notification Callbacks

# Scenario


when a user initiates a payment, the Supefina payment system will call the callback interface provided by the merchant to inform the transaction Result Details. The merchant needs to accept and implement its own processing logic according to the rules.

# Callback configuration


**you can configure a callback address in two ways: **

  1. contact the operator to configure the callback address in the system background (the merchant dimension can be modified)
  2. the callback address is passed in as an input parameter when you initiate collection and payment. The order dimension cannot be modified.

**Callback logic: **
when the order is completed, the callback address passed in when the request is entered is used first. If the callback address is not passed in when the request is entered, the merchant callback address configured in the background of the system is used.
**Scenario: **

  1. merchants integrate a multi-tenant system. Different tenants have different callback addresses and do not intend to encapsulate the callback. You can pass in different callback addresses through input parameters.
  2. If you need to modify the callback address during system usage, and there are still unsettled orders before modification, use the system background to configure the callback address without losing the callback notification.

# Note


  1. the payment system does not guarantee that the notification will be successful. In some cases, the notification may fail and the merchant cannot receive the callback, including but not limited to the incorrect callback address provided by the merchant.
  2. The merchant system requires signature verification for the content of the result notification. For more information about the signature and signature verification logic, see signature
  3. when the merchant enters, the merchant needs to provide the callback address to the staff for configuration.
  4. Some channels may have multiple callbacks in some cases. For example, if the callback succeeds first and then fails, you need to add the processing logic yourself.
  5. Collection and payment use the same callback interface to identify collection and payment through the transactionType field

# API submission method


submit by POST

# Notification parameters


**Field name ** **variable name ** **type ** **description ** sample value
Supefina order number supefinaOrderId String

merchant order number merOrderId String

merchant number merId String
transaction Status status String
- 00: pre-order
- 01: Successful
- 02: transaction failed
- 03: Payment rejection
- 04: failed to place an order
country number countryId String
- MEX: Mexico
- COL: Colombia
- PER: Peru
- ARG: Argentina
transaction Type transactionType String
- 01: Collection
- 02: payment on behalf of others
message msg String
order amount amount BigDecimal
paid-in amount realityAmount BigDecimal
presale handling fee fee BigDecimal
paid-in handling fee realityFee BigDecimal
transaction success Time successTime Date
customer name customerName String
extended parameters extraData JSONObject
random string nonceStr String the length of the random string cannot exceed 32.
signature sign String

payment reference identifier identifier String For example, Mexico collects and returns the Clabe number