Tutorial: Create Savings Account Charge

Add a charge into savings account

Step 1: Apply Charge into Savings Account

To add a charge to savings account:

curl --request POST \
  --url 'https://{{host}}/v1/savingsaccounts/{{savingsId}}/charges' \
  --header 'Authorization: Bearer your-token' \
  --header 'Content-Type: application/json' \
  --data '{
   "chargeId":548,
   "amount":"2.68",
   "locale":"en",
   "dateFormat":"dd MMMM yyyy",
   "dueDate":"08 April 2024"
} '

Fields Detail

FieldDetail
savingsIdSavings ID to apply charge
chargeIdCharge to be applied into this savings account

Step 2: Get Savings Account Charges

Get savings account including charges

curl --request GET \
  --url 'https://{{host}}/v1/savingsaccounts/{{savingsId}}?associations=charges' \
  --header 'Authorization: Bearer your-token'