Happy Business Starts Here

Re: API: Adding a Product to a Subscription but getting "Electronic payment needs electronic pa

Highlighted
Newly Enrolled

API: Adding a Product to a Subscription but getting "Electronic payment needs electronic payment met

I'm trying to add a product to a subsription. For this, I'm making an amend call in the API (v1/action/amend) and populating the json file as like this:

 

 

{
    "requests": [
        {
        	"AmendmentOptions":
        	{
        		"GenerateInvoice": false,
				"InvoiceProcessingOptions": { },
				"ProcessPayments": false,
				"ApplyCreditBalance": false
        	},
            "Amendments": [
                {
                    "Status": "Completed",
                	"RatePlanData": {
				        "RatePlan": {
				          "ProductRatePlanId": "The rate plan id"
				        }, 
				        "RatePlanChargeData": [
				            {
				                "RatePlanCharge": {
				                    "ProductRatePlanChargeId": "the rate plan charge id"
				                }
				            }
				        ]
				    },
                    "Type": "NewProduct", 
                    "SubscriptionId": "subscription id", 
                    "Name": "New Prod Test",
                    "ContractEffectiveDate": "2017-05-12",
                    "ServiceActivationDate": "2017-05-12"
                }
            ],
            "PreviewOptions": {
				"EnablePreviewMode": false
			}
        }
    ]
}

Even though I'm satting "GenerateInvoice" as false, it still gives me this error:

 

 

 

{
          "Code": "INVALID_VALUE",
          "Message": "Electronic payment needs electronic payment method."
}

How can I solve this? Is there a way to solve this without setting an auto-pay? From my understanding "GenerateInvoice": false should have solved this error.

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Support SME

Re: API: Adding a Product to a Subscription but getting "Electronic payment needs electronic pa

Hi @nefer , there's a typo in your request: AmendmentOptions should be AmendOptions!

 

You can doublecheck this on: https://www.zuora.com/developer/api-reference/#operation/Action_POSTamend

 

I've tested this and if I use AmendmentOptions, it's values will simply get ignored and the call will try to generate an invoice and process a payment.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

1 REPLY 1
Highlighted
Support SME

Re: API: Adding a Product to a Subscription but getting "Electronic payment needs electronic pa

Hi @nefer , there's a typo in your request: AmendmentOptions should be AmendOptions!

 

You can doublecheck this on: https://www.zuora.com/developer/api-reference/#operation/Action_POSTamend

 

I've tested this and if I use AmendmentOptions, it's values will simply get ignored and the call will try to generate an invoice and process a payment.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post