This method initiates a fund transfer between merchant accounts within the same organisation. Transfers are handled entirely on the internal ledger. For payload explanations for both request and response, click here
using OneKhusa.SDK;
using OneKhusa.SDK.Models.Transactions.SingleDisbursements.IntraOrganisation;
using OneKhusa.SDK.Models.Constants.TestAccounts;
//code omitted for brevity
OneKhusaResponse<CreateIntraTransferResponse> response = await client
.Transactions
.SingleDisbursements
.CreateIntraTransferAsync(new CreateIntraTransferRequest
{
TransactionAmount = 50000.00M,
BeneficiaryName = "Branch Operations",
SourceReferenceNumber = "BRFLT001",
BeneficiaryAccountNumber = "52333819",
MerchantAccountNumber = 12345678,
TransactionDescription = "BRANCH FLOAT TOP UP",
CapturedBy = "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};
CollectionTransactionReferenceNumber: {response.Data.CollectionTransactionReferenceNumber};
BeneficiaryMerchantAccountNumber: {response.Data.BeneficiaryMerchantAccountNumber}
""");
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.
Note: BeneficiaryAccountNumber is an 8-digit OneKhusa merchant account, not an external bank or mobile wallet account. Prefer a 5–12 character alphanumeric SourceReferenceNumber. On success (S100), use TransactionReferenceNumber for later lookup; CollectionTransactionReferenceNumber may be empty and BeneficiaryMerchantAccountNumber may be 0.