Hello,
Application id: sq0idp-BxXyeNBSWtIaRXnujal9QQ
Environment: sandbox
I am getting internal server errors when trying to test creating subscriptions with subscriptions api createSubscription. I saw similar topics to this, but none of those solutions resolve my issue. Thank you for your help
Using nodejs my test code essentially is like this:
const subscriptionResult = await subscriptionsApi.createSubscription({
idempotencyKey: crypto.randomBytes(12).toString('hex'),
locationId: 'LQYAKTAMA4MDG',
customerId: 'CM0280KCRRYP4DY2ZKK429WTNW',
cardId: 'ccof:customer-card-id-ok',
planVariationId: 'RMFGYCPYCUVZQ7J7RBYZZUL7',
phases: [
{
ordinal: BigInt(0),
orderTemplateId: 'BOBQaSL44VYKkHjwiutrt0EKtP6YY'
}
]
})
where the
- location is the default sand box test account location
- the customer is created with customer api createCustomer
- the cardId is a test card on file from here
- planVariationId is from a monthly cadence subscription plan created in the test account’s dashboard
- the orderTemplateId is from a draft order for a product with one line item created for the test customer using orders api