Generic Remittance
Request URL
POST /remittance/:AFiRemittanceId
Description
This endpoint transfers funds to a beneficiary identified by an AFiRemittanceId
. This is a unique ID assigned by your application. The ID is given as a path parameter. The transaction is queued and may be undone before it is completed.
The response indicates success if the request is successfully queued. An undo response object is returned (see Undo) with an undo ID (handle) that may be used to cancel the payment.
Schema
Property table for schema 1 for remittance/:AFiRemittanceId
Property | Description | Required | Schema |
---|---|---|---|
sourceAccountId | ampliFi ID of source account | Yes | { "type": "string" } |
AFiBeneficiaryId | ampliFi ID of the beneficiary | Yes | { "type": "string" } |
amount | Amount | Yes | { "type": "string" } |
currency | 3-letter ISO alphabetic code to identify the currency | Yes | { "type": "string", "pattern": "^[A-Z]{3}$" } |
txnType | Type of transaction | No | { "type": "string", "nullable": true } |
narrativeDebit | A brief description, used if transaction is debit | No | { "type": "string", "nullable": true } |
narrativeCredit | A brief description, used if transaction is credit | No | { "type": "string", "nullable": true } |
extrasDebit | extrasDebit | No | { "type": "string", "nullable": true } |
extrasCredit | extrasCredit | No | { "type": "string", "nullable": true } |
Property table for schema 2 for remittance/:AFiRemittanceId
Property | Description | Required | Schema |
---|---|---|---|
sourceAFiAccountId | ampliFi ID of source account | Yes | { "type": "string" } |
AFiBeneficiaryId | ampliFi ID of the beneficiary | Yes | { "type": "string" } |
amount | Amount | Yes | { "type": "string" } |
currency | 3-letter ISO alphabetic code to identify the currency | Yes | { "type": "string", "pattern": "^[A-Z]{3}$" } |
txnType | Type of transaction | No | { "type": "string", "nullable": true } |
narrativeDebit | A brief description, used if transaction is debit | No | { "type": "string", "nullable": true } |
narrativeCredit | A brief description, used if transaction is credit | No | { "type": "string", "nullable": true } |
extrasDebit | extrasDebit | No | { "type": "string", "nullable": true } |
extrasCredit | extrasCredit | No | { "type": "string", "nullable": true } |
Request Body
{
"sourceAFiAccountId": "qwegal8kgtmysmels",
"AFiBeneficiaryId": "qwepgbenlge48etick",
"amount": 0.01,
"currency": "USD"
}
Snippet Examples
javascript
const axios = require('axios');
const data = {
"sourceAFiAccountId": "qwegal8kgtmysmels",
"AFiBeneficiaryId": "qwepgbenlge48etick",
"amount": 0.01,
"currency": "USD"
};
const config = {
method: 'POST',
url: '${AMPLIFI_BASE_URL}/remittance/:AFiRemittanceId',
headers: {
'Content-Type': "application/json",
'token': "A long random string token received from /token request"
},
data
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "AMPLIFI_BASE_URL/remittance/:AFiRemittanceId" --data "{ \"sourceAFiAccountId\":\"qwegal8kgtmysmels\", \"AFiBeneficiaryId\":\"qwepgbenlge48etick\", \"amount\":0.01, \"currency\":\"USD\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 REMITTANCE/:AFIREMITTANCEID SUCCESSFUL RESPONSE QUEUING REMITTANCE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
token | A long random string token received from /token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
AFiRemittanceId | [required] | qwepgbenlge48etick |
REQUEST BODY
{
"sourceAFiAccountId": "qwegal8kgtmysmels",
"AFiBeneficiaryId": "qwepgbenlge48etick",
"amount": 0.01,
"currency": "USD"
}
RESPONSE BODY