Internal server error create subscription sandbox

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

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

https://developer.squareup.com/docs/app-marketplace/requirements/subscriptions-api

Additional Documentation

Test in the Sandbox
Square Sandbox
Square Node.js SDK Quickstart

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.