How To Return Receivable Contact Payments?
This article will guide you on on how to return PayID payments from contacts.
This article will guide you on on how to return PayID payments from contacts.
There can be times when the merchants may have a need to reject some payments coming through PayId. This article outlines the process that you need to follow in order to reject these payments.
By subscribing to our webhook events, you can monitor the status of every transaction and trigger the appropriate events. We have some great articles that explain how you can subscribe to webhook events and which events should be expected in certain scenarios.
Extract the relevant fields
Every webhook will include metadata that contains various fields such as account id, BSB, account number, amount etc.
{
"data": [
{
"ref": "C.518k",
"type": "credit",
"amount": 5,
"status": "cleared",
"bank_ref": "CT.4fqn",
"category": "payout",
"channels": ["float_account"],
"metadata": {
"npp_alias_type": "/EMAL",
"npp_alias_value": "[email protected]",
"npp_debtor_name": "Hunter Thompson",
"npp_debtor_legal_name": "Hunter Thompson",
"npp_payment_reference": "Test Payment",
"npp_debtor_branch_code": "014209",
"npp_payment_description": "Test Payment",
"npp_debtor_account_number": "12345678",
"npp_payment_transaction_id": "SPPYAU22XXXN20210219"
},
"cleared_at": "2021-02-19T05:25:32Z",
"created_at": "2021-02-19T05:25:24Z",
"matures_at": "2021-02-19T05:25:25Z",
"parent_ref": "PR.18eu",
"party_name": "PayID_contact",
"description": "Payment from Hunter Thompsom 014209 12345678",
"party_bank_ref ": DT.4 uyw ",
"party_nickname ":null,
"bank_account_id": "17256c62-7787-4df4-b315-d31aa537b9ca",
"current_channel": "float_account",
"party_contact_id": "6014bb59-2b6a-49ae-8d5b-84962ab70305",
"status_changed_at": "2021-02-19T05:25:32Z"
}
],
"event": {
"at": "2021-02-19T05:25:32Z",
"who": {
"account_id": "a2982a3b-1c9d-42bb-bb6d-ea79d3211fba",
"account_type": "Account",
"bank_account_id": "17256c62-7787-4df4-b315-d31aa537b9ca",
"bank_account_type": "BankAccount"
},
"type": "credit.cleared"
}
}These fields or a combination of fields can be used to identify if a payment can be accepted or needs to be rejected, based on your business rules. For example, you can reject payments from a particular BSB or Account number or set a pre-defined payment amount that will be accepted, anything other than that will be rejected by your system.
Once you have extracted all the relevant fields, you will need to add this bank account as a contact. This can be done using our Add A Contact endpoint. We don't use the email address supplied here for anything and is purely for your reconciliation needs.
{
"name": "Hunter Thompson",
"email": "[email protected]",
"branch_code": "014209",
"account_number": "12345678",
"metadata": {
"custom_key": "Custom string",
"another_custom_key": "Maybe a URL"
}
}You can now make a return payment to the contact you just added, by using our Make a Payment API endpoint. Ensure that the your_bank_account_id is the id related to the float account that original payment was settled into.
{
"description": "Return Payment",
"matures_at": "2021-02-19T00:00:00Z",
"your_bank_account_id": "83623359-e86e-440c-9780-432a3bc3626f",
"payouts": [
{
"amount": 5,
"description": "Returing the Payment SB23094",
"recipient_contact_id": "48b89364-1577-4c81-ba02-96705895d457",
}
]
}Updated 16 days ago