1.3.1Balances Micro Service API
Creates new document based on your user_id ("transactions" scope is needed)
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.createNewDocument();
})();
Return link to upload your file ("transactions" scope is needed)
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.getLinkAmazonS3Uploader();
})();
Returns taxpayer own document by his access_token ("transactions" scope is required)
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestTaxpayerDocument();
})();
Create taxpayer info or update existent one
(object)
object with arguments
| Name | Description |
|---|---|
args.type number
|
taxpayer info type (required) |
args.countryId string
|
Char code of "Country or Country Residence" (required) |
args.countryId2 string?
|
Char code of "Country citizenship or Country incorporation" |
args.stateId string?
|
Char code of "State / Province ID" |
args.city string?
|
City |
args.zip string?
|
ZIP-code |
args.address string?
|
Street & apt. or suite no. |
args.address2 string?
|
Permanent residence address |
args.personNumberType string?
|
Tax Number for individual (e.g. "Foreign Tax ID Number") |
args.companyNumberType string?
|
Tax Number for Corporation (e.g. "Employer Identification Number(EIN)") |
args.taxIdNumber string?
|
Tax ID number (XXX-XX-XXXX) |
args.taxClassification string?
|
Tax classification |
args.name string?
|
Name (shown on your income tax return) |
args.businessName string?
|
Business name |
args.organizationName string?
|
Name of organization |
args.disregardedEntity string?
|
Name of disregarded entity |
args.chapter3Status string?
|
Chapter 3 status |
args.signature string?
|
Signature |
args.residenceNumbers string?
|
Residence numbers (optional) (not implemented yet) |
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.createTaxpayerDocument({});
})();
Check balance of the specified user
(string)
user id
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.checkBalanceByUserId();
})();
Returns taxpayer own information by his access_token
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestTaxpayerInfo();
})();
Returns taxpayer own information by his access_token
(string)
Transaction unique ID
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestTransactionInfo('1');
})();
Request Transactions list of authenticated user by balance type
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestTransactionInfo('1');
})();
Request balance of authenticated user by type or default
(string?)
type of balance needed (vendor|bonus)
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestBalances();
})();
Creates new payment method ("transactions" scope is needed)
(object)
object with arguments
| Name | Description |
|---|---|
args.paymentMethod number
|
Payment method (paypal, wire, skrill, payoneer) (required) |
args.email string?
|
E-mail (required for paypal & skrill) |
args.fullName string?
|
First & last name (required for wire) |
args.address string?
|
Address (required for wire) |
args.country string?
|
Country char code (required for wire) |
args.swiftCode string?
|
SWIFT-code (required for wire) |
args.bankAccountId string?
|
Bank account number (required for wire) |
args.bankName string?
|
Bank name (required for wire) |
args.bankAddress string?
|
Bank address (required for wire) |
args.payonnerId string?
|
(required for payoneer) |
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.createPaymentMethod({});
})();
Updates existed payment method ("transactions" scope is needed)
(object)
object with arguments
| Name | Description |
|---|---|
args.paymentMethod number
|
Payment method (paypal, wire, skrill, payoneer) (required) |
args.email string?
|
E-mail (required for paypal & skrill) |
args.fullName string?
|
First & last name (required for wire) |
args.address string?
|
Address (required for wire) |
args.country string?
|
Country char code (required for wire) |
args.swiftCode string?
|
SWIFT-code (required for wire) |
args.bankAccountId string?
|
Bank account number (required for wire) |
args.bankName string?
|
Bank name (required for wire) |
args.bankAddress string?
|
Bank address (required for wire) |
args.payonnerId string?
|
(required for payoneer) |
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.createPaymentMethod({});
})();
Creates new withdraw request ("transactions" scope is needed)
object:
response
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.createWithdrawRequest({});
})();
Get all user payment methods ("transactions" scope is needed)
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestUserPaymentMethods();
})();
Return user own last withdraw request ("transactions" scope is needed)
array:
array with balances info
(async () => {
const balancesService = new BalancesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
const balances = await balancesService.requestUserPaymentMethods();
})();