WePay.accountFind()

Find existing payment accounts. No params for all accounts by access token.

Search the accounts of the user associated with the access token used to make the call.

Usage

Hover over inputs/exits for more info.

var WePay = require('machinepack-wepay');


// Find existing payment accounts. No params for all accounts by access token.

WePay.accountFind({

accessToken: '604f39f41e364951ced74070c6e8bfa49d346cdfee6191b03c2c2d9c9cda9184',

name: 'My Payment Account',

referenceId: '1234abcd',

sortOrder: 'DESC',

useProduction: false,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

accessToken required

The string access token of the user you want to find a payment account for.

'604f39f41e364951ced74070c6e8bfa49d346cdfee6191b03c2c2d9c9cda9184'
name

The name of the account you want to search for.

'My Payment Account'
referenceId

The reference ID of the account you are searching for.

'1234abcd'
sortOrder

Sort the results of the search by time created. Use "DESC" for most recent to least recent. Use "ASC" for least recent to most recent. Defaults to "DESC".

'DESC'
useProduction

Use WePay production API - payments will be charged. Defaults to WePay staging - payments are not charged.

false

Exits

error

An unexpected error occurred.

success

OK.

[ { account_id: 12345,
    name: 'Example account',
    state: 'active',
    description: 'this account is just an example.',
    owner_user_id: 539291,
    reference_id: '123abc',
    type: 'personal',
    create_time: 1367958263,
    disablement_time: 'null',
    country: 'US',
    currencies: [ 'USD' ],
    balances: 
     [ { currency: 'USD',
         balance: 390.5,
         incoming_pending_amount: 635.3,
         outgoing_pending_amount: 210,
         reserved_amount: 0,
         disputed_amount: 0,
         withdrawal_period: 'daily',
         withdrawal_next_time: 1370112217,
         withdrawal_bank_name: 'WellsFargo XXXXX3102' } ],
    statuses: 
     [ { currency: 'USD',
         incoming_payments_status: 'ok',
         outgoing_payments_status: 'ok',
         account_review_status: 'pending' } ],
    image_uri: 'https://stage.wepay.com/img/logo.png',
    action_reasons: [ 'bank_account', 'kyc' ],
    disabled_reasons: 
     [ 'country_not_supported',
       'fraud',
       'high_risk_chargeback',
       'no_settlement_path',
       'reported_user',
       'tos_violation' ] } ]