Ways to Integrate
There are various ways to integrate with Zūm Rails:
Full API Integration: You can start using our API endpoints (see
documentation here) to add users,
create transactions, etc. With the API integration you have full control over
the UI that your end user will see and you can develop it based on your business
use cases. This is one of the most secure ways of integrating to Zūm Rails.
Read more about the authorize
endpoint
here.
Portal: You can use the portal to add users, create transactions, etc. You can view our knowledgebase and FAQs to learn more about how to start moving money using the portal. If you prefer to use the portal, you will not have to do any API integration and you can start right away.
Hybrid (recommended): We recommend using a mix of both APIs and the portal as it is more robust and secure to use the APIs and you can view the details of your transactions, keep track of the money being moved, download reports and do much more by leveraging the functionalities available in the Zūm portal.
#
Zūm Connect#
URL V/S SDKOur URLs allow you to host our UI within your application and it's the easiest
to use for our clients.
It's a unique URL which you can host as an iframe, send by e-mail or sms. Since,
this is a public URL which is not tokenized, it’s not the most recommended
option.
The javascript sdk library allows you to build a more robust integration with Zūm Rails. Instead of hosting a public URL, the library offers the possibility for you to first create a temporary token, then initiate and receive real-time updates and listen to events. Hence, it is the best option for our clients.
To start using the library you will need to do the following:
Authorize using the endpoint
{{env}}/api/authorize
. More information on how to authorize can be found here.Create a token which has to be informed in the SDK. Use the endpoint
{{env}}/api/connect/createtoken
to generate the token. The token is valid for 15 minutes, and it will be automatically expired after a user uses it.- Payload
- Response
ConnectTokenType | Description |
---|---|
AddPaymentProfile | Define a request to go to the Connect Add payment profile |
info
You can also define configurations that will change the behavior of the forms for the requested process. For that you can used the parameters defined here.
- Refer the javascript sdk library into your website, build your configuration options and init the sdk. Inform the token (result.Token) in any request you want to execute.
note
To get the URL/SDK navigate to the settings menu option > Integration codes
#
Install JS SDKRefer the js library bellow into your website.
- Insert on your website
#
Init the JS SDKThe library expects 1 mandatory parameters:
Parameter | Description |
---|---|
token | The token received in the endpoint {{env}}/api/connect/createtoken |
Bellow you can find an example of the code needed to init the JS SDK.
- JS SDK Code
#
SDK callbacksWhen something happens, the sdk library will fire a few callbacks, this allows you to easily get the data and take an immediate action. For example, call the endpoint to get the full card information onSuccess by passing the requestId or cardId
#
onLoadThis callback is triggered when the UI is loaded and presented on the screen.
Parameters
- There are no parameters in this callback
#
onButtonCloseThis callback is triggered when the end user clicks in the X button to close the Connect
Parameters
- There are no parameters in this callback
#
onErrorThis callback is triggered when the connection failed by any error not expected in the happy flow
Parameters
- error: An error message explaining the reason why the failure happened
#
onSuccessThis callback is triggered when the connection is completed
Parameters
- data: The information returned will depend on the
ConnectTokenType
defined.
For example, when you use AddPaymentProfile
will return something like this
below:
#
User tokenization / Add payment profileThe best way to add a user to the Zūm Rails platform is through Zūm Connect. It consists of an iFrame website, hosted by Zūm Rails and referenced in your website.
The Zūm Connect iframe will display a form to capture the user's basic information (Full Name and Email) so that we can create an identity.
Independent of the method, the user will always be asked to agree and consent the information shared (PAD). The message can be customized for your needs as well. Your specific settings will be available under your profile in Zūm Rails portal. Depending on your need, you can capture the new user using our webhook mechanism, or if you need it right at the moment we redirect back to your flow, you can capture the Zūm user id (token) by listening to an event message as described in your portal settings.
After a user creates and links his account, you will be able to view it in the Zūm Rails portal or use the API to filter and get a specific user.
#
Add payment profile using URL#
Pre-filling the formTo help streamline the Zūm Connect experience, it is possible to pass information that you already have through optional parameters in the url:
Name | Description |
---|---|
firstName | User first name, when the account type is Personal |
lastName | User last name, when the account type when is Personal |
allowCreditCard | To display only CREDIT CARD payment method. |
allowAch | To display only ACH (bank) payment method. |
displayTermsAndConditions | To display the terms and conditions checkbox or not. |
displayZumRailsLogo | To display the powered by Zūm Rails logo |
hideRailsName | To hide the rails name when there is just one |
hideCreditCardAddress* | To hide all the credit card address fields |
backgroundColor | Change the background color around the form with a hex code (Only numbers, you don't need to send the hash symbol prefix) |
foregroundColor | Change the foreground color in the form with a hex code (Only numbers, you don't need to send the hash symbol prefix) |
disablePreFilledFields | Disable all fields that received a value by query parameter (Example: firstName, lastName...) |
creditCardAddressLine1 | Define the field address line 1 in credit card tab |
creditCardAddressLine2 | Define the field address line 2 in credit card tab |
creditCardAddressCity | Define the field city in credit card tab |
creditCardAddressProvince | Define the field province/territory in credit card tab |
creditCardAddressPostalCode | Define the field postal code in credit card tab |
creditCardAddressCountry | Define the field country in credit card tab. |
accountType | “Personal” or “Business” |
companyName | Company name, when the account type is Business |
idType | The type of ID: “DL” or “SSN”, when the account type is Personal |
idNumber | ID (DL or SSN) number, when the account type is Personal |
idState | State where ID was issued, when the account type is Personal and id type is DL |
businessTaxId | Business tax ID, when the account type is Business |
billingAddressLine1 | Define the field address line 1 in bank tab |
billingAddressLine2 | Define the field address line 2 in bank tab |
billingAddressCity | Define the field city in bank tab |
billingAddressProvince | Define the field state in bank tab |
billingAddressPostalCode | Define the field postal code in bank tab |
clientUserId | Your internal user id for user added |
extraField1 | User extra field 1 |
extraField2 | User extra field 2 |
info
Hiding a field doesn't mean that it is no longer mandatory, please use the other query params to pre-fill: firstName, lastName, email, etc.
info
The field creditCardAddressProvince
and creditCardAddressCountry
should follow the countries and administrative regions definitions.
Examples:
{{env}}/connect-adduser/{{customerId}}v2?creditCardAddressCountry=JP&creditCardAddressPostalCode=150-2345&creditCardAddressCity=Tokyo&creditCardAddressProvince=JP-13&creditCardAddressLine1=8-43-2%20Nishiogu&creditCardAddressLine2=Arakawa&hideCreditCardAddress=false&disablePreFilledFields=true
{{env}}/connect-adduser/{{customerId}}v2?firstName=John
#
Event ListenersWhen a new user is added or a request funds is fulfilled, Zūm Connect will trigger an event to provide to your application the UserId, TransactionId or RecurrentTransactionId.
To listen to the event in js, your website must refer to Zūm Connect using an iFrame, and then your website should have the script/example.
- Javascript example
- Add user event
#
Add payment profile using SDKOnce authorized, the next step is to create a token. You will need to create a token with the payload as below. For this specific type of request the parameters for the allowment of rails are mandatory.
- Add a payment profile without name matching
- Add a payment profile with name matching
#
Callbacks- onSuccess