Class: Stripe::PaymentIntentService::CreateParams::TransferData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/payment_intent_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, destination: nil) ⇒ TransferData

Returns a new instance of TransferData.



2250
2251
2252
2253
# File 'lib/stripe/services/payment_intent_service.rb', line 2250

def initialize(amount: nil, destination: nil)
  @amount = amount
  @destination = destination
end

Instance Attribute Details

#amountObject

The amount that will be transferred automatically when a charge succeeds. The amount is capped at the total transaction amount and if no amount is set, the full amount is transferred.

If you intend to collect a fee and you need a more robust reporting experience, using [application_fee_amount](stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) might be a better fit for your integration.



2243
2244
2245
# File 'lib/stripe/services/payment_intent_service.rb', line 2243

def amount
  @amount
end

#destinationObject

If specified, successful charges will be attributed to the destination account for tax reporting, and the funds from charges will be transferred to the destination account. The ID of the resulting transfer will be returned on the successful charge’s ‘transfer` field.



2248
2249
2250
# File 'lib/stripe/services/payment_intent_service.rb', line 2248

def destination
  @destination
end