Webhooks
Sign2Pay provide webhooks that, when setup for your Client Application, will POST
a JSON object representing your registered event.
To test out these webhooks, you can add a temporary url to Client Application settings to via http://requestb.in to see exactly what gets sent.
While we are adding new events all the time, the keys provided will follow the same object template.
Webhooks JSON Payload Keys
Key | Description |
---|---|
resource | The Sign2Pay object model the event refers to. |
type | The namespaced event name. |
data | Any required data associated with the event. |
created_at | Timestamp indicating when the event was registered. |
Example Webhook JSON Payload:
{
"resource": "purchase",
"type": "purchase.submitted_to_merchant",
"data": {
"token": "560be6249ee49f1249000073",
"ref_id": "ad827780b223e1d74312374f4d18a187",
"purchase_id": "56af67c43f90bf129200003c",
"amount": 1000,
"created_at": 1454335940,
"test": false,
"user_params": {
"identifier": "nick@sign2pay.com"
}
},
"created_at": 1454335940
}