Webhook Event Response

Below is a list of webhook event payloads that we currently have:

  • Customer Payload Event
  • Payment Method Payload Event
  • Invoice Status Payload Event
  • Credit Note Payload Event

Customer Payload Event

{
  "requestId": "8c5fd748-85bc-4d57-aaf8-bcad970b1b8d",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "CUSTOMER_CREATE",
  "createdOn": "2019-09-06T03:47:50.735",
  "data": {
    "id": "2508652d-3919-4718-97a6-662bb76eb5ea",
    "createdOn": "2019-09-06T03:47:50.690",
    "number": "EZY138301",
    "referenceCode": "test12345",
    "firstName": "test002",
    "lastName": "test002",
    "email": "[email protected]",
    "companyName": null,
    "mobilePhone": null,
    "homePhone": null,
    "gender": null,
    "dateOfBirth": null,
    "address": null,
    "metadata": null
  }
}
{
  "requestId": "1089dafb-2b46-4cf8-9def-e3f5c2e65001",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "CUSTOMER_UPDATE",
  "createdOn": "2019-09-06T03:51:10.447",
  "data": {
    "id": "2508652d-3919-4718-97a6-662bb76eb5ea",
    "createdOn": "2019-09-06T03:47:50.690",
    "number": "EZY138301",
    "referenceCode": null,
    "firstName": "test003",
    "lastName": ".",
    "email": "[email protected]",
    "companyName": null,
    "mobilePhone": null,
    "homePhone": null,
    "gender": null,
    "dateOfBirth": null,
    "address": null,
    "metadata": null
  }
}

Payment Method Payload Event

{
  "requestId": "88269b5b-a62d-48a8-b3e3-ed60ef85d4ba",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "PAYMENT_METHOD_INVALID",
  "createdOn": "2019-09-05T07:56:04.388",
  "data": {
    "customerId": "edc4ea95-56ba-4e96-a534-3b52c8feb5e7",
    "paymentMethodToken": "f2bc2468-4449-420a-a3d2-45d4af4ed619",
    "type": "CARD",
    "bank": null,
    "card": {
      "first6": "559639",
      "last4": "7872",
      "accountHolderName": "test0001",
      "type": "MASTERCARD",
      "expiryMonth": "10",
      "expiryYear": "22"
    },
    "invalidReason": {
      "code": "bank_system_error",
      "description": "An error occurred while processing the transaction. Please contact Ezypay support."
    },
    "lastUsedOn": "2019-09-05T07:55:42.749",
    "valid": false,
    "primary": false
  }
}
{
  "requestId": "74417c7f-2220-43ac-aeab-eade6a5e6c20",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "PAYMENT_METHOD_REPLACED",
  "createdOn": "2019-09-05T08:20:17.850",
  "data": {
    "customerId": "edc4ea95-56ba-4e96-a534-3b52c8feb5e7",
    "paymentMethodToken": "f2bc2468-4449-420a-a3d2-45d4af4ed619",
    "type": "CARD",
    "bank": null,
    "card": {
      "first6": "559639",
      "last4": "7872",
      "accountHolderName": "test0001",
      "type": "MASTERCARD",
      "expiryMonth": "10",
      "expiryYear": "22"
    },
    "invalidReason": {
      "code": "bank_system_error",
      "description": "An error occurred while processing the transaction. Please contact Ezypay support."
    },
    "lastUsedOn": "2019-09-05T07:55:42.749",
    "valid": false,
    "primary": true
  }
}

Invoice Status Payload Event

