PHP SDK
One PHP file for any PHP application: create invoices, read their status and verify webhooks.
- Type
- Library
- Category
- Developers
- Download
- 4 KB
- Price
- Free
Set it up in 4 steps
- 1
Copy Cryptain.php into your project.
- 2
Create an API key in Cryptain (Stores → your store).
- 3
Create an invoice and redirect the customer to its checkout_url.
- 4
Verify webhooks with Cryptain::verifyWebhook() before fulfilling the order.
require 'Cryptain.php';
$c = new Cryptain('https://cryptain.net', 'pk_...', 'sk_...');
$invoice = $c->createInvoice(['amount' => '25.00', 'currency' => 'USD', 'order_id' => '1001']);
header('Location: ' . $invoice['checkout_url']); Open an account in two minutes
Free to start. 1% per payment. Upgrade any time.