Notification Webhook

When the status of a payment changes, a notification is sent via a POST request to notification_url. This notification contains information about the payment request in its "body." Unlike the structure obtained from a GET request for the payment request, there is no array of transactions; instead, there is a field named transaction containing the approved transaction.

Notifications are sent every 5 minutes from the moment the transaction is approved until a response with a 200 code is received, up to a maximum of 5 notifications.

Example notification:


{
    "id": "668c3db79d7d2a18680cc96f",
    "event_type": "new_payment",
    "entity_type": "payment_request",
    "entity_id": "668c3d95d0b28d1f7d6d47a0",
    "data": {
        "payment_request": {
            "id": "668c3d95d0b28d1f7d6d47a0",
            "order_id": 159,
            "ars_amount": 1500,
            "ars_paid": 1500,
            "reference": {
                "internalReference": "a4427755-7a49-46b9-bc99-fa2c217fc0db"
            },
            "memo": null,
            "notification_url": "https://reddecomercios.com/api/v1.0/webhook",
            "status": "approved",
            "status_detail": "correct",
            "expiration_time": "2024-07-08 19:42:17.517000",
            "delivered": false,
            "transactions": [
                {
                    "id": "668c3d96d0b28d1f7d6d47a2",
                    "price_details": {
                        "currency": "ARS",
                        "currency_amount": 1500,
                        "currency_final_amount": 1500,
                        "base_amount": 0.00001895,
                        "final_amount": 0.00001895,
                        "paid_amount": 0.00001895,
                        "discount_rate": 0,
                        "rate": 79142500
                    },
                    "coin": "BTC",
                    "address": "lnbcrt18950n1pngc0vkpp50zf75fc9hcahvymxv7se6y0ttv5agmdt560zuqv6eyv758xq28fsdq62d5k6urvv4rxjgzfdemx76trv5cqzpgxqyz5vqsp5cv28p5g5t9ptw3dkm5lpgp9qjcuq903er82yfxku3mu38955c4eq9qxpqysgqezx6yucq3gsu8ehajwcl42jf0wsskaca3qjt4xv47n7fh2ytag7sdh6lz3evexywuxssknhtqpnzcgmvjh6vmld2kwmm3366rtls4uqpgefmdw",
                    "status": "correct",
                    "payment_request_id": "668c3d95d0b28d1f7d6d47a0",
                    "memo": null,
                    "payments": [
                        {
                            "hash": "0x456",
                            "block": null,
                            "amount": 0.00001895,
                            "paid_by": null,
                            "paid_at": "2024-07-08 19:27:51.489000"
                        }
                    ],
                    "date_created": "2024-07-08 19:27:18.494000",
                    "last_modified": "2024-07-08 19:27:51.509000"
                },
                {
                    "id": "668c3d96d0b28d1f7d6d47a4",
                    "price_details": {
                        "currency": "ARS",
                        "currency_amount": 1500,
                        "currency_final_amount": 1500,
                        "base_amount": 1.068376,
                        "final_amount": 1.068376,
                        "paid_amount": 0,
                        "discount_rate": 0,
                        "rate": 1404
                    },
                    "coin": "USDT",
                    "address": "0xcfD73f3770B557E40Cab98B4FfD1006FF60446fA",
                    "status": "not_paid",
                    "payment_request_id": "668c3d95d0b28d1f7d6d47a0",
                    "memo": null,
                    "additional_info": null,
                    "payments": [],
                    "date_created": "2024-07-08 19:27:18.826000",
                    "last_modified": "2024-07-08 19:27:18.826000"
                },
                {
                    "id": "668c3d97d0b28d1f7d6d47a6",
                    "price_details": {
                        "ars_amount": 1500,
                        "ars_final_amount": 1500,
                        "base_amount": 1.068376,
                        "final_amount": 1.068376,
                        "paid_amount": 0,
                        "discount_rate": 0,
                        "rate": 1404
                    },
                    "coin": "DOC",
                    "address": "0xcfD73f3770B557E40Cab98B4FfD1006FF60446fA",
                    "status": "not_paid",
                    "payment_request_id": "668c3d95d0b28d1f7d6d47a0",
                    "memo": null,
                    "additional_info": null,
                    "payments": [],
                    "date_created": "2024-07-08 19:27:19.257000",
                    "last_modified": "2024-07-08 19:27:19.257000"
                },
                {
                    "id": "668c3d97d0b28d1f7d6d47a8",
                    "price_details": {
                        "ars_amount": 1500,
                        "ars_final_amount": 1500,
                        "base_amount": 1.06151854,
                        "final_amount": 1.06151854,
                        "paid_amount": 0,
                        "discount_rate": 0,
                        "rate": 1413.07
                    },
                    "coin": "UXD",
                    "address": "0xcfD73f3770B557E40Cab98B4FfD1006FF60446fA",
                    "status": "not_paid",
                    "payment_request_id": "668c3d95d0b28d1f7d6d47a0",
                    "memo": null,
                    "additional_info": null,
                    "payments": [],
                    "date_created": "2024-07-08 19:27:19.575000",
                    "last_modified": "2024-07-08 19:27:19.575000"
                }
            ],
            "payments": [
                {
                    "hash": "0x456",
                    "block": null,
                    "amount": 0.00001895,
                    "paid_by": null,
                    "paid_at": "2024-07-08 19:27:51.489000",
                    "coin": "BTC"
                }
            ],
            "merchant_id": "66350c0a43ea985f7c8f54db",
            "checkout_url": "https://develop.pagar.simplefi.tech/66350c0a43ea985f7c8f54db?payment_id=668c3d95d0b28d1f7d6d47a0",
            "date_created": "2024-07-08 19:27:17.532000",
            "last_modified": "2024-07-08 19:27:51.564000"
        },
        "new_payment": {
            "hash": "0x456",
            "block": null,
            "amount": 0.00001895,
            "paid_by": null,
            "paid_at": "2024-07-08 19:27:51.489000",
            "coin": "BTC"
        }
    },
    "merchant_id": "66350c0a43ea985f7c8f54db",
    "sent_notifications": [],
    "deleted": false,
    "last_modified": "2024-07-08 19:27:51.607000",
    "date_created": "2024-07-08 19:27:51.607000"
}

Types of Notification

The possible values for event_type are:

  • 'new_payment'

  • 'payment_request_created'

  • 'payment_request_expired'

  • 'payment_request_canceled'

  • 'payment_request_refunded'

Last updated