Refund - max-power/paymill-ruby GitHub Wiki

Refunds are own objects with own calls for existing transactions. The refunded amount will be credited to the account of the client.

Refund a Transaction

This function refunds a transaction that has been created previously and was refunded in parts or wasn’t refunded at all. The inserted amount will be refunded to the credit card / direct debit of the original transaction. There will be some fees for the merchant for every refund.

Note:

  • You can refund parts of a transaction until the transaction amount is fully refunded.
    But be careful there will be a fee for every refund

  • There is no need to define a currency for refunds, because they will be in the same currency as the original transaction

Paymill::Refund.create('tran_023d3b5769321c649435', amount: 4200, description: 'Test Refund 42 EUR')
transaction = Paymill::Transaction.find('tran_023d3b5769321c649435')
transaction.refund!(4200, 'Test Refund 42 EUR') if transaction.refundable?

Refund Details

Returns detailed informations of a specific refund.

Paymill::Refund.find('refund_87bc404a95d5ce616049')

List Refunds

This function returns a list of existing transactions.
In which order this list is returned depends on the optional parameter order. The following parameters can be used:

  • count # use limit
  • offset # use offset
  • transaction # use where(transaction: 'trans_123123123123')
  • client
  • amount
  • created_at
Paymill::Refund.all