This method generates a payment receipt for a successful transaction within a batch disbursement. For payload explanations for both request and response, click here
using OneKhusa.SDK; 
using OneKhusa.SDK.Models.Reports.ProofOfPayment; 

//code omitted for brevity 

OneKhusaResponse<GetBatchPayoutTransactionReceiptResponse> response = await client 
    .Reports 
    .ProofOfPayments 
    .GetBatchPayoutTransactionReceiptAsync(new GetBatchPayoutTransactionReceiptRequest 
    { 
        MerchantAccountNumber = 12345678, 
        BatchNumber = 123456, 
        TransactionReferenceNumber = "260219QWSFCT" 
    }); 

if (response is { IsSuccess: true, Data: not null }) 
{ 
    Console.WriteLine($""" 
        DocumentName: {response.Data.DocumentName}; 
        DateCreated: {response.Data.DateCreated}; 
        ContentType: {response.Data.ContentType}; 
        DocumentBase64: {response.Data.DocumentBase64} 
    """); 
    Console.ReadLine(); 
    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();