Error on Mass Payment Item Retrieval


(Manoj Goel) #1

While fetching the mass pay item using following code:

var massPaymentItemUrl = "https://api.dwolla.com/mass-payment-items/20316eed-35ea-4d98-b2c9-a7fa007b08f3";
accountToken
        .get(massPaymentItemUrl)
        .then(res => {
                       console.log (res);                
        });

Getting this error:

Error: {"code":"NotFound","message":"The requested resource was not found."}
at errorFrom (/user_code/node_modules/dwolla-v2/src/dwolla/Token.js:43:15)
at /user_code/node_modules/dwolla-v2/src/dwolla/Token.js:64:29
at tryCatcher (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues (/user_code/node_modules/dwolla-v2/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

Can somebody help please?


(Spencer Hunter) #2

@goelmk, It looks like that ID is a mass-payment and not a mass-payment-item. You’ll want to make sure you update your URL to call the mass-payments endpoint.

http://api.dwolla.com/mass-payments/20316eed-35ea-4d98-b2c9-a7fa007b08f3


(Manoj Goel) #3

@Spencer How do we retrieve mass-payment-item using 8-digit Transaction Id? Please suggest.


(Spencer Hunter) #4

@goelmk, Can you provide a little more detail? Where are you obtaining this 8 digit Id?


(Manoj Goel) #5

@spencer This is the ‘Id’ that we get in item transaction status response after a mass payout is created. e.g.

{ Id: '24104634',
  Type: 'Transaction',
  Subtype: 'Status',
  Created: '2017-09-15T21:07:00.000Z',
  Triggered: '2017-10-12T14:03:24.913Z',
  Value: 'processed',
  Transaction: 
   { Type: 'money_sent',
     Notes: '',
     Fees: [],
     Id: 24104634,
     Source: 
      { Id: '123-456-7890',
        Name: 'ABC Company Limited,
        Type: 'Dwolla',
        Image: 'https://www.dwolla.com/avatars/123-456-7890' },
     Destination: 
      { Id: 'someone@yahoo.com',
        Name: 'someone@yahoo.com',
        Type: 'Dwolla',
        Image: 'https://www.dwolla.com/avatars/someone@yahoo.com' },
     Amount: 17,
     SentDate: '2017-09-15T21:07:00.000Z',
     ClearingDate: '2017-09-21T00:00:00.000Z',
     Status: 'processed' },
  Metadata: 
   { sender_item_id: '-Ksif7k_8Otc3YXh1x-A/14/00199',
     sender_batch_id: 'ba7k7g0q46vi4zehfr' } }