Skip to main content
[AU] Webhook Data Structure
Updated over a month ago

Payment Requests

Note: The webhooks from payments requests that were returned/voided will also have an approved status. This is because the payment request itself was approved, and then the credit/debit subsequently failed.

{
"data": [
{
"ref": "PR.1imr7",
"payout": {
"amount": 1000,
"matures_at": "2017-12-25T00:00:00Z",
"description": "Webhook data structure (approved status)"
},
"status": "approved",
"metadata": {
"my_custom_key": "some value",
"another_custom_key": "some more value"
},
"created_at": "2024-11-18T00:07:31Z",
"credit_ref": "C.2ef3l",
"matures_at": "2017-12-25T00:00:00Z",
"initiator_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"responded_at": "2024-11-18T00:07:31Z",
"schedule_ref": null,
"authoriser_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"status_reason": null,
"your_bank_account_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"authoriser_contact_id": "5a087832-a741-41a2-a51f-35d3e7f4d28b",
"authoriser_contact_initiated": false
}
],
"event": {
"at": "2024-11-18T00:07:31Z",
"who": {
"account_id": "0976e199-c516-4e17-a6d4-df083e234144",
"account_type": "AnyoneAccount",
"bank_account_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"bank_account_type": "BankAccount"
},
"type": "payment_request.approved"
}
}

Successful transaction (Debit)

{
"data": [
{
"ref": "D.2688y",
"type": "debit",
"amount": 1000,
"status": "cleared",
"bank_ref": "DT.23ro6",
"category": "payout",
"channels": [
"direct_entry"
],
"metadata": {
"my_custom_key": "some value",
"another_custom_key": "some more value"
},
"cleared_at": "2024-11-18T00:09:41Z",
"created_at": "2024-11-18T00:07:31Z",
"matures_at": "2017-12-25T00:00:00Z",
"parent_ref": "PR.1imr7",
"party_name": "Test Account",
"description": "Webhook data structure (approved status)",
"party_bank_ref": null,
"party_nickname": "Test_Account",
"bank_account_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"current_channel": "direct_entry",
"party_contact_id": null,
"status_changed_at": "2024-11-18T00:09:41Z"
}
],
"event": {
"at": "2024-11-18T00:09:41Z",
"who": {
"account_id": "0976e199-c516-4e17-a6d4-df083e234144",
"account_type": "AnyoneAccount",
"bank_account_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"bank_account_type": "BankAccount"
},
"type": "creditor_debit.cleared"
}
}

Successful transaction (Credit)
โ€‹

{
"data": [
{
"ref": "C.2ef3l",
"type": "credit",
"amount": 1000,
"status": "cleared",
"bank_ref": "CT.27vbv",
"category": "payout",
"channels": [
"direct_entry"
],
"metadata": {
"my_custom_key": "some value",
"another_custom_key": "some more value"
},
"cleared_at": "2024-11-18T00:11:41Z",
"created_at": "2024-11-18T00:07:31Z",
"matures_at": "2024-11-18T00:09:41Z",
"parent_ref": "PR.1imr7",
"party_name": "John Doe",
"description": "Webhook data structure (approved status)",
"party_bank_ref": "DT.23ro6",
"party_nickname": null,
"bank_account_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"current_channel": "direct_entry",
"party_contact_id": "5a087832-a741-41a2-a51f-35d3e7f4d28b",
"status_changed_at": "2024-11-18T00:11:41Z"
}
],
"event": {
"at": "2024-11-18T00:11:41Z",
"who": {
"account_id": "38bc6f3b-14fe-4998-be48-4b66b42fd363",
"account_type": "Account",
"bank_account_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"bank_account_type": "BankAccount"
},
"type": "credit.cleared"
}
}

Voided/returned transaction (Debit)

{
"data": [
{
"ref": "D.24t7h",
"type": "debit",
"amount": 205,
"status": "returned",
"failure": {
"code": "E205",
"title": "Account Not Found",
"detail": "The target account number cannot be found by the financial institution."
},
"bank_ref": "DT.22dat",
"category": "payout",
"channels": [
"direct_entry"
],
"metadata": {
"my_custom_key": "some value",
"another_custom_key": "some more value"
},
"cleared_at": null,
"created_at": "2024-10-14T06:01:40Z",
"matures_at": "2017-12-25T00:00:00Z",
"parent_ref": "PR.1gy5m",
"party_name": "Test Account",
"description": "Webhook data structure (Declined status)",
"failure_reason": "incorrect_account_number",
"party_bank_ref": null,
"party_nickname": "Test_Account",
"bank_account_id": "fdc26d05-38d3-44a9-a940-33337d9127fa",
"current_channel": "direct_entry",
"failure_details": "No account/incorrect account Number",
"party_contact_id": null,
"status_changed_at": "2024-10-14T06:03:42Z"
}
],
"event": {
"at": "2024-10-14T06:03:42Z",
"who": {
"account_id": "8e888d15-9264-4ae0-882e-f59e3bd0c230",
"account_type": "AnyoneAccount",
"bank_account_id": "fdc26d05-38d3-44a9-a940-33337d9127fa",
"bank_account_type": "BankAccount"
},
"type": "creditor_debit.returned"
}
}

