WePay.accountModify()

Modify an existing payment account.

Update the specified properties. If reference_id is passed, it must be unique for the user/application pair.

Usage

Hover over inputs/exits for more info.

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


// Modify an existing payment account.

WePay.accountModify({

accessToken: '604f39f41e364951ced74070c6e8bfa49d346cdfee6191b03c2c2d9c9cda9184',

accountId: 12345,

name: 'My new payment account name',

description: 'My new payment account description',

useProduction: false,

referenceId: 'ABCD1234',

imageUri: 'http://s3.amazonaws.com/myphoto.jpg',

gaqDomains: [ 'mydomain.com', 'myotherdomain.com' ],

themeObject: {},

callbackUri: 'https://www.baggins.com/callback',

countryOptions: {},

feeScheduleSlot: 9,

}).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 create a payment account for.

'604f39f41e364951ced74070c6e8bfa49d346cdfee6191b03c2c2d9c9cda9184'
accountId required

The unique ID of the account you want to modify.

12345
name

The name for the account.

'My new payment account name'
description

The description for the account.

'My new payment account description'
useProduction

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

false
referenceId

The reference id of the account. Can be any string, but must be unique for the application/user pair.

'ABCD1234'
imageUri

The uri for an image that you want to use for the accounts icon. This image will be used in the co-branded checkout process.

'http://s3.amazonaws.com/myphoto.jpg'
gaqDomains

An array of Google Analytics domains associated with the account. See the analytics tutorial for more details.

[ 'mydomain.com', 'myotherdomain.com' ]
themeObject

The theme structure you want to be used for account's flows and emails. See https://stage.wepay.com/deeloper/reference/structures#theme.

{}
callbackUri

The uri that will receive IPNs for this account. You will receive an IPN whenever the account is verified or deleted.

'https://www.baggins.com/callback'
countryOptions

{"debit_opt_in":true|false}. Used for Canadian accounts only.

{}
feeScheduleSlot

The custom fee schedule value to use for the merchant. Values start at 0, not 1. Passing null will remove the custom fee schedule. NOTE: Use of this parameter requires permission from WePay.

9

Exits

error

An unexpected error occurred.

success

OK.

{ name: 'Example Account',
  description: 'This is just an example WePay account.',
  reference_id: 'abc123',
  image_uri: 'https://stage.wepay.com/img/logo.png',
  country: 'US',
  currencies: [ 'USD' ],
  fee_schedule_slot: 9 }