Closed darai0512 closed 1 year ago
$cat sample.js const Payjp = require('./built') const payjp = Payjp('sk_test_xxx', { apibase: 'http://yyy/v1' }); payjp.statements.list().then(async (statements) => { console.log(statements.count) for (const s of statements.data) { try { const res = await payjp.statements.statementUrls(s.id, {platformer: true}) console.log(res) } catch (e) { console.error(e.status) } } }).catch(console.error) payjp.tenant_transfers.list().then(async (tts) => { console.log(tts.count) for (const tt of tts.data) { try { const res = await payjp.tenant_transfers.statementUrls(tt.id, {platformer: true}) console.log(res) } catch (e) { console.error(e.status) } } }).catch(console.error) $node sample.js 404 <- statement nothing { expires: 1699433619, object: 'statement_url', url: 'https://pay.jp/_/statements/hogehoge' }
Check script