{
  "createdOn": "2019-09-03T06:24:54.175",
  "requestId": "4e933221-33e62-4b9e-VA1b-abcdefsa12129ce",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "INVOICE_CREATED",
  "data": {
    "id": "1f567c84-00a3-4a22-9ec9-c5e8211d5c3f",
    "documentNumber": "IN0000000000000070",
    "date": "2019-09-03",
    "dueDate": "2019-09-03",
    "scheduledPaymentDate": null,
    "status": "PROCESSING",
    "memo": null,
    "items": [
      {
        "description": "Standard Master/Visa Fee",
        "amount": {
          "currency": "AUD",
          "value": 0.87,
          "type": null
        },
        "tax": {
          "rate": 0.1
        },
        "id": "fcab35bf-1bb5-4bdd-890e-bc00c7917106",
        "type": "transaction_fee",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      },
      {
        "description": "Testing",
        "amount": {
          "currency": "AUD",
          "value": 100,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "34c62b5b-e959-4e28-aacf-e9b11c044668",
        "type": "on_demand_payment",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
       },
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 100.87,
      "type": null
    },
    "amountWithoutDiscount": {
      "currency": "AUD",
      "value": 100.87,
      "type": null
    },
    "totalDiscounted": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalRefunded": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
     "value": 0,
      "type": null
    },
    "customerId": "8aed9ed0-e8d7-45c9-b51b-f440c9a7c12d",
    "subscriptionId": null,
    "subscriptionName": null,
    "paymentMethodToken": "390074ca-a23c-4cfd-9f13-1303b52441cb",
    "autoPayment": true,
      "checkoutId": null,
    "createdOn": "2019-09-03T06:24:53.838"
  }
}
{
  "createdOn": "2019-09-03T06:24:55.424",
  "requestId": "4e933221-33e62-4b9e-VA1b-abcdefsa12129ce",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "INVOICE_PAID",
  "data": {
    "id": "1f567c97-11s4-4215-9ec9-c5e4332d5c3f",
    "documentNumber": "IN0000000000000070",
    "date": "2019-09-03",
    "dueDate": "2019-09-03",
    "scheduledPaymentDate": null,
    "status": "PAID",
    "memo": null,
    "items": [
      {
        "description": "Standard Master/Visa Fee",
        "amount": {
          "currency": "AUD",
          "value": 0.87,
          "type": null
        },
        "tax": {
          "rate": 0.1
        },
        "id": "fcab35bf-1bb5-4bdd-890e-bc00c7917106",
        "type": "transaction_fee",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      },
      {
        "description": "Testing",
        "amount": {
          "currency": "AUD",
          "value": 100,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "34c62b5b-e959-4e28-aacf-e9b11c044668",
        "type": "on_demand_payment",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 100.87,
      "type": null
    },
    "amountWithoutDiscount": {
      "currency": "AUD",
      "value": 100.87,
      "type": null
    },
    "totalDiscounted": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalRefunded": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "customerId": "8aed9ed0-e8d7-45c9-b51b-f440c9a7c12d",
    "subscriptionId": null,
    "subscriptionName": null,
    "paymentMethodToken": "390074ca-a23c-4cfd-9f13-1303b52441cb",
    "autoPayment": true,
    "createdOn": "2019-09-03T06:24:53.838"
    "payNowUrl": null,
		"channel": "api",
      "checkoutId": null
  }
}
{
 "createdOn": "2019-09-03T07:43:59.281",
  "requestId": "4e933221-33e62-4b9e-VA1b-abcdefsa12129ce",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "INVOICE_PAST_DUE",
  "data": {
    "id": "fb650d19-0867-4d1d-aefe-2add2ef81917",
    "documentNumber": "IN0000000000000071",
    "date": "2019-09-03",
    "dueDate": "2019-09-03",
    "scheduledPaymentDate": null,
    "status": "PAST_DUE",
    "memo": null,
    "items": [
      {
        "description": "Standard Master/Visa Fee",
        "amount": {
          "currency": "AUD",
          "value": 0.93,
          "type": null
        },
        "tax": {
          "rate": 0.1
        },
        "id": "dd13224e-9ab7-42b2-a58d-06ac39a80357",
        "type": "transaction_fee",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      },
      {
        "description": "Load Fee",
        "amount": {
          "currency": "AUD",
          "value": 2,
          "type": null
        },
        "tax": {
          "rate": 0.1
        },
        "id": "dc6591b8-857e-4dab-be8e-391161ddcba6",
        "type": "load_fee",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      },
      {
        "description": "Testing",
        "amount": {
          "currency": "AUD",
          "value": 115,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "41d51f9a-5422-40a5-9b93-0d5f59795f67",
        "type": "on_demand_payment",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      },
      {
        "description": "Failed Payment Fee",
        "amount": {
          "currency": "AUD",
          "value": 8.5,
          "type": null
        },
        "tax": {
          "rate": 0.1
        },
        "id": "78db575b-3556-42e2-af26-06845730061e",
        "type": "failed_payment_fee",
        "discounted": {
          "currency": "AUD",
          "value": 0,
          "type": null
        },
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 126.43,
      "type": null
    },
    "amountWithoutDiscount": {
      "currency": "AUD",
      "value": 126.43,
      "type": null
    },
    "totalDiscounted": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalRefunded": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 0.01,
      "type": null
    },
    "customerId": "5cec4c07-758a-4601-9137-11c7caa984bd",
    "subscriptionId": null,
    "subscriptionName": null,
    "paymentMethodToken": "21c23c7d-9ed6-4354-83e9-6fffd6f3df9c",
    "autoPayment": false,
    "createdOn": "2019-09-03T07:43:36.910",
    "failedPaymentReason": {
      "code": "bank_system_error",
      "description": "An error occurred while processing the transaction. Please contact Ezypay support."
    },
    "paymentProviderResponse": {
      "code": "3 (14)",
      "description": "14: : Unknown"
    },
      "payNowUrl": null,
"channel": "api",
"manualRetryPossible": false,
"paymentMethodInvalid": true,
  "checkoutId": null
  }
}

Credit Note Payload Event

{
  "requestId": "a2e335d3-2d82-4e01-bb66-929d92e1b248",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "CREDIT_NOTE_CREATED",
  "createdOn": "2019-09-05T07:53:06.074",
  "data": {
    "id": "6bfc270d-1507-4643-96d5-244d637b4386",
    "invoiceId": "e1b60dc7-bd01-4ad6-beb4-ab9ef677eae8",
    "documentNumber": "CN0000000000000039",
    "date": "2019-09-05",
    "status": "PROCESSING",
    "items": [
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 140,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "7d0d76d2-fe7c-4bc0-ad3a-a7953d38795f",
        "type": "on_demand_payment",
        "accountingCode": null
      },
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 2.09,
          "type": null
        },
        "tax": {
          "rate": 10
        },
        "id": "9dd5a64e-ced8-4538-b90b-31d50b04504f",
        "type": "transaction_fee",
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 142.09,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 12.92,
      "type": null
    },
    "reason": "REFUND",
    "customerId": "edc4ea95-56ba-4e96-a534-3b52c8feb5e7",
    "paymentMethodToken": "d49262fc-03f9-4fbf-883c-c4549529f605"
  }
}
{
  "requestId": "7a18cda5-51a1-4b29-9074-d8909ef74459",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "CREDIT_NOTE_PAID",
  "createdOn": "2019-09-05T07:19:55.458",
  "data": {
    "id": "8bbe3746-72ca-48a3-843a-c8f9f53213d1",
    "invoiceId": "9c710eff-e4d2-4d09-8196-0cbb43940823",
    "documentNumber": "CN0000000000000036",
    "date": "2019-09-05",
    "status": "PAID",
    "items": [
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 115,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "ada7e00c-aa14-4bcb-8b73-e0a027b47ce7",
        "type": "on_demand_payment",
        "accountingCode": null
      },
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 1.71,
          "type": null
        },
        "tax": {
          "rate": 10
        },
        "id": "5843025e-f93d-458a-b9d8-9df0ab5a3e17",
        "type": "transaction_fee",
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 116.71,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 10.61,
      "type": null
    },
    "reason": "REFUND",
    "customerId": "edc4ea95-56ba-4e96-a534-3b52c8feb5e7",
    "paymentMethodToken": "d2ad3750-1385-4eab-8848-de3f7c31260a"
  }
}
{
  "requestId": "c1da2326-8409-4881-b0b8-da2c5481137a",
  "merchantId": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
  "eventType": "CREDIT_NOTE_FAILED",
  "createdOn": "2019-09-05T07:53:07.191",
  "data": {
    "id": "6bfc270d-1507-4643-96d5-244d637b4386",
    "invoiceId": "e1b60dc7-bd01-4ad6-beb4-ab9ef677eae8",
    "documentNumber": "CN0000000000000039",
    "date": "2019-09-05",
    "status": "FAILED",
    "items": [
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 140,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "7d0d76d2-fe7c-4bc0-ad3a-a7953d38795f",
        "type": "on_demand_payment",
        "accountingCode": null
      },
      {
        "description": "Refund",
        "amount": {
          "currency": "AUD",
          "value": 2.09,
          "type": null
        },
        "tax": {
          "rate": 10
        },
        "id": "9dd5a64e-ced8-4538-b90b-31d50b04504f",
        "type": "transaction_fee",
        "accountingCode": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 142.09,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 12.92,
      "type": null
    },
    "reason": "REFUND",
    "customerId": "edc4ea95-56ba-4e96-a534-3b52c8feb5e7",
    "paymentMethodToken": "d49262fc-03f9-4fbf-883c-c4549529f605"
  }
}

