for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Iamolayemi\Paystack\Endpoints;
class Refund extends Endpoint
{
protected const ENDPOINT = '/refund';
/**
* Initiate a refund on your integration.
*
* @param array<string, mixed> $payload
* @link https://paystack.com/docs/api/#refund-create
*/
public function create(array $payload): self
$this->post($this->url(self::ENDPOINT), $payload);
return $this;
}
* List refunds available on your integration.
* @param array<string, mixed> $query
* @link https://paystack.com/docs/api/#refund-list
public function list(array $query = []): self
$this->get($this->url(self::ENDPOINT), $query);
* Get details of a refund on your integration.
* @link https://paystack.com/docs/api/#refund-fetch
public function fetch(string $reference): self
$this->get($this->url(self::ENDPOINT).'/'.$reference);