Voided/returned transaction (Credit)

{
"data": [
{
"ref": "C.2czj7",
"type": "credit",
"amount": 205,
"status": "voided",
"failure": {
"code": "E205",
"title": "Account Not Found",
"detail": "The target account number cannot be found by the financial institution."
},
"bank_ref": null,
"category": "payout",
"channels": [
"direct_entry"
],
"metadata": {
"my_custom_key": "some value",
"another_custom_key": "some more value"
},
"cleared_at": null,
"created_at": "2024-10-14T06:01:40Z",
"matures_at": null,
"parent_ref": "PR.1gy5m",
"party_name": "John Doe",
"description": "Webhook data structure (Declined status)",
"failure_reason": "incorrect_account_number",
"party_bank_ref": "DT.22dat",
"party_nickname": null,
"bank_account_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"current_channel": "direct_entry",
"failure_details": "Debit failed: No account/incorrect account Number",
"party_contact_id": "93e3cf0d-62b5-4f03-8dec-f572b87c5985",
"status_changed_at": "2024-10-14T06:03:42Z"
}
],
"event": {
"at": "2024-10-14T06:03:42Z",
"who": {
"account_id": "38bc6f3b-14fe-4998-be48-4b66b42fd363",
"account_type": "Account",
"bank_account_id": "983fabf2-b279-4fad-a8fb-d25d94c1f8bc",
"bank_account_type": "BankAccount"
},
"type": "credit.voided"
}
}

Payments

{
"data": [
{
"ref": "PB.oc4k",
"payouts": [
{
"ref": "D.268rl",
"to_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"amount": 1000,
"status": "matured",
"from_id": "6b415531-aa2e-48fe-a69d-08bea2ee1190",
"created_at": "2024-11-18T03:16:32Z",
"matures_at": "2024-11-17T13:00:00Z",
"description": "Webhook data structure (approved status)",
"batch_description": "Webhook data structure (approved status)",
"recipient_contact_id": "5a087832-a741-41a2-a51f-35d3e7f4d28b"
}
],
"channels": [
"direct_entry"
],
"your_bank_account_id": "6b415531-aa2e-48fe-a69d-08bea2ee1190"
}
],
"event": {
"at": "2024-11-18T03:16:32Z",
"who": {
"account_id": "38bc6f3b-14fe-4998-be48-4b66b42fd363",
"account_type": "Account",
"bank_account_id": "6b415531-aa2e-48fe-a69d-08bea2ee1190",
"bank_account_type": "BankAccount"
},
"type": "payment.added"
}

Successful transaction (Debit)

{
"data": [
{
"ref": "D.268rl",
"type": "debit",
"amount": 1000,
"status": "cleared",
"bank_ref": "DT.23rwk",
"category": "payout",
"channels": [
"direct_entry"
],
"cleared_at": "2024-11-18T03:18:41Z",
"created_at": "2024-11-18T03:16:32Z",
"matures_at": "2024-11-17T13:00:00Z",
"parent_ref": "PB.oc4k",
"party_name": "John Doe",
"description": "Webhook data structure (approved status)",
"party_bank_ref": null,
"party_nickname": null,
"bank_account_id": "6b415531-aa2e-48fe-a69d-08bea2ee1190",
"current_channel": "direct_entry",
"party_contact_id": "5a087832-a741-41a2-a51f-35d3e7f4d28b",
"status_changed_at": "2024-11-18T03:18:41Z"
}
],
"event": {
"at": "2024-11-18T03:18:41Z",
"who": {
"account_id": "38bc6f3b-14fe-4998-be48-4b66b42fd363",
"account_type": "Account",
"bank_account_id": "6b415531-aa2e-48fe-a69d-08bea2ee1190",
"bank_account_type": "BankAccount"
},
"type": "debit.cleared"
}
}

Successful transaction (Credit)

{
"data": [
{
"ref": "C.2efmb",
"type": "credit",
"amount": 1000,
"status": "cleared",
"bank_ref": "CT.27vkd",
"category": "payout",
"channels": [
"direct_entry"
],
"cleared_at": "2024-11-18T03:20:41Z",
"created_at": "2024-11-18T03:16:32Z",
"matures_at": "2024-11-18T03:18:41Z",
"parent_ref": "PB.oc4k",
"party_name": "Caroline's Test Account",
"description": "Webhook data structure (approved status)",
"party_bank_ref": "DT.23rwk",
"party_nickname": "Caroline_Test_Account",
"bank_account_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"current_channel": "direct_entry",
"party_contact_id": null,
"status_changed_at": "2024-11-18T03:20:41Z"
}
],
"event": {
"at": "2024-11-18T03:20:41Z",
"who": {
"account_id": "0976e199-c516-4e17-a6d4-df083e234144",
"account_type": "AnyoneAccount",
"bank_account_id": "07e3c78e-1d51-4196-834c-8f586d215b46",
"bank_account_type": "BankAccount"
},
"type": "debtor_credit.cleared"
}
}

If the payment fails, no request will have ever been created. The api will simply return a 400 error code. Zepto has a list of transaction failure codes that you can use to simulate a failed payment.

Did this answer your question?