Initiate Transfer Request
You can initiate a payment transaction between an end user's connected bank account to any bank account. A payment link is generated for the user to authorize the transaction. The payment link should be sent to your users via SMS, email, or any communication channel of choice.
1
mutation {
2
initiateTransferRequest(
3
input: {
4
username: "1234567890"
5
sourceAccountNumber: "1234567890"
6
sourceUserId: "dev001"
7
slug: gtbank
8
beneficiary: {
9
name: ""
10
payoutType: thirdParty
11
reference: "ref0001"
12
destinationAccountNumber: "0123456789"
13
destinationBankCode: "035"
14
amount: 10
15
}
16
}
17
)
18
}
19
​
Copied!

Response

1
{
2
"data": {
3
"initiateTransferRequest": "https://authorize.transfers.africa/pay?id=b25ec7853824fe4e6f82ae705535f061efce59c9e8997cb826b2b96b1114eb9d81a6a72cc770183038f50ba0558bf9975adcb8aabf82db2e99381ab48e85278d"
4
}
5
}
Copied!

Additional Authorisation

For Transfers to be able to validate the origin of the payment request, we require a signature sent along in the header of the request. The signature is generated by using your signature/webhook token to compute the HMAC-SHA256 hash of the transfer request arguments in the format stated below:
userId:reference:amountInKobo:destinationAccountNumber:destinationBankCode
The generated signature should be passed with the X-Transfers-Request-Signature request header in the request.
    1.
    You should never make your signature token public.
    2.
    You should never generate your charge request signature on the client-side. Always request the signature from your server and pass it into Transfers.

Request Parameters

Field
Scalar
Required
Description
username
String
Yes
The user's username which is used to login on to the user's bank account internet banking service
sourceAccountNumber
String
Yes
The account number where the amount is to be debited from
sourceUserId
ID
Yes
The unique identifier of the user in the client's service.
slug
BankType
Yes
The slug ID for the bank
beneficiary.name
String
No
This is the user’s name as it appears on the client’s side. This is an optional field. If added in the request then it would be compared with the name on the bank account and if different, payment would not be authorized
beneficiary.payoutType
PayoutType
Yes
If defaultAccount is selected then destinationAccountNumber and destinationBankCode would be ignored and payment would be made to the default account on the merchant's profile. If thirdParty is selected then payment would be made in the destinationAccountNumber and destinationBankCode submitted.
beneficiary.reference
String
Yes
This is a unique identifier for the payment on the client's end
beneficiary.destinationAccountNumber
String
No
This is a bank account number to which the merchant requires the transfer to be made too. This is only required if thirdParty option is selected under payoutType.
beneficiary.destinationBankCode
String
No
The bank code for the destinationAccountNumber
beneficiary.amount
Float
Yes
The amount required to be debited from the user's bank account

Response

Field
Scalar
Required
Description
url
String
Yes
This returns the URL which should be sent to the user for approving the transaction.
​
Last modified 1mo ago