# Bulk Loading DirectDebit Tokens BillingPlatform customers and merchants can bulk import their existing payment methods (raw cards, tokens or direct debit payment method data) into BillingPlatform via the UI and API. The UI procedure is described [here](https://docs.billingplatform.com/smart/integration-guides/importing-of-payment-methods-and-tokens). This article describes the API procedure. The following direct debit schemes are supported: * ACH * UK BACS * CAD ACSS * Australian BECs * SEPA After the import, those payment methods will be available to BillingPlatform customers and merchants and their end users for viewing and managing as stored payment methods from the hosted payment page on the account, portal or account ledger page. API calls and payment, refund, reversal and cancel operations can be successfully processed with a hosted payment gateway for these newly loaded payment methods. To import credit card and direct debit tokens into BillingPlatform complete the following steps: 1. Log in to an existing account in BillingPlatform or create a new account as described [here](https://docs.billingplatform.com/smart/integration-guides/importing-of-payment-methods-and-tokens). 2. Fetch the target account details by executing the following request: `GET https://my.billingplatform.com/myorg/rest/2.0/ACCOUNT/` 1. Copy the target account's `billingProfileId` from the response. 2. Use the `billingProfileId` in the following API calls to insert the required wallet record into BillingPlatform. ## Creating an ACH (Automated Clearing House) Wallet To create a wallet for ACH payment methods, issue a `POST /rest/2.0/WALLET` call with the following parameters: ```json { "brmObjects": [ { "BillingProfileId": "string", "Address1": "string", "City": "string", "Email": "string", "BillTo": "string", "State": "string", "Zip": "string", "Country": "string", "CurrencyCode": "string", "Status": "string", "fieldsToNull": [ "Address2", "Phone", "CustomerRefNum" ], "AchBankAcctNum": "number", "AchBankAcctName": "string", "AchBranchCode": "number", "AchBankAbaCode": "-", "AchUniqueRef": "string", "PaymentGatewayId":"number", "PaymentGatewayProfileid":"number", "DefaultFlag": "boolean", "AchScheme":"ach" } ] } ``` | **Field** | **Data Type** | **Required** | **Description** | | --- | --- | --- | --- | | **BillingProfileID** | string | yes | Billing Profile ID. This ID is the same as the account ledger number from the BillingPlatform Account. | | **Address1** | string | yes | Line 1 of the customer’s address. | | **City** | string | no | The city from the customer’s billing address. | | **Email** | string | no | The customer’s main contact email address. | | **BillTo** | string | no | The name you would like to display on customer invoices. | | **State** | string | no | The customer’s state from the billing address. | | **Zip** | string | no | The ZIP code from the customer’s billing address. | | **Country** | string | no | The customer’s country from the billing address. | | **CurrencyCode** | string | no | The invoice currency code. | | **Status** | string | no | Indicates if the wallet is **ACTIVE** or **DEACTIVATED**. Setting to **DEACTIVATED** will return an error when a customer tries to use the wallet. | | **Address2** | string | no | Line 2 of the customer’s address. This field can be safely ignored. | | **Phone** | string | no | The customer’s phone number. This field can be safely ignored. | | **CustomerRefNum** | number | no | For payment methods that support cardholder profiles, enter the profile here. This field can be safely ignored. | | **AchBankAcctNum** | number | yes | When importing existing tokens (**AchUniqueRef** field), if the last 4 digits of the account number are known, enter them. Otherwise it can be all zeroes or same 4 custom digits to indicate that this is an existing token. This field is required by BillingPlatform. | | **AchBankAcctName** | string | no | The name associated with the customer’s bank account. | | **AchBranchCode** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBankAbaCode** | string | no | For importing an existing token, this can be set to any string or “-” if the bank code is not known. | | **PaymentGatewayProfileId** | string | yes | The payment gateway profile ID that must be specified so BillingPlatform knows which profile/merchant account needs to be associated with this token. | | **PaymentGatewayId** | string | yes | The Ecom Gateway ID that is defined in the gateway settings. | | **DefaultFlag** | boolean | yes | Set this to `1` if this payment method needs to be used for auto-pay. | | **AchScheme** | string | yes | ach | ## Creating a BACS (UK Direct Debit) Wallet To create a wallet for UK BACS payment methods, issue a `POST /rest/2.0/WALLET` call with the following parameters: ```json { "brmObjects": [ { "BillingProfileId": "string", "Address1": "string", "City": "string", "Email": "string", "BillTo": "string", "State": "string", "Zip": "string", "Country": "UK", "CurrencyCode": "GBP", "Status": "string", "fieldsToNull": [ "Address2", "Phone", "CustomerRefNum" ], "AchBankAcctNum": "number", "AchBankAcctName": "string", "AchBranchCode": "number", "AchBankAbaCode": "-", "AchUniqueRef": "string", "PaymentGatewayId":"number", "PaymentGatewayProfileid":"number", "DefaultFlag": "boolean", "AchScheme":"bacs" } ] } ``` | **Field** | **Data Type** | **Required** | **Description** | | --- | --- | --- | --- | | **BillingProfileID** | string | yes | Billing Profile ID. This ID is the same as the account ledger number from the BillingPlatform Account. | | **Address1** | string | yes | Line 1 of the customer’s address. | | **City** | string | no | The city from the customer’s billing address. | | **Email** | string | no | The customer’s main contact email address. | | **BillTo** | string | no | The name you would like to display on customer invoices. | | **State** | string | no | The customer’s state from the billing address. | | **Zip** | string | no | The ZIP code from the customer’s billing address. | | **Country** | string | no | The customer’s country from the billing address. For a BACS wallet, set to **UK**. | | **CurrencyCode** | string | no | The currency code for the customer. For a BACS wallet, set this field to **GBP**. | | **Status** | string | no | Indicates if the wallet is **ACTIVE** or **DEACTIVATED**. Setting to **DEACTIVATED** will return an error when a customer tries to use the wallet. | | **Address2** | string | no | Line 2 of the customer’s address. This field can be safely ignored. | | **Phone** | string | no | The customer’s phone number. This field can be safely ignored. | | **CustomerRefNum** | number | no | For payment methods that support cardholder profiles, enter the profile here. This field can be safely ignored. | | **AchBankAcctNum** | number | yes | When importing existing tokens (**AchUniqueRef** field), if the last 4 digits of the account number are known, enter them. Otherwise, it can be all zeroes or some 4 custom digits to indicate that this is an existing token. This field is required by BillingPlatform. | | **AchBankAcctName** | string | no | The name associated with the customer’s account in an Automated Clearing House (ACH). | | **AchBranchCode** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBankAbaCode** | string | no | For importing an existing token, this can be set to any string or “-” if the bank code is not known. | | **PaymentGatewayId** | string | yes | The Ecom Gateway ID that is defined in the gateway settings. | | **PaymentGatewayProfileId** | string | yes | The payment gateway profile ID that must be specified so BillingPlatform knows which profile/merchant account needs to be associated with this token. | | **DefaultFlag** | boolean | yes | Set this to `1` if this payment method needs to be used for auto-pay. | | **AchScheme** | string | yes | bacs | ## Creating an ACSS (Canadian Pre-Authorized Debit) Wallet To create a wallet for Canadian ACSS payment methods, issue a `POST /rest/2.0/WALLET` call with the following parameters: ```json { "brmObjects": [ { "BillingProfileId": "string", "Address1": "string", "City": "string", "Email": "string", "BillTo": "string", "State": "string", "Zip": "string", "Country": "CA", "CurrencyCode": "CAD", "Status": "string", "fieldsToNull": [ "Address2", "Phone", "CustomerRefNum" ], "AchBankAcctNum": "number", "AchBankAcctName": "string", "AchBranchCode": "string", "AchBankAbaCode": "string", "AchUniqueRef": "string", "PaymentGatewayId":"number", "PaymentGatewayProfileid":"number", "DefaultFlag": "boolean", "AchScheme":"acssDebit" } ] } ``` | **Field** | **Data Type** | **Required** | **Description** | | --- | --- | --- | --- | | **BillingProfileID** | string | yes | Billing Profile ID. This ID is the same as the account ledger number from the BillingPlatform Account. | | **Address1** | string | yes | Line 1 of the customer’s address. | | **City** | string | no | The city from the customer’s billing address. | | **Email** | string | no | The customer’s main contact email address. | | **BillTo** | string | no | The name you would like to display on customer invoices. | | **State** | string | no | The customer’s state from the billing address. | | **Zip** | string | no | The ZIP code from the customer’s billing address. | | **Country** | string | no | The customer’s country from the billing address. For an ACSS wallet, set to **CA**. | | **CurrencyCode** | string | no | The currency code for the customer. For an ACSS wallet, set to **CAD**. | | **Status** | string | no | Indicates if the wallet is **ACTIVE** or **DEACTIVATED**. Setting to **DEACTIVATED** will return an error when a customer tries to use the wallet. | | **Address2** | string | no | Line 2 of the customer’s address. This field can be safely ignored. | | **Phone** | string | no | The customer’s phone number. This field can be safely ignored. | | **CustomerRefNum** | number | no | For payment methods that support cardholder profiles, enter the profile here. This field can be safely ignored. | | **AchBankAcctNum** | number | yes | When importing existing tokens (**AchUniqueRef** field), if the last 4 digits of the account number are known, enter them. Otherwise, it can be all zeroes or some 4 custom digits to indicate that this is an existing token. This field is required by BillingPlatform. | | **AchBankAcctName** | string | no | The name associated with the customer’s bank account. | | **AchBranchCode** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBankAbaCode** | string | no | For importing an existing token, this can be set to any string or “-” if the bank code is not known. | | **PaymentGatewayId** | string | yes | The Ecom Gateway ID that is defined in the gateway settings. | | **PaymentGatewayProfileId** | string | yes | The payment gateway profile ID that must be specified so BillingPlatform knows which profile/merchant account needs to be associated with this token. | | **DefaultFlag** | boolean | yes | Set this to `1` if this payment method needs to be used for auto-pay. | | **AchScheme** | string | yes | accsDebit | ## Creating an Australian BECS (Bulk Electronic Clearing System) Wallet To create a wallet for Australian BECS payment methods, issue a `POST /rest/2.0/WALLET` call with the following parameters: ```json { "brmObjects": [ { "BillingProfileId": "string", "Address1": "string", "City": "string", "Email": "string", "BillTo": "string", "State": "string", "Zip": "string", "Country": "AU", "CurrencyCode": "AUD", "Status": "string", "fieldsToNull": [ "Address2", "Phone", "CustomerRefNum" ], "AchBankAcctNum": "number", "AchBankAcctName": "string", "AchBranchCode": "string", "AchBankAbaCode": "string", "AchUniqueRef": "string", "PaymentGatewayId":"number", "PaymentGatewayProfileid":"number", "DefaultFlag": "boolean", "AchScheme":"becs" } ] } ``` | **Field** | **Data Type** | **Required** | **Description** | | --- | --- | --- | --- | | **BillingProfileID** | string | yes | Billing Profile ID. This ID is the same as the account ledger number from the BillingPlatform Account. | | **Address1** | string | yes | Line 1 of the customer’s address. | | **City** | string | no | The city from the customer’s billing address. | | **Email** | string | no | The customer’s main contact email address. | | **BillTo** | string | no | The name you would like to display on customer invoices. | | **State** | string | no | The customer’s state from the billing address. | | **Zip** | string | no | The ZIP code from the customer’s billing address. | | **Country** | string | no | The customer’s country from the billing address. For a BECS wallet, set this field to **AU**. | | **CurrencyCode** | string | no | The currency code for the customer. For a BECS wallet, set this field to **AUD**. | | **Status** | string | no | Indicates if the wallet is **ACTIVE** or **DEACTIVATED**. Setting to **DEACTIVATED** will return an error when a customer tries to use the wallet. | | **Address2** | string | no | Line 2 of the customer’s address. This field can be safely ignored. | | **Phone** | string | no | The customer’s phone number. This field can be safely ignored. | | **CustomerRefNum** | number | no | For payment methods that support cardholder profiles, enter the profile here. This field can be safely ignored. | | **AchBankAcctNum** | number | yes | When importing existing tokens (**AchUniqueRef** field), if the last 4 digits of the account number are known, enter them. Otherwise, it can be all zeroes or some 4 custom digits to indicate that this is an existing token. This field is required by BillingPlatform. | | **AchBankAcctName** | string | no | The name associated with the customer’s bank account. | | **AchBranchCode** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBankAbaCode** | string | no | For importing an existing token, this can be set to any string or “-” if the bank code is not known. | | **PaymentGatewayId** | string | yes | The Ecom Gateway ID that is defined in the gateway settings. | | **PaymentGatewayProfileId** | string | yes | The payment gateway profile ID that must be specified so BillingPlatform knows which profile/merchant account needs to be associated with this token. | | **DefaultFlag** | boolean | yes | Set this to `1` if this payment method needs to be used for auto-pay. | | **AchScheme** | string | yes | becs | ## Creating a SEPA (Single Euro Payments Area) Wallet To create a wallet for SEPA payment methods, issue a `POST /rest/2.0/WALLET` call with the following parameters: ```json { "brmObjects": [ { "BillingProfileId": "string", "Address1": "string", "City": "string", "Email": "string", "BillTo": "string", "State": "string", "Zip": "string", "Country": "string", "CurrencyCode": "EUR", "Status": "string", "fieldsToNull": [ "Address2", "Phone", "CustomerRefNum" ], "AchBankAcctNum": "number", "AchBranchCode": "number", "AchBankAcctName": "string", "AchBankAbaCode": "-", "AchUniqueRef": "string", "PaymentGatewayId":"number", "PaymentGatewayProfileid":"number", "DefaultFlag": "boolean", "AchScheme":"sepa" } ] } ``` | **Field** | **Data Type** | **Required** | **Description** | | --- | --- | --- | --- | | **BillingProfileID** | string | yes | Billing Profile ID. This ID is the same as the account ledger number from the BillingPlatform Account. | | **Address1** | string | yes | Line 1 of the customer’s address. | | **City** | string | no | The city from the customer’s billing address. | | **Email** | string | no | The customer’s main contact email address. | | **BillTo** | string | no | The name you would like to display on customer invoices. | | **State** | string | no | The customer’s state from the billing address. | | **Zip** | string | no | The ZIP code from the customer’s billing address. | | **Country** | string | no | The customer’s country from the billing address. For a SEPA wallet, set this field to **EU**. | | **CurrencyCode** | string | no | The currency code for the customer. For a SEPA wallet, set this field to **EUR**. | | **Status** | string | no | Indicates if the wallet is **ACTIVE** or **DEACTIVATED**. Setting to **DEACTIVATED** will return an error when a customer tries to use the wallet. | | **Address2** | string | no | Line 2 of the customer’s address. This field can be safely ignored. | | **Phone** | string | no | The customer’s phone number. This field can be safely ignored. | | **CustomerRefNum** | number | no | For payment methods that support cardholder profiles, enter the profile here. This field can be safely ignored. | | **AchBankAcctNum** | number | yes | When importing existing tokens (**AchUniqueRef** field), if the last 4 digits of the account number are known, enter them. Otherwise, it can be all zeroes or some 4 custom digits to indicate that this is an existing token. This field is required by BillingPlatform. | | **AchBankAcctName** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBranchCode** | string | no | The branch code of the customer’s bank. For importing an existing token, this can be set to six zeroes if the branch code is not known. | | **AchBankAbaCode** | string | no | For importing an existing token, this can be set to any string or “-” if the bank code is not known. | | **PaymentGatewayId** | string | yes | The Ecom Gateway ID that is defined in the gateway settings. | | **PaymentGatewayProfileId** | string | yes | The payment gateway profile ID that must be specified so BillingPlatform knows which profile/merchant account needs to be associated with this token. | | **DefaultFlag** | boolean | yes | Set this to `1` if this payment method needs to be used for auto-pay. | | **AchScheme** | string | yes | sepa |