Webhooks

PayGate Subscriptions also provides webhooks functionality.

Upon request to info@rainbowriders.dk we can setup for you webhooks that will be triggered on:

  • Agreement created
  • Agreement updated
  • Payment created
  • Payment updated

If you would like to use these, just send us the URLs that will receive each of these webhooks.

In order to setup webhook processing, you will need to know the data payload of these webhooks. You can check them below.

{
"id": 2102,
"user_id": 9,
"company_id": 2,
"subscriber_id": 8,
"campaign_id": null,
"membership_number": null,
"amount": "1.00",
"frequency": "2",
"plan_name": "Test",
"comments": null,
"cpr": null,
"custom_1": null,
"custom_data": null,
"status": "Accepted",
"request_text": "{\"external_id\":\"AGGR2102\",\"amount\":\"1\",\"currency\":\"DKK\",\"description\":\"Description\",\"next_payment_date\":\"2019-07-03\",\"frequency\":\"2\",\"links\":[{\"rel\":\"user-redirect\",\"href\":\"https:\\/\\/mobilepay.rainbowriders.dk\\/agreement\\/id\\/2102\"},{\"rel\":\"success-callback\",\"href\":\"https:\\/\\/mobilepay.rainbowriders.dk\\/api\\/callback\\/2102\\/success\"},{\"rel\":\"cancel-callback\",\"href\":\"https:\\/\\/mobilepay.rainbowriders.dk\\/api\\/callback\\/2102\\/cancel\"}],\"country_code\":\"DK\",\"plan\":\"Test\",\"expiration_timeout_minutes\":20160,\"mobile_phone_number\":\"4561608300\"}",
"response_text": "{\"id\":\"77f87fdf-7085-4e65-b339-52769cca5126\",\"links\":[{\"rel\":\"mobile-pay\",\"href\":\"https://open.mobilepay.dk:443/usersettings-landing-website/?token=636969792126918781&countryCode=DK&product=RecurringPayments\"}]}",
"response_code": 201,
"object_json": null,
"next_payment_date": "2020-01-03 00:00:00",
"from_iframe": null,
"from_api": 0,
"sms_at": "2019-06-24 15:20:12",
"canceled_at": null,
"rejected_at": null,
"is_admin_canceled": 0,
"created_at": "2019-06-24 15:20:12",
"updated_at": "2019-06-24 16:20:04",
"agreement_id": "77f87fdf-7085-4e65-b339-52769cca5126",
"full_name": "Anders Thingholm",
"request": {
"external_id": "AGGR2102",
"amount": "1",
"currency": "DKK",
"description": "Description",
"next_payment_date": "2019-07-03",
"frequency": "2",
"links": [
{
"rel": "user-redirect",
"href": "https://mobilepay.rainbowriders.dk/agreement/id/2102"
},
{
"rel": "success-callback",
"href": "https://mobilepay.rainbowriders.dk/api/callback/2102/success"
},
{
"rel": "cancel-callback",
"href": "https://mobilepay.rainbowriders.dk/api/callback/2102/cancel"
}
],
"country_code": "DK",
"plan": "Test",
"expiration_timeout_minutes": 20160,
"mobile_phone_number": "4561608300"
},
"the_next_payment_date": 1578006000,
"source": "app",
"subscriber": {
"id": 8,
"company_id": 2,
"firstname": "Anders",
"lastname": "Thingholm",
"phone": "61608300",
"email": "info@rainbowriders.dk",
"address_1": "Flaesketorvet 26",
"address_2": null,
"zip": "1711",
"city": "København V",
"created_at": "2019-06-05 15:29:59",
"updated_at": "2019-06-05 15:29:59",
"full_name": "Anders Thingholm"
},
"payment": {
"id": 30024,
"agreement_id": 2102,
"request_text": "{\"agreement_id\":\"77f87fdf-7085-4e65-b339-52769cca5126\",\"amount\":\"1\",\"due_date\":\"2019-07-03\",\"next_payment_date\":\"2020-01-03\",\"external_id\":\"SP30024\",\"description\":\"Subscribe Payment\"}",
"response_text": "{\"agreement_id\":\"77f87fdf-7085-4e65-b339-52769cca5126\",\"payment_id\":\"eea05f37-2453-4b25-a1c3-41472527cc9a\",\"amount\":\"1.0\",\"currency\":\"DKK\",\"payment_date\":\"2019-07-03\",\"status\":\"Executed\",\"status_text\":null,\"status_code\":0,\"external_id\":\"SP30024\",\"payment_type\":\"Regular\"}",
"object_json": null,
"payment_type": "subscription_payment",
"status": "Executed",
"created_at": "2019-06-24 16:20:04",
"updated_at": "2019-07-03 06:03:08",
"request": {
"agreement_id": "77f87fdf-7085-4e65-b339-52769cca5126",
"amount": "1",
"due_date": "2019-07-03",
"next_payment_date": "2020-01-03",
"external_id": "SP30024",
"description": "Subscribe Payment"
},
"response": {
"agreement_id": "77f87fdf-7085-4e65-b339-52769cca5126",
"payment_id": "eea05f37-2453-4b25-a1c3-41472527cc9a",
"amount": "1.0",
"currency": "DKK",
"payment_date": "2019-07-03",
"status": "Executed",
"status_text": null,
"status_code": 0,
"external_id": "SP30024",
"payment_type": "Regular"
},
"payment_id": "eea05f37-2453-4b25-a1c3-41472527cc9a",
"refund_id": null
}
}
{
"id": 28,
"agreement_id": 26,
"request_text": "{\"agreement_id\":\"8be85f0f-1ab9-45cf-b1c2-2ddd4358e22d\",\"amount\":\"1\",\"due_date\":\"2018-08-03\",\"next_payment_date\":\"2018-08-17\",\"external_id\":\"SP28\",\"description\":\"Subscribe Payment\"}",
"response_text": "{\"agreement_id\":\"8be85f0f-1ab9-45cf-b1c2-2ddd4358e22d\",\"payment_id\":\"b7c75801-b1ce-4866-a59a-a6d1cd8902ab\",\"amount\":\"1.0\",\"currency\":\"DKK\",\"payment_date\":\"2018-08-03\",\"status\":\"Executed\",\"status_text\":null,\"status_code\":0,\"external_id\":\"SP28\",\"payment_type\":\"Regular\"}",
"object_json": "{\"id\":\"b7c75801-b1ce-4866-a59a-a6d1cd8902ab\",\"agreement_id\":\"8be85f0f-1ab9-45cf-b1c2-2ddd4358e22d\",\"amount\":1,\"due_date\":\"2018-08-03T00:00:00\",\"status\":\"Executed\",\"external_id\":\"SP28\",\"external_agreement_id\":\"AGGR26\",\"next_payment_date\":null,\"description\":\"Subscribe Payment\"}",
"payment_type": "subscription_payment",
"status": "Executed",
"created_at": "2018-07-26 00:00:02",
"updated_at": "2019-04-23 09:00:42",
"request": {
"agreement_id": "8be85f0f-1ab9-45cf-b1c2-2ddd4358e22d",
"amount": "1",
"due_date": "2018-08-03",
"next_payment_date": "2018-08-17",
"external_id": "SP28",
"description": "Subscribe Payment"
},
"response": {
"agreement_id": "8be85f0f-1ab9-45cf-b1c2-2ddd4358e22d",
"payment_id": "b7c75801-b1ce-4866-a59a-a6d1cd8902ab",
"amount": "1.0",
"currency": "DKK",
"payment_date": "2018-08-03",
"status": "Executed",
"status_text": null,
"status_code": 0,
"external_id": "SP28",
"payment_type": "Regular"
},
"payment_id": "b7c75801-b1ce-4866-a59a-a6d1cd8902ab",
"refund_id": null
}