Notifications

This page provides the content of notifications generated in response to changes to some data statuses.

When you work with the BridgerPay system—create sessions, request to execute payment transactions, and so on—the information flows contain the statuses of your operations; they are generated by BridgerPay or received from PSPs. We notify you of changes to some of these statuses: the respective messages in JSON format are sent via a predefined webhook.

Six types of notifications exist. You can find their content on the respective tabs later.

  • "cashier.session.init" and "cashier.session.close" are generated when a Cashier session has been created (initiated) and closed (or expired), respectively.

  • "approved" and "declined" are generated when a payment transaction has finally been approved by any PSP or declined by all available PSPs. Note that these notifications are applicable to both "deposit" and "payout" transaction types. But their content varies depending on this type and the payment method used (e.g. "credit_card" or "apm"); thus, mind the comments next to each line.

  • "partly_refunded" and "refunded" are generated when a request to partially or fully refund a shopper's deposit has been satisfied by the PSP.

Important: CRM needs to handle multiple notifications for the same orderid. If multiple notifications are sent, the CRM should only process the first notification and ignore the others.

cashier.session.init
cashier.session.close
approved
declined
partly_refunded
refunded
cashier.session.init
{
"webhook": {
"type": "cashier.session.init" //Event name
},
"data": {
"charge": {
"type": "cashier.session.init", //Event name
"attributes": {
"status": "cashier.session.init", //Event name
"amount": 2000.0, //Transaction amount
"live_mode": true,
"currency": "USD", //Transaction currency
"created_at": 1609147030, //UTC timestamp of when the session was initialised
"source": {
"email": "[email protected]", //Shopper's email address; if it was not specified during the Cashier session initialization, the value is "null"
"ip_address": "127.0.0.1", //Shopper's IP address
"name": " " //Shopper's first and last names if they were specified during the Cashier session initialization
}
}
},
"order_id": "4e50a...2ff"
},
"meta": {
"server_time": 1541160272, //Server's UTC timestamp of when the event was registered in the Bridger
"server_timezone": "UTC", //Time zone of the PSP's server
"api_version": "1", //API version the PSP used
"payload": "null", //Payload value
"cashier_session_id": "62290...e40", //Identifier of the Cashier session used
"platform_id": null //Merchant's platform ID
}
}
cashier.session.close
/* "cashier.session.close" and "cashier.session.init" are very similar; thus, see
the comments explaining the purpose of each line (parameter) on the preceding tab */
{
"webhook": {
"type": "cashier.session.close"
},
"data": {
"charge": {
"type": "cashier.session.close",
"order_id": "201995972",
"psp_order_id": null,
"attributes": {
"status": "cashier.session.close",
"created_at": 1609142858
}
}
},
"meta": {
"server_time": 1609142858,
"server_timezone": "UTC",
"api_version": "1",
"payload": null,
"cashier_session_id": "009d6829-exx1-4ce4-ae39-123456789123",
"platform_id": null
}
}
approved
{
"webhook": {
"type": "approved" //Transaction status
},
"data": {
"order_id": "640790367", //Transaction ID within the merchant's system
"psp_name": "psp_name", //PSP's code name
"charge": {
"type": "approved", //Transaction status
"id": "8ac7a...d8f", //Transaction ID within the PSP's system
"psp_order_id": "b4a0a...a58", //Transaction group ID within the PSP's system
"attributes": {
"is3_d": true, //3D Secure dialog box requiring the payment confirmation if available; applicable to the "credit_card" payment method of the "deposit" operation type
"live_mode": true, //Cashier widget is available; applicable if the operation type is "deposit"
"amount": 22.96, //Transaction amount
"status": "approved", //Transaction status
"card_number": "1881", //Last four numbers appearing on the shopper's debit or credit card; applicable to the "credit_card" payment method
"currency": "EUR", //Transaction currency
"payment_method": "credit_card", //Method the shopper used to pay, e.g. "credit_card" or "apm"; applicable to the "deposit" operation type
"description": "BGPj173aa01", //Comment associated with the transaction; applicable to the "deposit" operation type
"decline_code": null, //Declination reason code
"decline_reason": null, //Reason of why the transaction was declined
"reference_id": null,
"created_at": 1581071423, //UTC timestamp of when the transaction was registered in the PSP's system
"updated_at": 0, //UTC timestamp of when information on the transaction was modified in the PSP's system
"source": {
"email": "[email protected]", //Shopper's email address
"ip_address": "127.0.0.1", //Shopper's IP address
"name": "John Smith" //Shopper's first and last name
},
/* the following four parameters are applicable to the "credit_card" payment method */
"card_masked_number": "401288******1881", //Half-hidden card number
"card_expiration": "122", //Expiration month and year of the card (e.g. "122" implies January 2022)
"card_brand": "VISA", //Organization serving the card
"card_holder_name": "John Smith", //Holder name of the shopper's debit or credit card
"customer": {
"full_name": null,
"address": "Bethnal Green Road, 12", //Shopper's address
"country": "BE", //Shopper's country
"zip_code": "9900" //Shopper's ZIP code
"extra_data":{
}
},
"credit_card_token": "0bee8...", //Credit card token
"mid_alias": "XYZ" //Mid name identifier
},
"is_refundable": true, //Parameter defining whether the transaction was refundable; always 'false' for the "payout" operation type
"refund_id": "629bc...948", //Transaction ID within the BridgerPay system; shown here if the PSP supports refunds
"operation_type": "deposit", //Operation (transaction) type: "deposit" or "payout"
"deposit_source": "cashier" //The deposit source can be cashier or Mpi
}
},
"meta": {
"server_time": 1581071423, //Server's UTC timestamp of when the transaction was registered in the PSP's system
"server_timezone": "UTC", //Time zone of the PSP's server
"api_version": "1", //API version the PSP used
/* the following three parameters are applicable to the "deposit" operation type */
"payload": "746...5f921", //Payload value
"cashier_session_id": "62290...e40", //Identifier of the Cashier session used
"platform_id": "CU1234" //Merchant's platform ID
}
}
declined
/* "declined" and "approved" are very similar; thus, see the comments explaining
the purpose of each line (parameter) on the preceding tab */
{
"webhook": {
"type": "declined"
},
"data": {
"order_id": "2106605328",
"psp_name": "psp_name",
"charge": {
"type": "declined",
"id": "8ac7a...85e",
"psp_order_id": "fd7ff...85e",
"attributes": {
"is3_d": true,
"live_mode": true,
"amount": 22.99,
"status": "declined",
"card_number": "1111",
"currency": "EUR",
"payment_method": "credit_card",
"description": "BGPj173aa01",
"decline_code": -4, //Declination reason code
"decline_reason": "User Authentication Failed", //Reason of why the transaction was declined
"reference_id": null,
"created_at": 1581071423,
"updated_at": 0,
"source": {
"email": "[email protected]",
"ip_address": "127.0.0.1",
"name": "John Smith"
},
"card_masked_number": "411111******1111",
"card_expiration": "521",
"card_brand": "VISA",
"card_holder_name": "John Smith",
"customer": {
"full_name": null,
"address": "Bethnal Green Road, 12",
"country": "BE",
"zip_code": "9900",
"extra_data":{}
},
"credit_card_token": null,
"mid_alias":"XYZ"
},
"is_refundable": false,
"refund_id": "",
"operation_type": "deposit",
"deposit_source": "cashier"
}
},
"meta": {
"server_time": 1581071423,
"server_timezone": "UTC",
"api_version": "1",
"payload": "746...5f921",
"cashier_session_id": "62290...e40",
"platform_id": "CU1234"
}
}
partly_refunded
{
"webhook": {
"type": "partly_refunded" //Transaction status
},
"data": {
"order_id": "2106605329", //Transaction ID within the merchant's system
"psp_name": "psp_name", //PSP's code name
"charge": {
"type": "partly_refunded", //Transaction status
"id": "8ac7a...d8f", //Transaction ID within the PSP's system
"psp_order_id": "b4a0a...a58", //Transaction group ID within the PSP's system
"attributes": {
"is3_d": true, //3D Secure dialog box requiring the payment confirmation
"live_mode": true, //Cashier widget is available
"amount": -5, //Transaction amount
"status": "partly_refunded", //Transaction status
"card_number": "1881", //Last four numbers appearing on the shopper's debit or credit card; used if applicable, otherwise it is 'null'
"currency": "EUR", //Transaction currency
"payment_method": "credit_card", //Method the shopper used to make the deposit being refunded, e.g. "credit_card" or "apm"
"description": "test partial refund", //Comment associated with the transaction
"created_at": 1581073874, //UTC timestamp of when the transaction was registered in the PSP's system
"updated_at": 0, //UTC timestamp of when the information on the transaction was modified in the PSP's system
"source": {
"email": "[email protected]", //Shopper's email address
"ip_address": "127.0.0.1", //Shopper's IP address
"name": "John Smith" //Shopper's first and last name
},
/* the following four parameters are applicable to the "credit_card" payment method */
"card_holder_name": "John Smith", //Holder name of the shopper's debit or credit card
"card_masked_number": "401288******1881", //Half-hidden card number
"card_expiration": "122", //Expiration month and year of the card (e.g. "122" implies January 2022)
"card_brand": "VISA", //Organization serving the card
"customer": {
"address": "Bethnal Green Road, 12", //Shopper's address
"country": "BE", //Shopper's country
"zip_code": "9900" //Shopper's ZIP code
}
},
"is_refundable": true, //Parameter defining whether the corresponding payment transaction is refundable; always 'true' here
"refund_id": "ed32e...810" //Transaction ID within the BridgerPay system
}
},
"meta": {
"server_time": 1581073874, //Server's UTC timestamp of when the transaction was registered in the PSP's system
"server_timezone": "UTC", //Time zone of the PSP's server
"api_version": "1", //API version the PSP used
"cashier_session_id": "c7997...5af", //Identifier of the Cashier session used
"platform_id": "CU1234" //Merchant's platform ID
}
}
refunded
/* "refunded" and "partly_refunded" are very similar; thus, see the comments
explaining the purpose of each line (parameter) on the preceding tab */
{
"webhook": {
"type": "refunded"
},
"data": {
"order_id": "2106605330",
"psp_name": "psp_name",
"charge": {
"type": "refunded",
"id": "10350...321",
"psp_order_id": "5a6ef...9e7",
"attributes": {
"is3_d": true,
"live_mode": true,
"amount": -70.9,
"status": "refunded",
"card_number": "1881",
"currency": "EUR",
"payment_method": "credit_card",
"description": "test full refund",
"created_at": 1580914767,
"updated_at": 0,
"source": {
"email": "[email protected]",
"ip_address": "127.0.0.1",
"name": "John Smith"
},
"card_holder_name": "John Smith",
"card_masked_number": "401288******1881",
"card_expiration": "122",
"card_brand": "VISA",
"customer": {
"address": "Bethnal Green Road, 12",
"country": "BE",
"zip_code": "9900"
}
},
"is_refundable": true,
"refund_id": "8dcfe...559"
}
},
"meta": {
"server_time": 1580914767,
"server_timezone": "UTC",
"api_version": "1",
"cashier_session_id": "a5b03...1b7",
"platform_id": "CU1234"
}
}