This method creates an offramp bank account details for an end user. Creating the account with main_beneficiary as true will make it the default account where all offramps take place
Usage
Typescript
import getunblockSDK, { AuthenticationMethod, Country, Currency } from "@getunblock/sdk";
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.createRemoteUserBankAccount({
accountName: "[User account name]",
accountCountry: Country.UnitedKingdom,
beneficiaryCountry: Country.UnitedKingdom,
mainBeneficiary: false,
accountDetails: {
currency: Currency.GBP,
accountNumber: 31926819,
sortCode: 123456
},
});
})();
Javascript
const getunblockSDK = require("@getunblock/sdk").default;
const { AuthenticationMethod, Country, Currency } = require("@getunblock/sdk");
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.createRemoteUserBankAccount({
accountName: "[User account name]",
accountCountry: Country.UnitedKingdom,
beneficiaryCountry: Country.UnitedKingdom,
mainBeneficiary: false,
accountDetails: {
currency: Currency.GBP,
accountNumber: 31926819,
sortCode: 123456
},
});
})();
This method gets all the remote bank accounts linked to a user for the offramp process
Usage
Typescript
import getunblockSDK, { AuthenticationMethod } from "@getunblock/sdk";
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.getAllRemoteBankAccounts();
})();
Javascript
const getunblockSDK = require("@getunblock/sdk").default;
const { AuthenticationMethod } = require("@getunblock/sdk");
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.getAllRemoteBankAccounts();
})();
This method allows to change the main user remote bank account to which all off ramps by default take place. This account can be selected based on existing ones
Usage
Typescript
import getunblockSDK, { AuthenticationMethod } from "@getunblock/sdk";
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.changeMainUserRemoteBankAccount({
accountUuid: "b89b8075-e845-48a6-9b70-123c12e0aed0",
});
})();
Javascript
const getunblockSDK = require("@getunblock/sdk").default;
const { AuthenticationMethod } = require("@getunblock/sdk");
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.changeMainUserRemoteBankAccount({
accountUuid: "b89b8075-e845-48a6-9b70-123c12e0aed0",
});
})();
This method gets a specific remote bank account by UUID
Usage
Typescript
import getunblockSDK, { AuthenticationMethod } from "@getunblock/sdk";
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.getRemoteBankAccountByUuid({
accountUuid: "b89b8075-e845-48a6-9b70-123c12e0aed0",
});
})();
Javascript
const getunblockSDK = require("@getunblock/sdk").default;
const { AuthenticationMethod } = require("@getunblock/sdk");
(async () => {
// setup SDK
const sdk = getunblockSDK({
apiKey:
"API-Key [Some merchant Key]", // Key generated at the moment the merchant was created in getunblock system
prod: false, // If true Production environment will be used otherwise Sandbox will be used instead
});
await sdk.auth.authenticateWithSiwe({
message: "[Generated SIWE message]*",
signature: "[Generated SIWE signature]*",
});
// * more info at https://docs.getunblock.com/docs/unblocker
// SDK API call example
const result = await sdk.remoteBankAccount.getRemoteBankAccountByUuid({
accountUuid: "b89b8075-e845-48a6-9b70-123c12e0aed0",
});
})();