Webhooks (Notification)

Our APIs use webhooks for event notifications. Webhooks are push API calls that let your app know an event has happened.

In order to receive notifications about the events in your platform, you have to previously configure the notification when you do the POST of the transaction, indicating the URL in the field callback.

Event

Whenever an event occurs, we will send you a notification in json format using HTTP POST to the URL that you specified.

Each JSON-formatted POST notification message contains event information based on the resource type and the event type.

Note: If your app responds with any other status code, we tries to resend the notification message 5 times over the course of three days.

Security - To prevent downgrade attacks

Every notification we send to your endpoint is signed. We do this by including a header named "SmartFastPay-Signature" in every event we send. This allows you to verify and ensure that the event was sent by SmartFastPay and not a third party.

Notification example

An example of a successful payment notification:

Successful Payment Notification

{
    "requestId": "456oc8d8-13e0-4db8-92b5-8dc54a433a97",
    "data": [
        {
            "id": "456oc8d8-13e0-4db8-92b5-8dc54a433a97",
            "customer_id": "2985746",
            "transaction_id": "193846",
            "amount": "213.21",
            "status": "paid",
            "type": "payment",
            "payment_status": "paid",
            "exchange": "5.52"
        }
    ]
}

Notification data details

ParameterDescription

id

The created transaction by the request made unique identificator.

customer_id

The customer id stored on your platform for future identification.

transaction_id

The id of the transaction generated in you platform.

amount

The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)

status

The current status of the transaction. These are our statuses: paid, canceled

type

Shows the type of this transaction. payment or payout

payment_status

The current status of the payment. These are our statuses: paid, denied, expired

exchange

The exchange rate applied to the current transaction

An example of an unsuccessful payout notification

Unsuccessful Payout Notification

{
    "requestId": "398oca92-13e0-9db8-93b5-1dc24a323a97",
    "data": [
        {
            "id": "398oca92-13e0-9db8-93b5-1dc24a323a97",
            "customer_id": "2985746",
            "transaction_id": "193846",
            "amount": "398.45",
            "status": "canceled",
            "type": "payout",
            "payout_status": "failed",
            "exchange": "5.52"
        }
    ]
}

Notification data details

ParameterDescription

id

The created transaction by the request made unique identificator.

customer_id

The customer id stored on your platform for future identification.

transaction_id

The id of the transaction generated in you platform.

amount

The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)

status

The current status of the transaction. These are our statuses: paid, canceled

type

Shows the type of this transaction. payment or payout

payout_status

The current status of the payment. These are our statuses: pending, success, failed, onhold, returned, refunded

exchange

The exchange rate applied to the current transaction