I have issues couple of functions and now i need to create subscription, i am getting error:
{ Error: interval,currency,amount
at IncomingMessage.<anonymous> (C:\Work\UpWork\Indrek Pihor\SmartManage\node_modules\paymill-node\lib\main.js:97:21)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
response:
{ exception: 'Api_Exception_InvalidParameter',
error: 'interval,currency,amount' } }
Code i am using:
paymill.subscriptions.create({
client: clients.data[0].id,
payment: payment.data.id,
interval: 'MONTH',
currency: 'EUR',
amount: '1000'
}, function(err, subscription) {
console.log('err');
console.log(err);
console.log('subscription');
console.log(subscription);
// if(err) callback(false);
// else callback(subscription.data);
});
Object which is passing to create function:
{ client: 'client_e37a84dc81e810e54ea9',
payment: 'pay_3b4aee5a016ca07ff739b4c6',
interval: 'MONTH',
currency: 'EUR',
amount: 1000 }
I have issues couple of functions and now i need to create subscription, i am getting error:
Code i am using:
Object which is passing to create function: