Transfers
Transfer Money using SP Pay RESTful API.
Validate a Transfer
POST - Validate Transfer
Request to validate a transfer. Validating a transfer performs all the necessary activities prior to submitting the transaction. However, the response is returned without submitting the transaction.
Endpoint
{{sppay-host}}/v1/api/transfers/validate
Request
{
"send_account_no": "1001",
"amount": 2,
"recipient": {
"account": {
"code": "SPP",
"number": "1000"
},
"first_name": "SP Pay",
"last_name": "Cedi Account ",
"town_or_city": "Accra",
"address": "Accra",
"reason_for_sending": "Test",
"country_code": "GH",
"state_or_region_code": "GH-AA",
"id_type": "GHANA_CARD",
"id_reference": "1234"
},
"referece": "test",
"callback_url": "{{sppay-host}}/v1/sp-pay/webhook"
}
Your SP Pay account that will be debited.
The amount you want to send.
Object of recipient details.
Object of recipient account details.
Recipient account code.
Recipient account number.
First name of recipient. Only required for remittance transactions.
Last name of recipient. Only required for remittance transactions.
Town or city of recipient. Only required for remittance transactions.
Address of recipient. Only required for remittance transactions.
Reason for sending the money. Only required for remittance transactions.
Alpha 2 country code of the recipient. Only required for remittance transactions.
State or region code of the recipient. Only required for remittance transactions.
ID type code of the recipient. Only required for remittance transactions.
ID reference of the recipient. Only required for remittance transactions.
Transaction reference which will be sent to recipient via SMS.
URL to which final transaction status and information will be sent to.
Response
{
"external_reference": null,
"type_code": "ITRF",
"type_name": "Internal Transfer",
"debit_currency": "GHS",
"debit_amount": 2,
"credit_currency": "GHS",
"credit_amount": 2,
"rate": 1,
"debit_account_no": 1000,
"debit_account_name": "SP Pay Cedi Account 1",
"debit_account_type_code": "SUBS",
"debit_account_type_name": "Subscriber",
"debit_account_institution_code": "SPP",
"debit_account_institution_name": "SP Pay",
"credit_account_no": 1001,
"credit_account_name": "SP Pay Cedi Account 2",
"credit_account_type_code": "SUBS",
"credit_account_type_name": "Subscriber",
"credit_account_institution_code": "SPP",
"credit_account_institution_name": "SP Pay",
"charge_setting": 2,
"charge_amount": 0.02,
"charge_account": "Debit",
"taxable_amount": 0,
"tax_amount": 0,
"tax_account": "Debit",
"payment_category": null
}
Reference visible to the user and submitted in the request.
Transaction type code.
Full name of the transaction type.
Currency of the debit account.
Amount debited from the debit account.
Currency of the credit account.
Amount credited to the credit account.
Transaction rate. Transaction Rate
= Credit Amount
/ Debit Amount
.
Account number of the debit account.
Name on the debit account.
Type code of the debit account.
Type name of the debit account.
Intitution code of the debit account.
Intitution name of the debit account.
Account number of the credit account.
Name on the credit account.
Type code of the credit account.
Type name of the credit account.
Institution code of the credit account.
Institution name of the credit account.
ID of the charge setting applied.
Amount charged for the transaction. This amount is always in the currency of the charged account below.
Account to which charge is applied. Debit
indicating the Debit Account. Credit
indicating the Credit account.
Amount of the transaction that can be taxed. This is always in the currency of the tax account.
Amount debited from tax account as tax.
Account from which tax is applied. Debit
indicating the Debit Account. Credit
indicating the Credit account.
Object of payment category if a payment category is applied.
Submit a Transfer
POST - Submit Transfer
Request to submit a transfer transaction. This is similar to the validate transfer and performs all the validation activities. In addition to this, the transaction is submitted for processing.
Endpoint
{{sppay-host}}/v1/api/transfers/submit
Request
{
"send_account_no": "1001",
"amount": 2,
"recipient": {
"account": {
"code": "SPP",
"number": "1000"
},
"first_name": "SP Pay",
"last_name": "Cedi Account ",
"town_or_city": "Accra",
"address": "Accra",
"reason_for_sending": "Test",
"country_code": "GH",
"state_or_region_code": "GH-AA",
"id_type": "GHANA_CARD",
"id_reference": "1234"
},
"referece": "test",
"callback_url": "{{sppay-host}}/v1/sp-pay/webhook"
}
Your SP Pay account that will be debited.
The amount you want to send.
Object of recipient details.
Object of recipient account details.
Recipient account code.
Recipient account number.
First name of recipient. Only required for remittance transactions.
Last name of recipient. Only required for remittance transactions.
Town or city of recipient. Only required for remittance transactions.
Address of recipient. Only required for remittance transactions.
Reason for sending the money. Only required for remittance transactions.
Alpha 2 country code of the recipient. Only required for remittance transactions.
State or region code of the recipient. Only required for remittance transactions.
ID type code of the recipient. Only required for remittance transactions.
ID reference of the recipient. Only required for remittance transactions.
User provided reference which will be sent to recipient via SMS.
URL to which final transaction status and information will be sent to.
Response
{
"id": 37,
"reference": "LQP592I3JK",
"external_reference": "",
"primary": 1,
"type_code": "ITRF",
"currency": "GHS",
"amount": "2.00",
"debit_account_name": "SP Pay Cedi Account 1",
"debit_account_no": "1000",
"debit_account_institution_code": "SPP",
"credit_account_name": "SP Pay Cedi Account 2",
"credit_account_no": "1001",
"credit_account_institution_code": "SPP",
"status": 2,
"status_message": "Submitted to queue for processing",
"created_at": "Tue, 05 Mar 2024 18:15:51 GMT",
"updated_at": "Tue, 05 Mar 2024 18:15:51 GMT",
"charge": {
"id": 38,
"reference": "LQP592I3JK",
"external_reference": "",
"primary": 0,
"type_code": "CHRG",
"currency": "GHS",
"amount": "0.02",
"debit_account_name": "SP Pay Cedi Account 1",
"debit_account_no": "1000",
"debit_account_institution_code": "SPP",
"credit_account_name": "SP Pay GHS Suspense Account",
"credit_account_no": "101",
"credit_account_institution_code": "SPP",
"status": 1,
"status_message": "Created. Pending submission",
"created_at": "Tue, 05 Mar 2024 18:15:51 GMT",
"updated_at": "Tue, 05 Mar 2024 18:15:51 GMT",
"payment_category": null,
"pending_actions": []
},
"initiator_id": 1,
"payment_category": null,
"pending_actions": []
}
Unique ID of transaction.
System generated reference of transaction.
User provided reference which will be sent to recipient via SMS.
Flag to indicate whether transaction is a primary transaction or secondary transaction. 1
for primary and 0
for secondary. Secondary transactions are transactions that are generated by system based on certain conditions. E.g. Tax
and Charge
transactions.
Type code of the debit account.
Currency code of the credit amount.
Amount credited to credit account. This is always in the currency of the credit account.
Name on the debit account.
Account number of the debit account.
Institution code of the debit account.
Name on the credit account.
Account number of the credit account.
Insitution code of the debit account
Status ID of the transaction.
Status message of the transaction.
Time the transaction was created.
Time the transaction wass last updated.
Object of the charge transaction. The structure is identical to the transaction object for which it is a part of. It is only returned if a charge exists.
Object of the tax transaction. The structure is identical to the transaction object for which it is a part of. It is only returned if a tax exists.
ID of the user who created or submitted the transaction.
Object of payment category if a payment category is applied.
Array of pending actions.