Creating a Company the default is Prepaid. How do I make it Postpaid?

Not applicable

Presettings:

Under my Developer Portal, under Developer role, I have the permissions to create a company.

Result:

My Company is created with Prepaid method of payment, so I am required to top-up the balance in order to purchase packages.

Desired Result:

I wish the Company to be created with postpaid method of peyment (or at least a choice to do so when creating a Company).

Anyone has experience in this?

1 8 726
8 REPLIES 8

Great Question @lironskurka , Thank you for highlighting same & Welcome to Apigee Community !

I have seen this issue earlier. I have just done a quick research i found out that, It's automatically get assigned based on Developer Billing Type when developer creates company. Developer has attribute called "MINT_BILLING_TYPE".

Ideally these attributes should show up in Edge UI / Exposed in Developer Portal as a self service fields so that developer can pick & choose. Looks like its not.

You can see the default settings in admin/config/people/accounts/fields/field_mint_billing_type in Developer Portal as administrator.

You can observe that default is set to PREPAID in above page.

5163-screen-shot-2017-06-22-at-14712-pm.png

You can expose this field to the user in the registration form by choosing the option Required & Display on user registration form in above settings page.

5165-billing-type.png

Save the settings, Clear All Caches. You will now see the billing type field in registration where user can pick & choose whether he would like to be prepaid or postpaid. Based on the same when user creates company he will see the type as postpaid or prepaid.

5167-screen-shot-2017-06-22-at-23007-pm.png

Create company form,

5166--create-company.png

Hope it helps & Let us know if your query is resolved or not. Keep us posted if any.

Please feel free to ask any queries you have in community here. Looking forward to see similar great questions.

Hi Anil thanks for the quick response,

I changed the value as explained:

5171-apigee1.png

unfortunately it is not working,

when deleting an old developer and adding him again he have the same value for MINT_BILLING_TYPE
<Attribute> <Name>MINT_BILLING_TYPE</Name> <Value>PREPAID</Value> </Attribute>

when adding a new developer, I can login with it but when using the API https://api.enterprise.apigee.com/v1/organizations/{org}/developers
he is not on the list, so I cannot find out the attribute value
in addition when I'm trying to create a company with this developer I get:

Fatal error: Call to a member function getEmail() on a non-object in /srv/bindings/0b81d72f33c8420983a06f49babd295e/code/profiles/apigee/modules/custom/devconnect/devconnect_monetization/devconnect_monetization.module on line 1706

5172-apigee1.png

@lironskurka , When you change above default field value, It will be applicable for new users who will register in the developer portal.

As i have explained earlier in above answer, When you expose the field in the user registration form developers can pick the billing type during registration. If developer selects same, he can able to create a company using post paid type. Have you tried with new user ?

Any reason you are deleting the old developer & adding him again ? Can you try with new developer email ?

@lironskurka , I have seen above error, I think it's due to either missing properties for your edge org where postpaid billing type was not enabled or it's due to devportal connection settings where user role don't have access to create the mint user.

I am working on enabling those settings for you. I will keep you posted.

@lironskurka ,

It turned out to be your demo org was not enabled for postpaid billing type. I can see the logs that reflects same.

5173-screen-shot-2017-06-22-at-8-47-16-pm.png

I have updated the edge properties MINT_SUPPORTED_BILLING_TYPE to BOTH. It should work fine now in your developer portal. For others who see similar issue contact Apigee Support to get it fixed.

@lironskurka , Issue should be fixed in developer portal, Please give it a try & let us know. If your query is resolved, Please accept the answer by clicking on accept link below answer so that it will be helpful for others.

Hope it helps. Keep us posted if any.

llynch
Participant IV

Hi @lironskurka,

Great question! Definitely warrants a more specific use case in the documentation (which I'll add to my to-do list).

I'm not 100% sure why you are getting the error above following Anil's great suggestion.

But I wanted to offer another option for configuring the billing type for the company.


First, you need to make sure that your organization supports both PREPAID and POSTPAID billing types. You can do that by viewing your organization profile, as described in Viewing the organization profile using the API. Make sure supportedBillingType is set to BOTH.


Then, you can update your company configuration to set the MINT_BILLING_TYPE value to POSTPAID, as described in Update Company. The following shows an example request body:

{
    "name": "test-company",
    "attributes": [
        {
            "name": "MINT_BILLING_TYPE",
            "value": "POSTPAID"
        }
            ]
}

Hope this helps! Let us know if it works.

The information that Anil has provided above is another good use case to test and capture in the docs, which I'll add to my to-do list.

Next, will try to figure out why you might be getting the error above.


Thanks for your question!
Liz

Thank you @Liz Lynch , Yes, You are right. It's due to MINT_BILLING_TYPE , I have fixed same for above org.

@Liz Lynch , Do you know why we haven't exposed BILLING TYPE while creating the company or user in Developer Portal ? @Chris Novak Any pointers ?