Module: AcceptOn::API::Refunding

Includes:
Utils
Included in:
Client
Defined in:
lib/accepton/api/refunding.rb

Instance Method Summary collapse

Instance Method Details

#refund(args = {}) ⇒ AcceptOn::Refund

Refunds a charge by the specified amount

Examples:

Create a refund of $1.00 on charge chg_47ce6dacb1ec5124

refund(amount: 1_00, charge_id: 'chg_47ce6dacb1ec5124')

Parameters:

  • args (Hash) (defaults to: {})

    Attributes to set on the refund

Options Hash (args):

  • :amount (Integer)

    The amount in cents to refund

  • :charge_id (String)

    The id of the charge to refund

Returns:

Raises:



21
22
23
# File 'lib/accepton/api/refunding.rb', line 21

def refund(args = {})
  perform_post_with_object('/v1/refunds', args, AcceptOn::Refund)
end