Step 1: Initiate Outbound Credit Transfer
Overview
To make a payment from one of your account holders to a beneficiary account held at another participant on the scheme, you make an asynchronous request to Electrum. Electrum will immediately acknowledge receipt of the request and then initiate a sequence of calls to the payment scheme in order to process the transaction.
When to debit funds
It is important that you debit your customer's account before sending the credit transfer request to Electrum. This will ensure that the customer has sufficient funds to cover the transaction. Should the transaction be declined for any reason, then you may credit the funds back to the account.
Implementing the API
Send Request
Send anoutboundCreditTransfer
request to Electrum's /transactions/outbound/credit-transfer
endpoint. The full message schema can be found in the API reference documentation. Code and payload samples are shown below.
- Payload
- curl
- Java
- Node.js
- C#
- Go
- Java8+Apache
- Python
application/json
{- "schema": "CreditTransfer",
- "messageIdentifiers": {
- "creationDateTime": "2022-05-04T03:02:01Z",
- "messageIdentification": "uniqueMessageId"
}, - "paymentScheme": {
- "schema": "ZA_RPP"
}, - "amounts": {
- "bankSettlementAmount": {
- "value": 1,
- "currency": "ZAR"
}
}, - "creditor": {
- "legalName": "PersonLegalName",
- "knownAsName": "PersonCommonName"
}, - "creditorAccount": {
- "identification": {
- "schema": "GENERIC",
- "scheme": {
- "schema": "PROPRIETARY",
- "value": "AProprietaryCode123"
}, - "issuer": "Amazing Bank",
- "value": "abcdef987654"
}, - "proxy": {
- "namespace": "NeoBank",
- "schema": "MOBILE",
- "value": "+27-0214620000"
}, - "type": {
- "schema": "CODE",
- "value": "CACC"
}
}, - "creditorAgent": {
- "memberId": "ABSAZAJ"
}, - "debtor": {
- "legalName": "PersonLegalName",
- "knownAsName": "PersonCommonName"
}, - "debtorAccount": {
- "identification": {
- "schema": "GENERIC",
- "scheme": {
- "schema": "PROPRIETARY",
- "value": "AProprietaryCode123"
}, - "issuer": "Amazing Bank",
- "value": "abcdef987654"
}, - "type": {
- "schema": "CODE",
- "value": "CACC"
}
}, - "debtorAgent": {
- "memberId": "FIRNMZM"
}, - "transactionIdentifiers": {
- "endToEndIdentification": "uniqueEndToEndId",
- "transactionIdentification": "RRN000000001",
- "uetr": "f27a34ad-c5ab-4b70-a3f9-946d743eaeaa"
}, - "instructingAgent": {
- "memberId": "FIRNMZM"
}, - "instructedAgent": {
- "memberId": "ABSAZAJ"
}, - "supplementaryData": {
- "customData1": "My custom data 1",
- "customData2": "My custom data 2"
}
}
Receive Acknowledgement
Electrum will respond with an HTTP202
status if the request can be processed successfully, or an error response if a problem occurs.Timeout
If you don't receive any response from Electrum — this may happen because of a networking issue or other technical error — then you may retry the request. The recommended procedure is to retry the operation with the same payload up to 3 times at 1 second intervals, until you receive a202
response. Idempotency
The
outboundCreditTransfer
operation is idempotent. This means it is safe for you to send retries. If Electrum has already received the original message, then a retry of the same message will be recognised as a duplicate and will not affect the processing of the transaction.