Transactions
#
OverviewWith Zūm Rails, there are 2 ways to create transactions: using the portal or via API. When creating a transaction via API, the transaction type (ZumRailsType) must be specified.
There are four transaction types (ZumRailsType):
- FundZumWallet
- WithdrawZumWallet
- AccountsPayable
- AccountsReceivable
info
For accounts payable use-case, Zūm Rails recommends you fund the Zūm Wallet first, so that the money can be quickly moved.
info
For accounts receivable use-case, Zūm Rails recommends you move funds from the User to the Zūm Wallet, then set up an automatic daily withdrawal at the end of each day to your funding source.
#
Creating a new transactionUse this endpoint to create a new transaction.
Method: POST
Endpoint: {{env}}/api/transaction
- If you want to send money from your Funding Source to Zūm Wallet, use
ZumRailsType FundZumWallet and provide:
- FundingSourceId
- WalletId
- If you want to withdraw money from Zūm Wallet to your Funding Source,
use ZumRailsType WithdrawZumWallet and provide:
- FundingSourceId
- WalletId
- If you want to send money (accounts payable) from your Zūm Wallet to a
User, use ZumRailsType AccountsPayable and provide:
- UserId
- PaymentInstrumentId
- WalletId
- If you want to withdraw money (accounts receivable) from a User to your
Zūm Wallet, use ZumRailsType AccountsReceivable and provide:
- UserId
- PaymentInstrumentId
- WalletId
- Request (ACH)
- Request (Debit Card)
- Response
Request parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
ZumRailsType | string | yes | Transaction type |
TransactionMethod | string | yes | Transaction method. |
Amount | decimal | yes | Transaction amount |
Memo | string | yes | Memo description. |
Comment | string | no | Internal comment you might want to add. |
FundingSourceId | guid | no | Funding Source Id |
WalletId | guid | no | Wallet Id |
UserId | guid | no | User Id |
PaymentInstrumentId | string | yes | Payment instrument id |
User | User input | no | It's possible to create a transaction without adding a user first. Simply pass the user object (instead of the UserId) into the transaction body. For reference, check the payload example of the user object here and pass this when you create a transaction. |
ScheduledStartDate | date | no | The date when the transaction will be sent to the financial institution. Must be greater than today |
ClientTransactionId | string | no | This field can be used to store the Transaction id created in your system when the Transaction is initiated |
TransactionMethod
Method | Description |
---|---|
Ach | ACH transaction |
DebitCard | Debit card transaction |
ZumRailsType
Type | Description |
---|---|
FundZumWallet | Send money to your Zūm Wallet |
WithdrawZumWallet | Withdraw from your Zūm Wallet |
AccountsPayable | Execute accounts payable AP |
AccountsReceivable | Execute accounts receivable AR |
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Transaction id |
CreatedAt | datetime | When the transaction was created |
Memo | string | Transaction memo |
Comment | string | Transaction comment |
Amount | decimal | Transaction amount |
Currency | string | Transaction currency |
ZumRailsType | string | Transaction type |
TransactionStatus | string | Indicates the status of the transaction |
FailedTransactionEvent | string | If the transaction has failed, the transaction event that caused it (null otherwise) |
ScheduledStartDate | date | The date on which the transaction will be sent to the financial institution |
ClientTransactionId | string | The Transaction id you informed in the creation of this transaction |
From | string | From description for the transaction |
To | string | To description for the transaction |
FailedAt | datetime | When the transaction was failed (null otherwise) |
TelecheckApprovalCode | string | When the transaction method is ACH with provider Telecheck (null otherwise) |
TelecheckDenialRecordNumber | string | When the transaction method is ACH with provider Telecheck and the transaction was denied (null otherwise) |
PaymentInstrumentId | string | Payment instrument id |
Customer | Basic Customer data | |
Id | guid | Id for the related customer |
CompanyName | string | Company Name |
User | If transaction has a user - * Not all information from a user is returned in this endpoint | |
Id | guid | The user id |
First Name | string | User first name |
Last Name | string | User last name |
Company Name | string | User company name |
IsActive | boolean | Indicates if the user is active or not |
Wallet | If transaction has a wallet * Not all information from a user is returned in this endpoint | |
Id | guid | The wallet id |
Type | string | The wallet type |
FundingSource | If transaction has a funding source * Not all information from a user is returned in this endpoint | |
Id | guid | The funding source id |
Institution | string | The institution name |
InstitutionNumber | string | The institution number |
TransitNumber | string | The transit number |
RoutingNumber | string | The account number |
TargetWallet | If transaction has a target wallet | |
Id | guid | The target wallet id |
Type | string | The target wallet type |
TransactionHistory | List of transaction history events | |
CreatedAt | datetime | When the transaction event happened |
Event | string | The event that happened |
EventDescription | string | The event description |
info
When a transaction is created with a scheduled start date (delay transaction initiation), the transaction will be prepared to be sent to the financial institution according to its scheduled start date.
#
Testing transactionscaution
In a sandbox environment, real bank operations are not performed.
To simulate a failure in a sandbox environment, use one of the keywords (shown below) in the COMMENT field while creating a transaction. If a COMMENT is not provided, or it does not match any of the keywords below, the transaction will eventually change status to "Completed".
Keywords to simulate a transaction failure
Events | Late Failure |
---|---|
AchFailedGeneralError | no |
AchFailedHighRiskOrPotentialFraud | no |
AchFailedDueToNegativeData | no |
AchFailedDueToMerchantSetup | no |
AchFailedDueToProcessorTimeout | no |
AchFailedTransactionExpired | no |
AchFailedPaymentDeclinedByUser | no |
AchFailedTransactionNotAllowed | no |
AchFailedRejectedWithReason | yes |
AchFailedReturnedOrClosedAccount | yes |
DebitCardFailedGeneralError | n/a |
DebitCardFailedPaymentDeclined | n/a |
DebitCardFailedTransactionExpired | n/a |
DebitCardFailedHighRiskOrPotentialFraud | n/a |
- Success
- Failure
tip
To simulate ACH transactions in sandbox, you need to add a bank account with a valid routing-number. The account-number can be any 9-12 digit number.
Some valid routing numbers that will work on the sandbox environment are:
- 122000661
- 026009593
- 063100277
tip
To simulate Debit card transactions in sandbox, you need to add a debit card with a valid number.
Some valid debit card numbers that will work on the sandbox environment are:
- 5102610000000077
- 5102630000000026
- 4000130000000106 ($0.00-$1000.00 - approval)
#
Get a specific transactionUse this endpoint to get information for a specific transaction. Provide the transaction id in the URL.
Method: GET
Endpoint: {{env}}/api/transaction/{transaction_id}
- Response
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Transaction id |
CreatedAt | datetime | When the transaction was created |
Memo | string | Transaction memo |
Comment | string | Transaction comment |
Amount | decimal | Transaction amount |
Currency | string | Transaction currency |
ZumRailsType | string | Transaction type |
TransactionStatus | string | Indicates the status of the transaction |
FailedTransactionEvent | string | If the transaction has failed, the transaction event that caused it (null otherwise) |
ScheduledStartDate | date | The date on which the transaction will be sent to the financial institution |
ClientTransactionId | string | The Transaction id you informed in the creation of this transaction |
From | string | From description for the transaction |
To | string | To description for the transaction |
FailedAt | datetime | When the transaction was failed (null otherwise) |
TelecheckApprovalCode | string | When the transaction method is ACH with provider Telecheck (null otherwise) |
TelecheckDenialRecordNumber | string | When the transaction method is ACH with provider Telecheck and the transaction was denied (null otherwise) |
PaymentInstrumentId | string | Payment instrument id |
Customer | Basic Customer data | |
Id | guid | Id for the related customer |
CompanyName | string | Company Name |
User | If transaction has a user - * Not all information from a user is returned in this endpoint | |
Id | guid | The user id |
First Name | string | User first name |
Last Name | string | User last name |
Company Name | string | User company name |
IsActive | boolean | Indicates if the user is active or not |
Wallet | If transaction has a wallet * Not all information from a user is returned in this endpoint | |
Id | guid | The wallet id |
Type | string | The wallet type |
FundingSource | If transaction has a funding source * Not all information from a user is returned in this endpoint | |
Id | guid | The funding source id |
Institution | string | The institution name |
InstitutionNumber | string | The institution number |
TransitNumber | string | The transit number |
RoutingNumber | string | The account number |
TargetWallet | If transaction has a target wallet | |
Id | guid | The target wallet id |
Type | string | The target wallet type |
TransactionHistory | List of transaction history events | |
CreatedAt | datetime | When the transaction event happened |
Event | string | The event that happened |
EventDescription | string | The event description |
#
Status and eventsZūm Rails offers 6 main statuses for transactions:
Transaction Status
Type | Description |
---|---|
InProgress | Indicates the transaction is being processed |
Completed | Indicates the transaction is completed. |
Failed | Indicates the transaction has failed, this is a permanent status. |
Pending Cancellation | Indicates the transaction is pending cancellation. |
Cancelled | Indicates the transaction has canceled, this is a permanent status. |
Scheduled | Indicates the transaction is scheduled. |
Transaction Events
Zūm Rails also offers detailed transaction events that indicate every step the transaction lifecycle.
Method | Event | Description |
---|---|---|
All | Started | When the transaction started |
All | Succeeded | When the transaction succeeds, when it finishes without any error |
All | WalletFunded | When the transaction funds a wallet |
All | WalletWithdrawn | When the transaction withdrawn a wallet |
------- | ------- | ------- |
ACH | AchTransactionAccepted | When transaction is accepted |
ACH | AchFailedTransactionExpired | When transaction has expired |
ACH | AchFailedReturnedOrClosedAccount | When transaction is returned due to a closed account or any other return reason |
ACH | AchFailedRejectedWithReason | When transaction is rejected for a reason |
ACH | AchFailedGeneralError | When transaction has failed due to general error |
ACH | AchFailedHighRiskOrPotentialFraud | When transaction is rejected as high-risk or potential fraud |
ACH | AchFailedDueToMerchantSetup | When transaction failed because of invalid or inactive merchant id |
ACH | AchFailedInvalidValueForField | When transaction failed due to invalid value for field |
ACH | AchFailedAuthorizationRevoked | When transaction failed because authorization was revoked |
ACH | AchFailedDuplicateTransaction | When transaction failed due to duplicated transaction |
ACH | AchFailedDueToProcessorTimeout | When transaction is not successfully processed due to processor timeout |
ACH | AchFailedTransactionNotAllowed | When transaction is not allowed by provider |
ACH | AchDebitResponseReceived | When response is received for a debit transaction |
ACH | AchCreditResponseReceived | When response is received for a credit transaction |
ACH | AchTransactionReturned | When transaction returned from bank |
ACH | AchTransactionResubmitted | When transaction is resubmitted for processing again |
ACH | AchCancellationFailed | When request to cancel transaction failed |
ACH | AchCancellationFailedDueToMerchantSetup | When request to cancel transaction failed due to merchant setup |
ACH | AchCancellationFailedRefundGreaterThanTransactionAmount | When request to cancel transaction failed as refund amount is bigger than transaction amount |
ACH | AchCancellationFailedTransactionAlreadyCancelled | When request to cancel transaction failed because transaction is already cancelled |
ACH | AchFailedDueToNegativeData | When transaction failed due to negative user data |
ACH | AchFailedIneligibleBankAccount | When transaction failed because bank account is not on ACH network |
------- | ------- | ------- |
DebitCard | DebitCardFailedGeneralError | When transaction has failed due to general error |
DebitCard | DebitCardFailedPaymentDeclined | When transaction is declined by downstream issuer |
DebitCard | DebitCardFailedTransactionExpired | When transaction has expired |
DebitCard | DebitCardFailedHighRiskOrPotentialFraud | When transaction is rejected as high-risk or potential fraud |
#
Search a transactionThis endpoint will return transactions based on the filters applied. Transactions are returned with pagination, which means that if you need to retrieve all transactions you need to call the same endpoint incrementing the CurrentPage.
Method: POST
Endpoint: {{env}}/api/transaction/filter
- Request
- Response
Request parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
Id | guid | no | Transaction id |
GenericSearch | string | no | Filter transactions by user name, user email, client transaction id, transaction id and memo |
ZumRailsType | string | no | Transaction type |
TransactionMethod | string | no | The transaction method |
TransactionStatus | string | no | Transaction status |
FailedTransactionEvent | string | no | Transaction event (column Event from the "Transaction Events" table) |
CreatedAtFrom | datetime | no | Start date (This field is only used when the operator is between) |
CreatedAtTo | datetime | no | End date (This field is only used when the operator is between) |
CreatedAt | datetime | no | Create date |
CreatedAtOperator | string | no | Operator to filter with CreatedAt properties |
UserId | string | no | User id |
ClientTransactionId | string | no | The Transaction id you informed in the creation of the transaction |
Memo | string | no | Memo field |
Comment | string | no | Comment field |
Pagination | no | ||
PageNumber | number | no | The respective page, starting at 1 |
Response
Parameter | Type | Description |
---|---|---|
CurrentPage | number | The current page |
PageSize | number | The amount of rows returned in the current page |
TotalCount | number | The total rows the filter returns |
Items | List of transactions | |
Id | guid | Transaction id |
CreatedAt | datetime | When the transaction was created |
Memo | string | Transaction memo |
Comment | string | Transaction comment |
Amount | decimal | Transaction amount |
Currency | string | Transaction currency |
ZumRailsType | string | Transaction type |
TransactionMethod | string | Transaction method |
TransactionStatus | string | Indicates the status of the transaction |
FailedTransactionEvent | string | If the transaction has failed, the transaction event that caused it (null otherwise) |
ScheduledStartDate | date | The date on which the transaction will be sent to the financial institution |
ClientTransactionId | string | The Transaction id you informed in the creation of the transaction |
TelecheckApprovalCode | string | When the transaction method is ACH with provider Telecheck (null otherwise) |
TelecheckDenialRecordNumber | string | When the transaction method is ACH with provider Telecheck and the transaction was denied (null otherwise) |
PaymentInstrumentId | string | Payment instrument id |
tip
If you need to search for a specific transaction, we recommend you retrieve the transaction id and then use the GET specific transaction endpoint to retrieve the detailed information about the transaction.
#
Cancel a transactionUse this endpoint to cancel a specific transaction.
Method: DELETE
Endpoint: {{env}}/api/transaction/{transaction_id}
- Response