Internal Transfers
Overview
Internal transfers can be made back and forth between:
- A Main Balance and a Pot.
- Pots.
- A Main Balance and a User Account or Sub-Account.
The following guide explains how the operations outlined above are carried out.
1. Transfer funds from the main balance to a new or existing Pot
- Call
POST - Move Funds between Pots
. - Enter the
FromCurrency
. This is the pot to transfer funds from. For main GBP balance, enter 'GBP'. - Enter the
ToCurrency
. This is the pot to transfer funds to. - Enter the
amount
. This is the amount to transfer from the main balance to the desired pot.
REQUEST
As shown below, a transfer is made from the main GBP balance in the account to the pot named 'POTBC-GBP' in the amount of 10 GBP.
curl --location 'https://caxapi-integration.azurewebsites.net/api/account/balances/third-party/movement' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <access_token>' \
--header 'userapitoken: <userapitoken>' \
--data '{
"FromCurrency":"GBP",
"ToCurrency":"POTBC-GBP",
"Amount":"10"
}'
RESPONSE
As illustrated below, the main balance is shown first, followed by the pot balance the funds are transferred to, indicating the operation is carried out successfully:
{
"Content": {
"Model": {
"Balances": [
{
"Balance": 1040.31,
"CcyCode": "GBP",
"BaseCcyCode": "GBP",
"AlphabeticCode": "GBP",
"Description": "British Pound Sterling",
"NumericCode": "826",
"Symbol": "£",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
{
"Balance": 30.00,
"CcyCode": "POTBC-GBP",
"BaseCcyCode": "GBP",
"FriendlyName": "userone",
"AlphabeticCode": "GBP",
"Description": "British Pound Sterling",
"NumericCode": "826",
"Symbol": "£",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
}
],
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"ExpectedResponses": [
"IsValid"
]
},
"AuthorisedClientModel": {
"ClientId": "<clientid>",
"ClientRef": "<clientref>",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"AuthorisedUserModel": {
"UserId": "<userid>",
"AppVersion": null,
"TokenStartDate": "2023-11-13T00:00:00",
"TokenEndDate": "2023-12-13T00:00:00",
"LoginTimestamp": "2023-12-01T20:45:14.7858085",
"ApiLoginType": 0,
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
}
}
2. Transfer funds from an existing Pot to a new or existing Pot
- Using
POST - Move Funds between Pots
- Enter the
FromCurrency
. This is the pot to transfer funds from. - Enter the
ToCurrency
. This is the pot to transfer funds to. - Enter the
amount
. This is the amount to transfer, from one pot to another.
REQUEST
As shown below, a transfer from pot "POTBC-GBP" is being made to "IP-GBP" in the amount of 10 GBP.
curl --location 'https://caxapi-integration.azurewebsites.net/api/account/balances/third-party/movement' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <access_token>' \
--header 'userapitoken: <userapitoken>' \
--data '{
"FromCurrency":"POTBC-GBP",
"ToCurrency":"IP-GBP",
"Amount":"10"
}'
RESPONSE
A successful response is shown below:
{
"Content": {
"Model": {
"Balances": [
{
"Balance": 20.00,
"CcyCode": "POTBC-GBP",
"BaseCcyCode": "GBP",
"FriendlyName": "userone",
"AlphabeticCode": "GBP",
"Description": "British Pound Sterling",
"NumericCode": "826",
"Symbol": "£",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
{
"Balance": 1924.55,
"CcyCode": "IP-GBP",
"BaseCcyCode": "GBP",
"AlphabeticCode": "GBP",
"Description": "British Pound Sterling",
"NumericCode": "826",
"Symbol": "£",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
}
],
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"ExpectedResponses": [
"IsValid"
]
},
"AuthorisedClientModel": {
"ClientId": "<clientid>",
"ClientRef": "<clientref>",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"AuthorisedUserModel": {
"UserId": "<userid>",
"AppVersion": null,
"TokenStartDate": "2023-11-13T00:00:00",
"TokenEndDate": "2023-12-13T00:00:00",
"LoginTimestamp": "2023-12-01T20:45:14.7858085",
"ApiLoginType": 0,
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
}
}
3. Transfer funds to a User Account or Sub-Account
Currency balance transfers between accounts are made via the POST - Transfer funds to an account
endpoint. The following information must be entered:
UserID
. This is the account to transfer funds to. Can be a User account or Sub-Account.SendAmount
. The amount to send to the recipient.SendCurrency
. The currency balance from where the funds are debited.
REQUEST
As shown below, we are making a transfer to the User [email protected]
in the amount of 10 GBP, and the amount is being deducted from the Main GBP balance.
curl --location 'https://caxapi-integration.azurewebsites.net/api/account/balances/third-party/transfer' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <access_token>' \
--header 'userapitoken: <userapitoken>' \
--data-raw '{
"UserID":"[email protected]",
"SendAmount":"10",
"SendCurrency":"GBP"
}'
RESPONSE
{
"Content": {
"Model": {
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"ExpectedResponses": [
"IsValid"
]
},
"AuthorisedClientModel": {
"ClientId": "<clientid>",
"ClientRef": "<clientref>",
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
},
"AuthorisedUserModel": {
"UserId": "<userid>",
"AppVersion": null,
"TokenStartDate": "2023-11-13T00:00:00",
"TokenEndDate": "2023-12-13T00:00:00",
"LoginTimestamp": "2023-12-01T20:45:14.7858085",
"ApiLoginType": 0,
"ApiStatusCode": 100,
"ApiStatus": "IsValid",
"ApiStatusDescription": "Valid Operation"
}
}
Updated 10 months ago