Happy Business Starts Here

Internal error when creating payment

Newly Enrolled

Internal error when creating payment


I am trying to create an external payment against an existing invoice, but am receiving an error, "Oops, internal error occurred, please try it again, and if it still doesn\'t work, please contact Zuora support.".


Sandbox API, invoice ID 2c92c09573bd9bf40173be471e032ec9 .


await axios.post(
        invoices: [{ amount: data.Balance, invoiceId }],
        amount: data.Balance,
        type: 'External'
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded',
          Authorization: `Bearer ${accessToken}`

I have previous POST requests working this way.


When I look at the documentation (https://www.zuora.com/developer/api-reference/#operation/POST_CreatePayment) it says the following about paymentMethodId which I'm not providing:


The unique ID of the payment method that the customer used to make the payment.

If no payment method ID is specified in the request body, the default payment method for the customer account is used automatically. If the default payment method is different from the type of payments that you want to create, an error occurs.

However, none of the accounts have a default payment method and they shouldn't have one either, so not sure if this is the source of the error.

Tags (2)