Submission Webhooks

Webhook structure and samples for File Submission.


{
   "events":[
      {
         "id" : {EVENTID},
         "created_at" : {CREATEDDATE},
         "resource_type" : {RESOURCETYPE},
         "description" : {DESCRIPTION},
         "event_source" : {EVENTSOURCE},
         "submission_id" : {SUBMISSIONID},
         "sun_number" : {SUNNUMBER},
         "sun_name" : {SUNNAME},
         "mandate_new_instruction_count" : {MANDATENEWINSTRUCTIONCOUNT},
         "mandate_cancelation_count" : {MANDATECANCELATIONCOUNT},
         "mandate_convert_count" : {MANDATECONVERTCOUNT},
         "credit_total_count" : {CREDITTOTALCOUNT},
         "credit_total_value" : {CREDITTOTALVALUE},
         "payment_total_count" : {PAYMENTTOTALCOUNT},
         "payment_total_value" : {PAYMENTTOTALVALUE},
         "status" : {STATUS},
         "serial" : {SERIAL},
         "mandate_failed_count" : {MANDATEFAILEDCOUNT},
         "credit_failed_count" : {CREDITFAILEDCOUNT},
         "payment_failed_count" : {PAYMENTFAILEDCOUNT},
         "payment_failed_value" : {PAYMENTFAILEDVALUE},
         "credit_failed_value" : {CREDITFAILEDVALUE}  
      }
   ]
}


Webhooks are sent out of SmarterPay Cloud as a JSON array.
The JSON Syntax Rules are:

  • Data is in name/value pairs, for example {“id” : “EV000003432”}.
  • Data is separated by commas.
  • Curly braces hold objects.
  • Square brackets hold arrays.


Property Variable Description Empty
Values (1)
Format Example
id {EVENTID} The ID of the Webhook Event. No. String. “EV000003432”
created_at {CREATEDDATE} The Date that event was created. No. ISO8601. “2020-12-22T08:05:00.000Z”
resource_type {RESOURCETYPE} The Resource type will be submission. No. String. “submission”
description {DESCRIPTION} The description of Webhook Event. No. String. “SMPC Service - Submission File”
event_source {EVENTSOURCE} The Event code that triggered the sending of the Webhook. No. Integer. “10022091”
submission_id {SUBMISSIONID} The ID of the Submission. No. String. “FS01G420EJ932DJ1VQWR”
sun_number {SUNNUMBER} The Sun Number associated with the Submission. No. Integer. “123456”
sun_name {SUNNAME} The Sun Name associated with the Submission. No. String. “Smarterpay Test”
mandate_new_instruction_count {MANDATENEWINSTRUCTIONCOUNT} Number of New Mandates (0N) in the Submission. No. Integer. “0”
mandate_cancelation_count {MANDATECANCELATIONCOUNT} Number of Cancelled Mandates (0C) in the Submission. No. Integer. “0”
mandate_convert_count {MANDATECONVERTCOUNT} Number of Converted Mandates (0S) in the Submission. No. Integer. “0”
credit_total_count {CREDITTOTALCOUNT} Number of Credits in the Submission. No. Integer. “0”
credit_total_value {CREDITTOTALVALUE} Value of Credits, in pence, in the Submission. No. Integer. “0”
payment_total_count {PAYMENTTOTALCOUNT} Number of Payments in the Submission. No. Integer. “10”
payment_total_value {PAYMENTTOTALVALUE} Value of Payments, in pence, in the Submission. No. Integer. “23010”
status {STATUS} The Status of the Submission. No. String. “submitted”
serial {SERIAL} The Serial Number of the Submission. No. String. “JWGLXP”
mandate_failed_count {MANDATEFAILEDCOUNT} Number of failed Mandates in the Submission. No. Integer. “0”
credit_failed_count {CREDITFAILEDCOUNT} Number of failed Credits in the Submission. No. Integer. “0”
payment_failed_count {PAYMENTFAILEDCOUNT} Number of failed Payments in the Submission. No. Integer. “0”
payment_failed_value {PAYMENTFAILEDVALUE} Value of failed Payments, in pence, in the Submission. No. Integer. “0”
credit_failed_value {CREDITFAILEDVALUE} Value of failed Credits, in pence, in the Submission. No. Integer. “0”

Notes:
(1) Empty Values - The property will always be in the Webhook, however the value of the property may be an empty string (“”).


Property Possible Values
status submitted
submitted with errors


Submission Webhook - Structure

{
   "events":[
      {
         "id":"FTBEV12798855",
         "created_at":"2022-07-13T23:03:01.000Z",
         "resource_type":"Submissions",
         "description":"SMPC Service - Submission File",
         "event_source":"30081000",
         "submission_id":"FS01G420EJ932DJ1VQWR",
         "sun_number":"123456",
         "sun_name":"Smarterpay Test",
         "mandate_new_instruction_count":"0",
         "mandate_cancelation_count":"0",
         "mandate_convert_count":"0",
         "credit_total_count":"0",
         "credit_total_value":"0",
         "payment_total_count":"10",
         "payment_total_value":"23010",
         "status":"Submitted",
         "serial":"JWGLXP",
         "mandate_failed_count":"0",
         "credit_failed_count":"0",
         "payment_failed_count":"0",
         "payment_failed_value":"0",
         "credit_failed_value":"0"
      }
   ]
}


Submission Webhook - Structure

{
   "events":[
      {
         "id":"FTBEV12798856",
         "created_at":"2022-07-13T23:03:01.000Z",
         "resource_type":"Submissions",
         "description":"SMPC Service - Submission File Updated",
         "event_source":"30082000",
         "submission_id":"FS01NWLOKJYNYK8RX5QM",
         "sun_number":"123456",
         "sun_name":"Smarterpay Test",
         "mandate_new_instruction_count":"0",
         "mandate_cancelation_count":"0",
         "mandate_convert_count":"0",
         "credit_total_count":"0",
         "credit_total_value":"0",
         "payment_total_count":"10",
         "payment_total_value":"55000",
         "status":"Submitted With Errors",
         "serial":"8023RJ",
         "mandate_failed_count":"0",
         "credit_failed_count":"0",
         "payment_failed_count":"5",
         "payment_failed_value":"29000",
         "credit_failed_value":"0"
      }
   ]
}
  • Last modified: 2022/08/02 17:12