Class RefundProcessor

java.lang.Object
ru.loolzaaa.youkassa.processors.RefundProcessor

public class RefundProcessor extends Object
Processor for Refund entity.

Using the API, you can return payments - in full or in part. The refund procedure depends on the payment method (payment_method) of the original payment. When paying with a bank card, the money is returned to the card that was used to make the payment.

Some payment methods (for example, cash) do not support returns.

Use ApiClient for API server communication.

  • Constructor Details

    • RefundProcessor

      public RefundProcessor()
  • Method Details

    • findById

      public Refund findById(String refundId)
      Receive information about some Refund by its identifier.
      Parameters:
      refundId - refund identifier
      Returns:
      refund entity with actual status
      Throws:
      IllegalArgumentException - if refund id is null or empty
    • findAll

      public PaginatedResponse<Refund> findAll(RefundList refundList)
      Receive information about all refunds with some filter conditions.
      Parameters:
      refundList - collection with filter conditions
      Returns:
      listed refund entities
      See Also:
    • create

      public Refund create(Refund refundParams, String idempotencyKey)
      Creates new Refund entity with certain parameters.

      Generate random idempotency key if corresponding argument is null.

      Parameters:
      refundParams - parameters for new refund
      idempotencyKey - idempotency key
      Returns:
      new refund entity with actual status
      Throws:
      IllegalArgumentException - if refund parameters is null