Passer au contenu principal
Accédez au service via $orqex->checkouts(). Chaque méthode renvoie un Checkout typé dont la propriété payment porte le PaymentIntent lié.

Créer

$checkout = $orqex->checkouts()->create([
    'amount'        => 50,
    'currency'      => 'XOF',
    'description'   => 'Commande #1024',
    'return_url'    => 'https://shop.example.com/return',
    'webhook_url'   => 'https://shop.example.com/webhooks/orqex',
    'customer'      => ['email' => '[email protected]', 'first_name' => 'Ama', 'last_name' => 'Mensah'],
    'customization' => ['brand' => 'Ma boutique', 'color' => '#000000', 'lang' => 'fr'],
]);

header('Location: ' . $checkout->url);

Récupérer & expirer

$checkout = $orqex->checkouts()->retrieve('cs_123');

$checkout->status;       // "open" | "completed" | "expired" | "cancelled"
$checkout->payment->id;  // l'intention de paiement liée

$orqex->checkouts()->expire('cs_123');

Méthodes

MéthodeRenvoie
create(array $params, $opts = null)Checkout
retrieve(string $checkoutId, $opts = null)Checkout
expire(string $checkoutId, $opts = null)Checkout
Voir le concept Checkout pour le flux hébergé.