This method approves the posted intra-organisation funds transfer to move funds to the beneficiary merchant account and this is applicable for 4-eye and 6-eye principle workflows. For payload explanations for both request and response, click here
WARNING: Once the transaction has been approved, the funds transfer process cannot be undone or stopped. You will be required to reconcile manually with the beneficiary who received funds to return the funds to your merchant account.
using OneKhusa.SDK;
using OneKhusa.SDK.Models.Transactions.SingleDisbursements.Shared;
//code omitted for brevity
OneKhusaResponse<ApprovePayoutResponse> response = await client
.Transactions
.SingleDisbursements
.ApproveIntraTransferAsync(new ApprovePayoutRequest
{
TransactionReferenceNumber = "260219YXF882",
MerchantAccountNumber = 12345678,
ActionedBy = "joe.doe@example.com"
});
if (response is { IsSuccess: true, Data: not null })
{
Console.WriteLine($"""
MerchantAccountNumber: {response.Data.MerchantAccountNumber};
TransactionReferenceNumber: {response.Data.TransactionReferenceNumber};
ResponseCode: {response.Data.ResponseCode}
""");
return;
}
//it means an error has occurred: RFC7807 compliant error object
Console.WriteLine($"""
Type: {response.Error?.Type};
Title: {response.Error?.Title};
Detail: {response.Error?.Detail};
ErrorCode: {response.Error?.ErrorCode};
Status: {response.Error?.Status};
Instance: {response.Error?.Instance};
Errors: {string.Join(";", response.Error?.Errors ?? [])}
""");
Console.ReadLine();
Note: This method accepts custom idempotency key generated by your system. By default, if not specified, it will create one on your behalf.