简体   繁体   中英

How to make seller pay the transaction fees when creating Paypal recurring subscription plan by using paypal-ruby-sdk


I'm using paypal-ruby-sdk to create recurring subscriptions by credit cards. When I create subscription plan, I set transaction(setup_fee) fee to zero. So paypal sandbox returns webhooks and the transaction fee is paid to PayPal according to their transaction fee rules.

But I'm not sure who pays the fee to PayPal. I want a seller to pay the fee.
The below code shows subscription plan creation I wrote:

plan = Plan.new({
  :name => self.unique_key,
  :description => self.title,
  :type => 'fixed',
  :payment_definitions => [{
    :name => self.unique_key,
    :type => 'REGULAR',
    :frequency_interval => 'MONTH',
    :frequency => '1',
    :cycles => '999',
    :amount => {
      :currency => 'USD',
      :value => (self.price / 100.0).ceil(2).to_s
    }
  },
  :merchant_preferences => {
    :setup_fee => {
      :currency => 'USD',
      :value => 0
    },
    :cancel_url => packages_url,
    :return_url => profile_url + "#subscription",
    :max_fail_attempts => '0',
    :auto_bill_amount => 'YES',
    :initial_fail_amount_action => 'CONTINUE'
  }
})


I'm not sure it will charge fee to the seller. Any help would be welcome.
Thank you.

The fees will be on the receiver side and not the seller side.

Thank you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM