Use the submitTransaction endpoint to make an international transaction to bank accounts and get a transaction PIN.
Ensure that you pass the exchange rates with less than two decimal places. Also, pass only the exchange rate and destination amount for accuracy.
Provide a call-back URL that can be used to timely notify you of any change in the transaction status.
The transaction status should be queried using getTransactionStatus to get the correct status of a transaction.
All transactions return a transaction PIN regardless of the status of the transaction. Always check the message and its content for status.
If the response message states “Limit Exceeded or Company Limit Exceeded,” do not re-submit or re-process the transaction as such transaction would already have been queued up on the Nairagram basket platform.
For the error “201- Awaiting bank response”, perform the Get Transaction Status operation to get the most current status on the transaction.
If you receive an error message and the content says “do not initiate this transaction again,” perform the Get Transaction Status operation before reinitiating the transaction.
Ensure that you add the mandatory “tocurrency” field for making USD bank deposits for the countries that accept USD bank deposits.
Before submitting any transaction, verify that the account provided by the customer is a USD bank account and not a local currency account. For example, Nigerian Naira).
Syntax
POST https://nairagrambasket.com/api/submitTransaction
Response Codes
The following table lists the status codes that are returned in response to the submitTransaction request.
Code | Description |
---|---|
200 | Success |
201 | Success – pending payout to beneficiation Note: Do not retry the transaction. |
400 | Invalid request |
401 | Unauthorized error “Invalid Token” |
403 | Forbidden – “You are not allowed to use this service” |
440 | Failed – “Invalid bank account number” Note: Before re-initiating, editing, or canceling any transaction with the error “440, please do Get Transaction Status to confirm the updated status.” |
Input Parameter
The following table lists the parameters that you need to provide in the submitTransaction request.
Field | Value Format | Required/Optional | Description |
---|---|---|---|
username | mail@mail.com | Required | Input the valid email address that you submitted to your Partner Company. |
password | yourPassword | Required | Input your secure password. |
secretKey | yourSerectKey | Required | Input the API key provided to you by your Partner Company. |
senderfirstname | firstName | Required | Input the first name of the sender. For example, Jane. |
senderlastname | lastName | Required | Input the last name of the sender. For example, Doe. |
senderemail | sendermail@mail.com | Required | Input the email address of the sender. |
senderphone | 07011111111 | Required | Input the valid phone number of the sender. When unavailable, use the default phone number: 11111111111. |
senderaddress | No 5, Address street | Required | Input the valid address of the sender. |
sendercountry | US | Required | Input the code for the sender’s country in ISO ALPHA-2 format. For example, US, GB, CA. |
sendercity | Dallas | Required | Input the name of the sender’s city. |
sendfromstate | TX | Required | Input a 2-letter abbreviation of the sender’s state. For example, TX, NY, WA. Non-US default: 01. |
senderpostalcode | 178980 | Required | Input the sender’s postal code. |
dateofbirth | 1968-02-05 | Required | Input the date of birth of the sender in the valid format: YYYY-MM-DD. |
tofirstname | beneficiaryFirstName | Required | Input the beneficiary’s first name. For example, John. |
tolastname | beneficiaryLastName | Required | Input the beneficiary’s last name. For example, Doe. |
tocountry | NG | Required | Input the code for the beneficiary’s country in ISO ALPHA-2 format. For example, NG, GH, KE. |
tobankaccountname | AccountFullName | Required | Input the valid bank account name of the beneficiary’. For example, Jane Doe. |
tobankaccountnumber | 0690000004 | Required | Input the valid account number of the beneficiary. Please use the test bank details provided in the description. For SEPA payment, please input the IBAN number. |
tobankname | Access Bank Plc | Required | Input the valid bank name of the beneficiary. Please use the test bank details provided in the description. Note: For SEPA and Europe payment, replace with “iban” |
tobankcode | 044 | Required | Input the valid bank code of the beneficiary’s bank. Please use the test bank details provided in the description. Note: For SEPA and Europe payment, replace with “bic” or bank number for the countries requiring one. |
fromamount | 300 | Required | Input an amount to send. The minimum value is $10 USD. |
exchangerate | 454 | Required | Input the exchange rate. |
fees | 10 | Optional | Input the fees. The default fee is 0 unless specified. |
transaction_number | 123456784568 | Required | Indicates the transaction number that can be of 10 to 25 characters. |
fromcurrency | USD | Required | It can also be the settlement currency per your agreement. For example, USD, GBP, CAD, EUR. |
tocurrency | USD | Optional | The settlement currency in eIther USD, GBP, CAD, or EUR based on your agreement. |
customerid | Assigned sender’s unique number | Optional | This is required for SEPA payment. Note: This is not a transaction reference but is unique for each sender. |
partytype | “PERSON” or “ORGANISATION” | Optional | Indicates the sender type – a “PERSON” or “ORGANISATION” |
Sample Request
curl --location --request POST 'https://nairagrambasket.com/api/submitTransaction' \
--form 'username="youremail@mail.com"' \
--form 'password="yourPassword"' \
--form 'secretKey="yourSecretKey"' \
--form 'senderfirstname="NameOne"' \
--form 'senderlastname="NameTwo"' \
--form 'senderemail="senderemail@mail.com"' \
--form 'senderphone="11111111010"' \
--form 'senderaddress="No 1 on Sender Address"' \
--form 'sendercountry="US"' \
--form 'sendercity="City"' \
--form 'sendfromstate="TX"' \
--form 'senderpostalcode="33321"' \
--form 'dateofbirth="1990-01-30"' \
--form 'tofirstname="FirstName"' \
--form 'tolastname="LastName"' \
--form 'tocountry="NG"' \
--form 'tobankaccountname="AccountName"' \
--form 'tobankaccountnumber="0690000005"' \
--form 'tobankname="Access Bank"' \
--form 'tobankcode="044"' \
--form 'fromamount="60"' \
--form 'exchangerate="300.00"' \
--form 'fees="0"' \
--form 'transaction_number="1122000088"' \
--form 'fromcurrency="USD"' \
--form 'settlement_currency="USD"'
Sample Response 1
{
"Code": "200",
"Message": "Success",
"Content": {
transaction_pin: NGN1234567890
}
}
Sample Response 2
{
"Code": "201",
"Message": "Success pending payout to beneficiary",
"Content": {
transaction_pin: NGN1234567890
}
}