-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
I keep getting this error whenever I tried to use the initialize transaction or create transfer recipient methods
Code
const paystack = new Paystack(c.env.PAYSTACK_API_KEY)
const paymentIntent = await paystack.transaction.initialize({
amount: String(total * 100),
email: c.get('user').email,
currency: 'NGN',
metadata: {
customerId: c.get('user').id,
storeId: c.get('store').id,
items: foundItems
},
})Error
SyntaxError: "[object Object]" is not valid JSON
at [object Object]
at null.<anonymous> (file:///C:/Users/DELL/Desktop/PROJECTS/wallet/backend/node_modules/paystack-sdk/dist/paystack.js:41:81)
at async Axios.request (file:///C:/Users/DELL/Desktop/PROJECTS/wallet/backend/node_modules/axios/lib/core/Axios.js:40:14)
at async Transaction2.initialize (file:///C:/Users/DELL/Desktop/PROJECTS/wallet/backend/node_modules/paystack-sdk/dist/transaction/transaction.js:18:16)Metadata
Metadata
Assignees
Labels
No labels