Skip to content

API Documentation: Charging for your app

Muthu edited this page Jun 16, 2017 · 7 revisions

Yahoo Commerce Central supports multiple Billing API endpoints that allow app developers create and activate application charge through the Commerce Central on-boarding flow. This allows you to integrate app payment within the existing customer installation flow, improving conversions and simplifying revenue share calculation and month-end reporting.

We currently support two types of charges:

We strongly recommend you to use our Billing API instead of other third-party solutions to bill your users.

How it works

When a user installs your app from Yahoo Commerce Central App Gallery, he is redirected to the welcome_url of your app specified by you during the app on-boarding process ( Please check New Customer App Installations for more details). Your app can then use the Billing API and its associated multi-step flow to create and activate charge for your app.

  1. Once at the welcome url, you can add a charge using our API.

  2. On success of the above, a confirmation_url is returned which you can then use to redirect the user so that they have the option to accept/decline the charge.

  3. When a user accepts/declines the charge he will be redirected back to the return_url that you specified in the payload while adding the charge.

  4. At this stage, to know whether the charge has been accepted or declined by the user, you have to make a get charge API call.

  5. If charge was accepted, you can activate the charge by making the activate API call. Only when the activate charge has gone through successfully will the user actually be charged (post this step you should still do a get charge API call to check the status of the charge, even if the activate charge call had failed).

  6. If the charge has been activated, your app must begin the advertised service.

NOTE: You have 48 hours to activate the confirmed charges following which the un-activated charges get deleted and you will need to go through the entire flow again.

The details of the APIs can be found at Recurring-AppCharge-APIs and Application-Charge-APIs depending on the type of charge required.

NOTE:

  • For any billing period only one application charge is active. New charge gets activated only from the next billing cycle.
  • Prorated charges for cancellations are applicable only for the recurring application charge plan and not for one-time payment charge.

Getting Started

Currently, all you need to do to get started with direct pay is to email ycc-dev@yahoo-inc.com, indicating your interest along with your app information. We'll work closely with you to set up your pricing plans within our system and walk you through the flow. Concurrently, you can continue to work on your app developments.

Multiple Tier Charges

If you have complicated charge model including multiple tiers of recurring charges and multiple tiers of usages charges or a combination of both, then send an email to ycc-dev@yahoo-inc.com. We can help you to set up your pricing plans within our system.