Bank account export
Bank account extraction is the process of retrieving the shops that have changed in Mirakl and creating or updating the corresponding bank accounts in Hyperwallet.
Characteristics
-
The connector supports the following bank account types from Mirakl:
-
IBAN
-
United States A.B.A.
-
Canadian bank account
-
United Kingdom bank account
-
-
When creating the bank account in Hyperwallet, the connector uses the currency of the shop if it’s supported by Hyperwallet. Otherwise, it uses a currency compatible with the bank account country and bank account type.
-
The connector supports updating the bank account information in Hyperwallet. But if the changes in the bank account aren’t compatible with the existing bank account in Hyperwallet, the connector creates a new bank account.
-
When the marketplace currency isn’t supported in Hyperwallet for the bank account of the seller, the connector automatically selects a compatible currency. The payments are always made in the marketplace currency.
Batch job steps
The bank account extraction process is organized in different phases or steps during the job execution (as explained in phases of a job):
- Step 1: Extraction of items
-
During this step the connector retrieves from Mirakl the shops modified since the last execution of the job, extracting the bank account information from the shop.
- Step 2: Item processing
-
During this step the connector processes each retrieved bank account. The connector creates or updates the corresponding bank account in Hyperwallet, according to certain bank account update restrictions.
Step 1: Extraction of shops
Since bank account information is part of the shop information, the connector retrieves from Mirakl the shops modified since the last execution of the job.
During this phase the connector logs the following information:
[BATCHJOB] Starting processing of job [BATCHJOB] Starting extraction of items to be processed [BATCHJOB] Retrieving shops since Tue Apr 18 12:41:42 UTC 2023 [BATCHJOB] Shops retrieved [78766,78764] [BATCHJOB] Retrieving shops since Tue Apr 18 12:41:42 UTC 2023 [BATCHJOB] Shops retrieved [78765] [BATCHJOB] Retrieved the following number of items to be processed: 3
The connector filters the shop by type (first individuals and then professionals), that’s why it logs two times the Shop retrieved
message.
Step 2: Bank account processing
The seller processing has two phases:
-
Hyperwallet token synchronization, that ensures that the shop has an Hyperwallet bank account token assigned if the bank account already exists in Hyperwallet.
-
Synchronized bank account processing, that creates or updates the bank account in Hyperwallet.
Step 2.1: Hyperwallet token synchronization
Hyperwallet has some restrictions about the fields of the bank account that the connector can change:
-
Country of the bank account can’t be changed.
-
Type of the bank account can’t be changed.
For example, the following changes can’t be made to an existing bank account in Hyperwallet:
-
If the existing bank account is of type ABA (US bank account), the connector can’t update it to an IBAN (international bank account) type.
-
If the existing bank account has an IBAN from Italy, the connector can’t update it to an IBAN from Spain.
For this reason the bank account token alone isn’t enough to identify the bank account in Hyperwallet, because it doesn’t guarantee that the connector can update the bank account. The connector needs to verify that the existing bank account in Hyperwallet is compatible with the information in Mirakl.
A Mirakl bank account is compatible with an Hyperwallet bank account if:
-
The bank account country is the same as the one in Hyperwallet.
-
The bank account type is the same as the one in Hyperwallet.
Step 2.2: Synchronized bank account processing
Based on whether the bank account has a token or not after the synchronization process, the connector creates or updates the bank account in Hyperwallet.
During this phase the connector logs the following information:
[BATCHJOBITEM] Processing item of type BankAccount with id: 78766 18-04-2023 12:44:45.052 [HyperwalletMiraklScheduler_Worker-3] INFO [BATCHJOBITEM] Bank account created or updated for seller with clientId [78766] [BATCHJOBITEM] Updating bank account token for shop [78766] [BATCHJOBITEM] Bank account token updated for shop [78766] [BATCHJOBITEM] Processed successfully item of type BankAccount with id: 78766 [BATCHJOBITEM] 1 items processed successfully. 0 items failed. 2 items remaining ... [BATCHJOBITEM] 3 items processed successfully. 0 items failed. 0 items remaining [BATCHJOB] Finished processing of job
Job execution
The connector provides can execute the bank account extract job automatically and the users can execute the job manually using a REST API.
Scheduled execution
The connector automatically executes the jobs in a scheduled manner. The connector reads the schedule configuration from the following variable:
-
PAYPAL_HYPERWALLET_BANK_ACCOUNT_EXTRACT_CRON_EXPRESSION
You can find more information in the configuration variables section.
Manual execution
The connector provides the following REST API to execute the jobs manually:
HTTP method |
Path |
Job type |
|
|
Bank accounts extract job |
You can find more information in the generic job REST API reference.
Configuration variables
The section seller onboarding configuration variables, has information about the configuration variables used by the bank account extraction job.
API calls
The connector does the following API calls during the sellers extraction jobs execution:
Call | Target System | Endpoint | Parameters |
---|---|---|---|
Retrieve all modified shops since the last specified date |
Mirakl |
|
|
Update Hyperwallet bank account token in a Shop |
Mirakl |
|
|
Create a new bank account |
Hyperwallet |
The connector generates a body from the bank account information contained in the Mirakl shop according to the data mapping rules. The following mappings are specially relevant:
|
|
Update an existing bank account |
Hyperwallet |
The connector generates a body from the bank account information contained in the Mirakl shop according to the data mapping rules. |
|
Retrieve bank accounts of a user |
Hyperwallet |
Data mapping
Common fields
Hyperwallet field | Mirakl field | Notes |
---|---|---|
|
|
|
|
Calculated based on the bank account type (using 2 char ISO code):
* |
|
|
Calculated based on |
|
|
N/A |
Fixed value |
|
|
|
|
|
|
|
|
|
|
|
It’s optional and the connector fills it if this data exists in Mirakl. |
|
|
|
|
|
|
|
Custom field: |
U.S. ABA payment method
Hyperwallet field | Mirakl field | Notes |
---|---|---|
|
Routing number (ABA). |
|
|
Bank account number |
|
|
N/A |
Fixed value |
Canadian payment method
Hyperwallet field | Mirakl field | Notes |
---|---|---|
|
3 digit bank code |
|
|
5 digit transit number |
|
|
Bank account number |
Country and currency selection
Hyperwallet API defines the supported countries and currencies combinations, and based on them, it defines the bank account type that should be provided.
The bank account information that the sellers provide in Mirakl defines the bank account type and the country, which is derived from the bank account type and number according to the following rules:
-
US
for US bank accounts. -
CA
for Canadian bank accounts. -
GB
for UK bank accounts. -
First two characters of the bank account number for IBAN bank accounts.
Using the bank account information and Hyperwallet’s country/currency combinations, the connector determines the currency that should be used for the transfer using the following logic:
Automatic currency selection can be disabled setting to false`
the environment variable PAYPAL_HYPERWALLET_BANK_ACCOUNTS_ENABLE_AUTOMATIC_CURRENCY_SELECTION
. In this case marketplace’s currency is always used during bank account creation, that will fail when the currency isn’t supported by Hyperwallet.
Troubleshooting
This job doesn’t have any specific troubleshooting guides. Follow the generic recommendations detailed in troubleshooting of a job.