@extends('developer.layouts.master')
@section('content')
<div class="developer-body-wrapper">
<div class="developer-main-wrapper">
<div class="row mb-30-none">
<div class="col-lg-6 mb-30">
<h1 class="heading-title mb-20">{{ __("Get Access Token") }}</h1>
<p>{{ __("Get access token to initiates payment transaction.") }}</p>
<div class="mb-10">
<strong>{{ __("Endpoint") }}:</strong> <span class="badge custom rounded-pill bg-primary">POST</span> <code class="fw-bold fs-6" style="color: #EE8D1D;"><code></code>generate-token</code>
</div>
<div class="table-responsive">
<table class="table table-striped token-table">
<thead>
<tr>
<th scope="col">{{ __("Parameter") }}</th>
<th scope="col">{{ __("Type") }}</th>
<th scope="col">{{ __("Comments") }}</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">client_id</th>
<td>string</td>
<td>{{ __("Enter merchant API client/primary key") }}</td>
</tr>
<tr>
<th scope="row">secret_id</th>
<td>string</td>
<td>{{ __("Enter merchant API secret key") }}</td>
</tr>
<tr>
<th scope="row">env</th>
<td>string</td>
<td>{{ __("Enter merchant API environment") }}</td>
</tr>
<tr>
<th scope="row">merchant_id</th>
<td>string</td>
<td>{{ __("Enter merchant API merchant id") }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-lg-6 mb-30">
<span class="mb-10">{{ __("Just request to that endpoint with all parameter listed below") }}:</span>
<pre class="prettyprint mt-0" style="white-space: normal;">
<span class="code-show-list">
<span>Request Example (guzzle)</span>
<br>
<span>
<br><?php
<br> require_once('vendor/autoload.php');
<br> $client = new \GuzzleHttp\Client();
<br> $response = $client->request('POST', $base_url. 'v1/generate-token', [
<br>'headers' => [
<br> 'accept' => 'application/json',
<br> 'content-type' => 'application/json',
<br> ],
<br>'form_params' => [
<br> 'client_id' => '$client_id',
<br> 'secret_id' => 'secret_id',
<br> 'env' => 'env',
<br> 'merchant_id' => 'merchant_id',
<br> ],
<br>]);
<br>echo $response->getBody();
</span>
</span>
</pre>
<pre class="prettyprint mt-0" style="white-space: normal;">
<span class="code-show-list">
<br>**Response: SUCCESS (200 OK)**
<br>{
<br> "message": {
<br> "success": [
<br> "Successfully token is generated"
<br> ]
<br>},
<br>"data": {
<br> "token":"eyJpdiI6InpkczhjTjhQdVhUL2lKQ0pSUUx6aUE9P</br>SIsInZhbHVlIjoiVGVBTVBDTXltbjNZcEIvdEJveGpTSno3TU5NRUtn</br>VkhCZ1pHTFNCUnZGQ2UxMnYxN202cEE1YVRDTEFsc0ZERExoTjdtL0dTL2x</br>oU3QzeUJJOExiMUx5T0w1L0llUXhTUkU1cWVLWEdEbEplb0dKNXcwbTNRM0</br>VxdkUwYzZuNFdtNkhMQ0pRZysyNWkvdzBxSlBoSVBSOGFTekNnR2RXNHVtc</br>G9lMGZOTmNCcm1hR3c5Sk9KTnB4Y3ltZDl6cm90MThrR21Ca3B1azc3bXRi</br>Q0J6SW96UVo1elNkU1ZqeE05bTcwWGp1MEUxWlJFdnNWTmpSbnVpeW92b2U</br>4dXZkUGgyb1VmK0luaGdyaFlsVTZlcVpVRnZlTG1DeFF6Ykk2T2h6Z3Jzbn</br>IyNHpNdHowSE5JdDR0Y0pZT20zUm1XYW8iLCJtYWMiOiJlY2M4NGE1OGUzYz</br>kzYzk0YzljNmVmNjE0YWI0ZDIwOGI3NDQ2YWEyY2ZhNzc0NzE4ZmY1ZmYyMz</br>
IyZmQzNDY1IiwidGFnIjoiIn0=",
<br>},
<br>"type": "success"
<br>}
</span>
</pre>
<pre class="prettyprint mt-0" style="white-space: normal;">
<span class="code-show-list">
<br>**Response: ERROR (400 FAILED)**
<br>{
<br> "message": {
<br> "error": [
<br> "Invalid credentials."
<br> ]
<br>},
<br>"data": null,
<br>"type": "error"
<br>}
</span>
</pre>
</div>
</div>
</div>
<div class="page-change-area">
<div class="navigation-wrapper">
<a href="{{ setRoute('frontend.developer.base.url') }}" class="left"><i class="las la-arrow-left me-1"></i> {{ __("Base URL") }}</a>
<a href="{{ setRoute('frontend.developer.initiate.payment') }}" class="right">{{ __("Initiate Payment") }} <i class="las la-arrow-right ms-1"></i></a>
</div>
</div>
</div>
@endsection
Service Section
Discover how our services are designed to enhance your NFC Pay experience with convenience, security, and innovative solutions. From managing transactions to secure payments, we are dedicated to providing seamless support every step of the way.
Easily save your credit and debit card details within our app for quick and secure transactions. This feature ensures that your payment information is protected with advanced encryption and can be used for future purchases with just a tap.
Transfer funds quickly and securely between users with our streamlined money transfer service. Simply select the recipient, enter the amount, and authorize the transaction for instant, hassle-free transfers.
Activate your merchant account effortlessly to start receiving payments. Our intuitive setup process ensures that you can begin accepting transactions smoothly, helping your business thrive with minimal setup time.
Keep track of all your transactions in real time through our app. Monitor payment statuses, view transaction history, and manage your account efficiently, ensuring complete control over your financial activities.
Our dedicated support team is available to assist you with any queries or issues. Whether you need help with setting up your account or resolving transaction-related questions, we’re here to provide prompt and reliable assistance.