/home/kueuepay/public_html/public/frontend/css/prettify.css
/* GitHub Theme */
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
/* plain text */
.pln {
  color: #ffffffc7;
}
.prettyprint{overflow:auto!important;}

@media screen {
  /* string content */
  .str {
    color: #11dd9c;
  }

  /* a keyword */
  .kwd {
    color: #ffffff;
  }

  /* a comment */
  .com {
    color: #6e6e69;
  }

  /* a type name */
  .typ {
    color: #447b88;
  }

  /* a literal value */
  .lit {
    color: #445588;
  }

  /* punctuation */
  .pun {
    color: #ad7c22;
  }

  /* lisp open bracket */
  .opn {
    color: #333333;
  }

  /* lisp close bracket */
  .clo {
    color: #333333;
  }

  /* a markup tag name */
  .tag {
    color: navy;
  }

  /* a markup attribute name */
  .atn {
    color: teal;
  }

  /* a markup attribute value */
  .atv {
    color: #dd1144;
  }

  /* a declaration */
  .dec {
    color: #333333;
  }

  /* a variable name */
  .var {
    color: teal;
  }

  /* a function name */
  .fun {
    color: #990000;
  }
}
/* Use higher contrast and text-weight for printable form. */
@media print, projection {
  .str {
    color: #006600;
  }

  .kwd {
    color: #006;
    font-weight: bold;
  }

  .com {
    color: #600;
    font-style: italic;
  }

  .typ {
    color: #404;
    font-weight: bold;
  }

  .lit {
    color: #004444;
  }

  .pun, .opn, .clo {
    color: #444400;
  }

  .tag {
    color: #006;
    font-weight: bold;
  }

  .atn {
    color: #440044;
  }

  .atv {
    color: #006600;
  }
}
/* Style */
pre.prettyprint {
  background: #F0F0F0;
  font-family: Menlo, "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid #cccccc;
padding: 20px;
text-align:left;
width: auto;
}

/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
  margin-top: 0;
  margin-bottom: 0;
  color: #888;
}

.linenums li {
  background: #FAFAFA;
  padding-left: 10px;
  border-left: 1px solid #CCC;
}

.linenums li {
  padding-top: 5px;
}

.linenums li + li {
  padding-top: 0;
}

.linenums li:last-child {
  padding-bottom: 5px;
}



/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L4,
li.L5,
li.L6,
li.L7,
li.L8,
li.L9 {
  /* */
}

/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
  /* */
}
Initiate Payment

Initiate Payment

Initiates a new payment transaction.

Endpoint: POST create-order
Parameter Type Details
amount decimal Your Amount , Must be rounded at 2 precision.
currency string Currency Code, Must be in Upper Case (Alpha-3 code)
success_url string Enter your return or success URL
cancel_url string (optional) Enter your cancel or failed URL
                    
                        Request Example (guzzle)
                        

<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $base_url.'create-order', [
'headers' => [
  'Authorization' => 'Bearer '. $authorizationToken,
  'accept' => 'application/json',
  'content-type' => 'application/json',
 ],
'form_params' => [
  'amount' => '$amount',
  'currency' => 'currency',
  'success_url' => 'success_url',
  'cancel_url' => 'cancel_url',
 ],
]);
echo $response->getBody();
                    
                        
**Response: SUCCESS (200 OK)**
{
 "message": {
 "success": [
  "Order created successfully."
 ]
},
"data": {
 "redirect_url":"https://example.com/login/OISADFDFSDFSF",
 "order_details":{
 "amount" : "10",
 "fixed_charge" : 2,
 "percent_charge" : 1,
 "total_charge" : 3,
 "total_payable" : 13,
 "currency" : "USD",
 "expiry_time": "2024-04-25T06:48:35.984285Z",
 "success_url": "http://127.0.0.1/nfcpay/user/transaction/success",
 "cancel_url": "http://127.0.0.1/nfcpay/user/transaction/cancel"
}
},
"type": "success"
}
                    
                        
**Response: ERROR (400 FAILED)**
{
 "message": {
 "error": [
  "Invalid token."
 ]
},
"data": null,
"type": "error"
}