Partner Invoice Event

📘

NOTE

The "issuerMerchant" will be the merchant that is looking to get partner amount from the main merchant account. The "recipientMerchant" will be the Main merchant wallet account. When an amount is required to be transfer from the parent/master account to the child/sub account, the child/sub account will need to generate a partner invoice to request that amount from the parent/master account.

Prerequisite:
The webhook event needs to be subscript on the child/sub account:
a) partner_invoice_created
b) partner_invoice_paid
c) partner_invoice_past_due

A best practice would be to add this subscribe the webhook events using the parent/master webhook response endpoint.

{
  "requestId": "cb456207-603d-410b-a2cf-76fdc4d11943",
  "merchantId": "928a2705-06e8-416e-acc9-c71ab7b8f266",
  "eventType": "PARTNER_INVOICE_CREATED",
  "createdOn": "2019-09-30T02:01:54.126",
  "data": {
    "id": "51c94bf1-f2b7-47a7-84c7-eae062b72186",
    "documentNumber": "IN0000000000000532",
    "date": "2019-09-30",
    "dueDate": "2019-09-30",
    "status": "PROCESSING",
    "memo": "Testing module 123",
    "items": [
      {
        "description": "Testing 123",
        "amount": {
          "currency": "AUD",
          "value": 5,
          "type": null
        },
        "tax": {
          "rate": 0
        },
        "id": "7fa2001a-6a92-46e6-81bc-986a9c91e3e3",
        "type": "partner_on_demand",
        "accountingCode": null,
        "additionalDetail": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 5,
      "type": null
    },
    "totalTax": {
      "currency": "AUD",
      "value": 0,
      "type": null
    },
    "issuerMerchant": {
      "id": "928a2705-06e8-416e-acc9-c71ab7b8f266",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "recipientMerchant": {
      "id": "1aefbba9-263a-484f-8ba1-1b074b8c1493",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "createdOn": "2019-09-30T02:01:54.095",
    "countryCode": "AU",
    "partnerSubscriptionId": null
  }
}
{
  "requestId": "2826dcc2-a56a-4154-9a00-402418dd2f83",
  "merchantId": "928a2705-06e8-416e-acc9-c71ab7b8f266",
  "eventType": "PARTNER_INVOICE_PAID",
  "createdOn": "2019-09-30T02:01:54.725",
  "data": {
    "id": "51c94bf1-f2b7-47a7-84c7-eae062b72186",
    "documentNumber": "IN0000000000000532",
    "date": "2019-09-30",
    "dueDate": "2019-09-30",
    "status": "PAID",
    "memo": "Testing module 123",
    "items": [
      {
        "description": "Testing 123",
        "amount": {
          "currency": "AUD",
          "value": 5
        },
        "tax": {
          "rate": 0
        },
        "id": "7fa2001a-6a92-46e6-81bc-986a9c91e3e3",
        "type": "partner_on_demand",
        "accountingCode": null,
        "additionalDetail": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 5
    },
    "totalTax": {
      "currency": "AUD",
      "value": 0
    },
    "issuerMerchant": {
      "id": "928a2705-06e8-416e-acc9-c71ab7b8f266",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "recipientMerchant": {
      "id": "928a2705-06e8-416e-acc9-c71ab7b8f266",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "createdOn": "2019-09-30T12:01:54.717",
    "countryCode": "AU",
    "partnerSubscriptionId": null
  }
}
{
  "requestId": "d11f13d3-4b8a-4aee-a866-4ae91edeb4dd",
  "merchantId": "928a2705-06e8-416e-acc9-c71ab7b8f266",
  "eventType": "PARTNER_INVOICE_PAST_DUE",
  "createdOn": "2019-09-30T02:12:36.141",
  "data": {
    "id": "dead5b48-484c-4b38-8b80-ec91b42e71e0",
    "documentNumber": "IN0000000000000533",
    "date": "2019-09-30",
    "dueDate": "2019-09-30",
    "status": "FAILED",
    "memo": "Testing module 123",
    "items": [
      {
        "description": "Testing 123",
        "amount": {
          "currency": "AUD",
          "value": 10
        },
        "tax": {
          "rate": 0
        },
        "id": "8c965a5c-2e8b-4e3a-8110-d86c9b970f89",
        "type": "partner_on_demand",
        "accountingCode": null,
        "additionalDetail": null
      }
    ],
    "amount": {
      "currency": "AUD",
      "value": 10
    },
    "totalTax": {
      "currency": "AUD",
      "value": 0
    },
    "issuerMerchant": {
      "id": "928a2705-06e8-416e-acc9-c71ab7b8f266",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "recipientMerchant": {
      "id": "928a2705-06e8-416e-acc9-c71ab7b8f266",
      "name": "Justin Test",
      "legalName": "Justin Test"
    },
    "createdOn": "2019-09-30T12:12:36.116",
    "countryCode": "AU",
    "partnerSubscriptionId": null
  }
}