Create card transaction with fee
In this example, we will demonstrate how to add account transactions to a card account without creating a reservation first, but including a fee.
If you are working with Tuum setup where card-related accounts are located within Tuum core, you should use the appropriate Account API endpoints instead.
Use case
In this example, the fee is calculated by a system outside the Tuum CMS. Here, the CMS simply records the transaction and the specified fee as provided, without using its own pricing mechanisms.
The card account ID to which the transaction is added.
Transaction type code
Transaction amount
The date on which the transaction is considered effective.
The exact date and time when the transaction was originally created, including time zone.
Transaction details
Merchant information
Account balance must be checked before making the transaction.
The card with ID C001664282660 was used for the transaction.
Note: It is recommended to always provide the card ID. This is necessary to identify the correct card-level price list in cases where multiple cards are associated with the same account.
The account transaction was created by transaction ID-181922 in the external system named ONLINE.
List of fee details related to the transaction, including the fee transaction type code CARD_PUR_FEE, amount 1.50 EUR, and source information ONLINE, reference ID-181922.
Sample API call
To create a card account transaction where the fee calculation is performed in an external system, use the following endpoint:
https://card-api.sandbox.tuumplatform.com/api/v1/accounts/{accountId}/transactions
Learn more about the create card account transaction endpoint in the Tuum developer portal.
Sample request
The sample request body is as follows:
Sample response
Below you will find the response to the API request:
Result
As a result, two transactions were created: a main transaction for 50.00 EUR and a fee transaction for 1.50 EUR, exactly matching the data provided in the input.
Last updated
Was this helpful?