title: How to set applicaion fee to zero for reccurring payments using Stripe::Plan API
body: <p>I have been asked to set up an application fee of zero as per my Client's request. I was successfully able to do it using Stripe:Charge create by simply not passing the application fee.
  However, with recurring payment we use a different API which is Stripe::Plan.create. This does not allow me to set the application fee to zero, so my recurring payments are been charged a certain amount of fee
  Shared below is the code for recurring payment:</p>
  <pre><code>
      # on recurring retrieve application fee
      def retrieve_invoice_application_fee(invoice_id)
        begin
          invoice_response = Stripe::Invoice.retrieve(invoice_id, :stripe_account =&gt;  candidate.stripe_gateway_id, stripe_version: '2019-12-03')
          application_fee = 0
        rescue StandardError =&gt; e
          puts &quot;************ Invoice retrieve #{e} ************&quot;
        end
        application_fee 
      end
  
      def create_or_find_stripe_plan  
        begin
          response = Stripe::Plan.retrieve(&quot;#{candidate.stripe_gateway_id}-#{amount}&quot;,{:stripe_account =&gt; candidate.stripe_gateway_id, stripe_version: '2019-12-03',})
        rescue =&gt; e
          response = e
        end
        if response.inspect.to_s.downcase.include?(&quot;no such plan&quot;)
          response = Stripe::Plan.create({
              :amount =&gt; amount_cents,  
              :interval =&gt; 'month',
              :interval_count =&gt; 1,
              :currency =&gt; candidate.candidate_country[candidate.country.to_s.to_sym][:currency],
              product: {name: &quot;#{candidate.stripe_gateway_id}-#{amount}&quot;, statement_descriptor:  &quot;test statement&quot;, },
            },
              :stripe_account =&gt; candidate.stripe_gateway_id, stripe_version: '2019-12-03',
          )
        end
        response
      end
  
  </code></pre>
  <p>I suppose the billing_scheme parameter can help me fix this. Shared below are the debugged logs for a test paument</p>
  <pre><code>=&gt; #&lt;Stripe::Plan:0x3fb492612ffc id=plan_LxGnco3QDxIUyR&gt; JSON: {
    &quot;id&quot;: &quot;plan_LxGnco3QDxIUyR&quot;,
    &quot;object&quot;: &quot;plan&quot;,
    &quot;active&quot;: true,
    &quot;aggregate_usage&quot;: null,
    &quot;amount&quot;: 5000,
    &quot;amount_decimal&quot;: &quot;5000&quot;,
    &quot;billing_scheme&quot;: &quot;per_unit&quot;,
    &quot;created&quot;: 1656352923,
    &quot;currency&quot;: &quot;usd&quot;,
    &quot;interval&quot;: &quot;month&quot;,
    &quot;interval_count&quot;: 1,
    &quot;livemode&quot;: false,
    &quot;metadata&quot;: {},
    &quot;nickname&quot;: null,
    &quot;product&quot;: &quot;prod_LxGnqDEOfY6Z8a&quot;,
    &quot;tiers&quot;: null,
    &quot;tiers_mode&quot;: null,
    &quot;transform_usage&quot;: null,
    &quot;trial_period_days&quot;: null,
    &quot;usage_type&quot;
  </code></pre>