Happy Business Starts Here

Is there a way to Create an Account without providing payment info via the REST API?

Highlighted
New Student

Is there a way to Create an Account without providing payment info via the REST API?

It seems like this can be done in the app by providiing a null value to defaultPaymentMethod, but I can't find a way to do it via the api as it mandates credit card info or a hpmCreditCardPaymentMethodId

6 REPLIES 6
Support SME

Re: Is there a way to Create an Account without providing payment info via the REST API?

Hi @tnept,

 

As the Knowledge Center explains, either the creditCard or hpmCreditCardPaymentMethodId must be provided when creating an account.

 

https://knowledgecenter.zuora.com/DC_Developers/REST_API/B_REST_API_reference/Accounts/1_Create_acco...

 

To resolve this, you can try the following, let me know if this helps:

 

- navigate to Reporting / Data Sources

- pick the Payment Method data source for reporting

- select id, accountid and Name

- add a filter stating accountid is null

- you will be presented with all the "default" payment method ids that are not associated with any accounts. Pick e.g. the ID for the "other" method and use it in your call for the value of hpmCreditCardPaymentMethodId and follow this process: https://community.zuora.com/t5/Billing-Payments/Can-I-set-external-payment-method-in-a-subscribe-cal...

 

datasource.JPG



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

Student

Re: Is there a way to Create an Account without providing payment info via the REST API?

Wow - I had been searching for an answer to the same question for hours - thanks! Your suggestion worked.

Savvy Scholar

Re: Is there a way to Create an Account without providing payment info via the REST API?

Hello Komal,

 

We are trying the same approach but getting 

 

```{
"success": false,
"processId": "4C28A0B7128F6D25",
"reasons": [
{
"code": 51000020,
"message": "Electronic payment needs electronic payment method."
}
]
}````

 

We are using the 'other' paymentrefid - however, the zuora document seems to indicate that non-credit card payments are not accepted. Any suggestions?

Savvy Scholar

Re: Is there a way to Create an Account without providing payment info via the REST API?

Hello Vikto, 

 

We just tried this and I left a comment below. Can you help?

 

We are trying the same approach but getting 

 

```{
"success": false,
"processId": "4C28A0B7128F6D25",
"reasons": [
{
"code": 51000020,
"message": "Electronic payment needs electronic payment method."
}
]
}````

 

We are using the 'other' paymentrefid - however, the zuora document seems to indicate that non-credit card payments are not accepted. Any suggestions?

Zuora Support

Re: Is there a way to Create an Account without providing payment info via the REST API?

Hi @abdallahalhakim,

 

Your API call attempted to collect a payment by default. By design, non-electronic payment method is not supported for creating a payment in a create account call. You can avoid the issue by setting collect field to false (if not passed, the default value is true) in your calll's payload.



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

Savvy Scholar

Re: Is there a way to Create an Account without providing payment info via the REST API?

@vu_phan thanks - that eventually worked for me. 

 

Just FYI to anyone reading this --> make sure you set the zuora-version in your request header to 196.0. Also - add the "collect" parameter at the end of your body.

 

Here is a copy of our body

 

```{
"name": "CompanyTrying_4",
"billCycleDay": "0",
"taxInfo": {
"VATId": ""
},
"notes": "This account is created by E-Commerce",
"communicationProfileId": "2c92c0f953cfa2da0153d087e5b33bae",
"batch": "Batch30",
"hpmCreditCardPaymentMethodId": "4028e6972f9a6c62012fb437fb5b472b",
"currency": "USD",
"autoPay": "false",
"billToContact": {
"city": "san",
"state": "CA",
"firstName": "Test",
"country": "US",
"address1": "address",
"lastName": "123",
"workEmail": "abbas+t051010@bluejeans.com",
"zipCode": "94063"
},
"crmId": "ID belongs to a third party CRM system",
"subscription": {
"initialTerm": 12,
"notes": "This has been created by the E-Com Middleware APIs",
"renewalTerm": 12,
"contractEffectiveDate": "2018-01-03",
"autoRenew": "true",
"subscribeToRatePlans": [
{
"chargeOverrides": [
{
"productRatePlanChargeId": "2c92c0f95d7d614d015dae2598df3d6c",
"billingPeriod": "Annual",
"price": "199.90",
"quantity": 1,
"listPriceBase": "Per_Billing_Period"
}
],
"productRatePlanId": "2c92c0f95d7d614d015dae2598c83d6a"
}
],
"termType": "TERMED"
},
"EnterpriseId__c": "6227",
"invoiceTemplateId": "2c92c0f953cfa2da0153d08f1dd342e6",
"soldToContact": {
"city": "san",
"state": "CA",
"firstName": "Test",
"address1": "address",
"lastName": "123",
"country": "US",
"workEmail": "abbas+t0510010@bluejeans.com",
"zipCode": "94063"
},
"paymentTerm": "Due Upon Receipt",
"collect": false
}```