Browse project documentation

NextPay

Pardakhtv1.0.0-beta.4View sourceEnglish / Persian

NextPay payment gateway. REST-based.

Configuration

use Eram\Pardakht\Gateway\NextPay\NextPayConfig;

$config = new NextPayConfig(
    apiKey: 'your-api-key',
);
ParameterTypeRequiredDescription
apiKeystringYesYour NextPay API key

Purchase

$gateway = $pardakht->create('nextpay', $config);

$response = $gateway->purchase(new PurchaseRequest(
    amount: Amount::fromToman(50_000),
    callbackUrl: 'https://example.com/callback',
    orderId: 'ORDER-123',
));

header('Location: ' . $response->getUrl());

Verify

$transaction = $gateway->verify();

Settlement

Not required. Payments are settled automatically.

Notes

  • REST-based
  • Amount is sent in Rials

Search documentation

Search across all projects. Close this window to return to your guide.

Tab to navigate · Enter to openEsc to close