Bienvenue

Espace Développeurs et Intégrations

Image Image

Documentation API

Apprenez les bases de l'intégration API pour commencez à accepter des paiements en ligne facilement

    
    
    require 'vendor/autoload.php';
    
    //if you want to change the namespace/path from 'UbexPay' - lines[1-5] - to your desired name,
    i.e. (use UbexPay\Api\Amount; to use MyDomain\Api\Amount;), then you must change the folders name that holds
    the API classes as well as change the property 'UbexPay' in (autoload->psr-0) of (php-sdk/composer.json) file to your
    desired name and run "composer dump-autoload" command from sdk root
                                    
    use UbexPay\Api\Payer;
    use UbexPay\Api\Amount;
    use UbexPay\Api\Transaction;
    use UbexPay\Api\RedirectUrls;
    use UbexPay\Api\Payment;
                                    
    //Payer Object
    $payer = new Payer();
    $payer->setPaymentMethod('UbexPay'); //preferably, your system name, example - UbexPay
                                    
    //Amount Object
    $amountIns = new Amount();
    $amountIns->setTotal(20)->setCurrency('DZD'); //must give a valid currency code and must exist in merchant wallet list
                                    
    //Transaction Object
    $trans = new Transaction();
    $trans->setAmount($amountIns);
                                    
    //RedirectUrls Object
    $urls = new RedirectUrls();
    $urls->setSuccessUrl('http://your-merchant-domain.com/example-success.php') //success url - the merchant domain page,
    to redirect after successful payment, see sample example-success.php file in sdk root,
    example - http://ubexpay.com/UbexPay_sdk/example-success.php
    ->setCancelUrl('http://your-merchant-domain.com/'); //cancel url - the merchant domain page, to redirect after
    cancellation of payment, example -  http://ubexpay.com/UbexPay_sdk/
                                    
    //Payment Object
    $payment = new Payment();
    $payment->setCredentials([ //client id & client secret, see merchants->setting(gear icon)
    'client_id' => 'place your client id here', //must provide correct client id of an express merchant
    'client_secret' => 'place your client secret here' //must provide correct client secret of an express merchant
    ])->setRedirectUrls($urls)
    ->setPayer($payer)
    ->setTransaction($trans);
                                    
    try {
     $payment->create(); //create payment
     header("Location: ".$payment->getApprovedUrl()); //checkout url
    } catch (Exception $ex) {
     print $ex;
     exit;
    }
                                
                                
                                
                                
Trial
Pour Commerçant

Commandez votre Appareil

Terminal de paiement moderne pour acceper cartes de crédit et applications.
Image
Pour Développeur

Documentation API Avancée

Guide avancé pour intégrer et relier votre compte à vos application et sites.
Image

Téléchargement

Choisissez le type de plugin pour votre site Web ou application et commencez à accepter les paiements
Partner
Partner
Partner
Partner
Partner
Partner

FAQs en Ligne

Plus d'informations sur notre centre de support
Banner

Guide API Simple

Étapes simples pour paramétrer et activer votre API

    
    
                  
    use UbexPay\Api\Payer;
    use UbexPay\Api\Amount;
    use UbexPay\Api\Transaction;
    use UbexPay\Api\RedirectUrls;
    use UbexPay\Api\Payment;
                                    
    //Payer Object
    $payer = new Payer();
    $payer->setPaymentMethod('UbexPay'); //preferably, your system name, example - UbexPay
                                    
    //Amount Object
    $amountIns = new Amount();
    $amountIns->setTotal(20)->setCurrency('DZD'); //must give a valid currency code and must exist in merchant wallet list
                                    
    //Transaction Object
    $trans = new Transaction();
    $trans->setAmount($amountIns);
                                    
    //RedirectUrls Object
    $urls = new RedirectUrls();
    $urls->setSuccessUrl('http://your-merchant-domain.com/example-success.php') //success url - the merchant domain page,
    to redirect after successful payment, see sample example-success.php file in sdk root,
    example - http://ubexpay.com/UbexPay_sdk/example-success.php
    ->setCancelUrl('http://your-merchant-domain.com/'); //cancel url - the merchant domain page, to redirect after
    cancellation of payment, example -  http://ubexpay.com/UbexPay_sdk/
                                    
  
                                
                                
                                
                                
Trial

Commencez En Direct
Maintenant