NAV
bash javascript php python basic android

Info

Welcome to the generated API reference.

Bill V2

Show or Send Bill V2

API untuk menampilkan struk transaksi dan topup

Example request:

curl -X POST \
    "http://localhost:8000/pos/bill-v2" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","type_bill":"topup","id":1,"send_to":"email"}'
const url = new URL(
    "http://localhost:8000/pos/bill-v2"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "type_bill": "topup",
    "id": 1,
    "send_to": "email"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/bill-v2',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'type_bill' => 'topup',
            'id' => 1,
            'send_to' => 'email',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/bill-v2'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "type_bill": "topup",
    "id": 1,
    "send_to": "email"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "type_bill": "topup",
    "id": 1,
    "send_to": "email"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("type_bill")
    val typeBill: String? = null,

    @field:SerializedName("id")
    val id: Int? = null,

    @field:SerializedName("send_to")
    val sendTo: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/bill-v2")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "id": 21,
    "merchant_id": 177,
    "merchant_name": "Automation Merchant",
    "outlet_id": 190,
    "outlet_name": "Automation Outlet",
    "transaction_no": "#Topup21",
    "user_id": 263,
    "user_name": "si automation",
    "customer_id": 342,
    "customer_name": "Pelanggan Terakhir",
    "customer_email": "septiadirahmawan@gmail.com",
    "customer_phone": "082298370644",
    "payment_method": "OVO",
    "status_payment": "success",
    "payment_ref_id": "f07ad1a8-c116-4810-9449-e59ee799f0b8",
    "payment_number": "TOPUP-OVO-21",
    "nominal_topup": "30000.00",
    "saldo_awal": "420500.00",
    "saldo_akhir": "450500.00",
    "created_at": "2021-02-11 11:57:31",
    "updated_at": "2021-02-11 11:57:38",
    "created_by": 263,
    "updated_by": 263,
    "deleted_at": null,
    "deleted_by": null,
    "membership_id": "RWS-00342"
}

HTTP Request

POST /pos/bill-v2

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
type_bill enum required Hanya boleh diisi topup/transaction.
id integer required Id transaksinya.
send_to enum optional Jika terisi, hanya boleh diisi email/whatsapp.

Log

List Log

API untuk menampilkan list log

Example request:

curl -X POST \
    "http://localhost:8000/pos/logs" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"portal_monitoring","user_id":1,"user_name":"Nama User","page":"1","limit":"10","search":{},"filter":{"created_at_from":"2021-04-09","created_at_to":"2021-04-09"}}'
const url = new URL(
    "http://localhost:8000/pos/logs"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "page": "1",
    "limit": "10",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/logs',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'portal_monitoring',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'page' => '1',
                'limit' => '10',
                'search' => $o[0],
                'filter' => [
                    'created_at_from' => '2021-04-09',
                    'created_at_to' => '2021-04-09',
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/logs'
payload = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "page": "1",
    "limit": "10",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "page": "1",
    "limit": "10",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("page")
    val page: String? = null,

    @field:SerializedName("limit")
    val limit: String? = null,

    @field:SerializedName("filter.created_at_from")
    val filter.createdAtFrom: String? = null,

    @field:SerializedName("filter.created_at_to")
    val filter.createdAtTo: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/logs")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "current_page": 1,
    "data": [
        {
            "_id": "605a0596aa58000020000374",
            "ip_source": "::1",
            "srq": "portal_monitoring",
            "feature": "Get List Log",
            "path": "\/pos\/logs",
            "method": "POST",
            "merchant_id": null,
            "outlet_id": null,
            "merchant_name": null,
            "outlet_name": null,
            "correlation_id": "POS-vni26oahHecd5TNPQkce-605a059421b1b",
            "response_code": "200",
            "datetime_request": "2021-03-23 22:13:23",
            "datetime_response": "2021-03-23 22:13:26",
            "elapsed_time": "0.0936",
            "is_error": "false",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-23 22:13:26"
        },
        {
            "_id": "605866f743220000cf000ee3",
            "ip_source": "::1",
            "srq": "mobile",
            "feature": "Get Sales Type",
            "path": "\/pos\/outlet\/sales-type",
            "method": "POST",
            "merchant_id": 159,
            "outlet_id": 173,
            "merchant_name": "Test",
            "outlet_name": "Outlet 01 Cipondoh",
            "correlation_id": "POS-XmqkXpmvzbdtTCT2fgBN-605866f76712f",
            "response_code": "200",
            "datetime_request": "2021-03-22 16:44:23",
            "datetime_response": "2021-03-22 16:44:23",
            "elapsed_time": "0.0867",
            "is_error": "false",
            "created_by": "238",
            "user_name": null,
            "created_at": "2021-03-22 16:44:23"
        },
        {
            "_id": "6058648243220000cf000ee2",
            "ip_source": "::1",
            "srq": "mobile",
            "feature": "Create Topup",
            "path": "\/pos\/membership\/topup",
            "method": "POST",
            "merchant_id": 159,
            "outlet_id": 173,
            "merchant_name": "Test",
            "outlet_name": "Outlet 01 Cipondoh",
            "correlation_id": "POS-rAFxpGjcpleAYJXlS1KC-6058647ff32c0",
            "response_code": "200",
            "datetime_request": "2021-03-22 16:33:51",
            "datetime_response": "2021-03-22 16:33:54",
            "elapsed_time": "0.1079",
            "is_error": "false",
            "created_by": "238",
            "user_name": "Andy",
            "created_at": "2021-03-22 16:33:54"
        },
        {
            "_id": "605838b0e02d0000830024b2",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "POST",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-leVPQ7yTMtInlc9Uol1h-605838af65873",
            "response_code": "200",
            "datetime_request": "2021-03-22 13:26:55",
            "datetime_response": "2021-03-22 13:26:56",
            "elapsed_time": "0.1592",
            "is_error": "false",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 13:26:56"
        },
        {
            "_id": "605821e961780000d0001c66",
            "ip_source": "::1",
            "srq": "pos",
            "feature": null,
            "path": "\/pos\/membership\/my-rewardx",
            "method": "POST",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-Dyp7Y43FAI3uZZ1GEVvf-605821e955964",
            "response_code": "404",
            "datetime_request": "2021-03-22 11:49:45",
            "datetime_response": "2021-03-22 11:49:45",
            "elapsed_time": "0.0649",
            "is_error": "1",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:49:45"
        },
        {
            "_id": "605820a661780000d0001c65",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "POST",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-PRb09W4oMZz7HTZin4u1-605820a646672",
            "response_code": "200",
            "datetime_request": "2021-03-22 11:44:22",
            "datetime_response": "2021-03-22 11:44:22",
            "elapsed_time": "0.0591",
            "is_error": "false",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:44:22"
        },
        {
            "_id": "60581fe161780000d0001c64",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "POST",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-9yKTN3jc2M8nImtnRgaU-60581fe021073",
            "response_code": "200",
            "datetime_request": "2021-03-22 11:41:03",
            "datetime_response": "2021-03-22 11:41:05",
            "elapsed_time": "0.0667",
            "is_error": "false",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:41:05"
        },
        {
            "_id": "60581fdc61780000d0001c62",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "GET",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-FusQHtWyTlSrsfhEY6NY-60581fdc30b0f",
            "response_code": "400",
            "datetime_request": "2021-03-22 11:41:00",
            "datetime_response": "2021-03-22 11:41:00",
            "elapsed_time": "0.0527",
            "is_error": "1",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:41:00"
        },
        {
            "_id": "60581fa561780000d0001c60",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "GET",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-R5eJOWL0azlg8TzrPjcN-60581fa568aee",
            "response_code": "400",
            "datetime_request": "2021-03-22 11:40:05",
            "datetime_response": "2021-03-22 11:40:05",
            "elapsed_time": "0.0441",
            "is_error": "1",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:40:05"
        },
        {
            "_id": "60581f6861780000d0001c5e",
            "ip_source": "::1",
            "srq": "pos",
            "feature": "Get List My Reward",
            "path": "\/pos\/membership\/my-reward",
            "method": "GET",
            "merchant_id": 177,
            "outlet_id": 190,
            "merchant_name": "Automation Merchant",
            "outlet_name": "Automation Outlet",
            "correlation_id": "POS-d5IQ97nEOmbnUAJQKGUu-60581f683d716",
            "response_code": "400",
            "datetime_request": "2021-03-22 11:39:04",
            "datetime_response": "2021-03-22 11:39:04",
            "elapsed_time": "0.0634",
            "is_error": "1",
            "created_by": "1",
            "user_name": null,
            "created_at": "2021-03-22 11:39:04"
        }
    ],
    "first_page_url": "http:\/\/localhost:8000\/pos\/logs?page=1",
    "from": 1,
    "last_page": 29,
    "last_page_url": "http:\/\/localhost:8000\/pos\/logs?page=29",
    "next_page_url": "http:\/\/localhost:8000\/pos\/logs?page=2",
    "path": "http:\/\/localhost:8000\/pos\/logs",
    "per_page": 10,
    "prev_page_url": null,
    "to": 10,
    "total": 284
}

HTTP Request

POST /pos/logs

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
page string optional optional Page yang diinginkan.
limit string optional optional Limit data yang tampil.
search object optional Bersifat menyerupai (like).
filter object optional Bersifat mutlak (=).
filter.created_at_from string optional optional Filter tanggal awal.
filter.created_at_to string optional optional Filter tanggal akhir.

Detail Log

API untuk menampilkan detail log

Example request:

curl -X POST \
    "http://localhost:8000/pos/logs/detail" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"portal_monitoring","user_id":1,"user_name":"Nama User","search":{"_id":"60701513b578000028006f39"}}'
const url = new URL(
    "http://localhost:8000/pos/logs/detail"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "search": {
        "_id": "60701513b578000028006f39"
    }
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/logs/detail',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'portal_monitoring',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'search' => [
                '_id' => '60701513b578000028006f39',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/logs/detail'
payload = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "search": {
        "_id": "60701513b578000028006f39"
    }
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "search": {
        "_id": "60701513b578000028006f39"
    }
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("search._id")
    val search.Id: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/logs/detail")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "_id": "605866f743220000cf000ee3",
    "ip_source": "::1",
    "srq": "mobile",
    "feature": "Get Sales Type",
    "path": "\/pos\/outlet\/sales-type",
    "method": "POST",
    "merchant_id": 159,
    "outlet_id": 173,
    "merchant_name": "Test",
    "outlet_name": "Outlet 01 Cipondoh",
    "headers": "{\"content-type\":[\"application\\\/json\"],\"user-agent\":[\"PostmanRuntime\\\/7.26.10\"],\"accept\":[\"*\\\/*\"],\"postman-token\":[\"7fe6c38e-0567-4035-b185-2d898fc125bb\"],\"host\":[\"localhost:8000\"],\"accept-encoding\":[\"gzip, deflate, br\"],\"connection\":[\"keep-alive\"],\"content-length\":[\"228\"]}",
    "request_body": "{\"data\":\"OBPUXpa8NyMws\\\/8d4FEEzSZ3RYSQKjvPzLwtu5xCap7SXyCp+6E\\\/sdgeLSuEFMZ1qTmBPqz+dm1uMOMJIS6Ji6BIxFRu00BhFd7+68IVFjwJa+IBIdrHBBYwTei6Mic6r3N1zZwv3ro+dlb4kukAt\\\/qlkFNuMu2CNVzE7tPmSPUDKWYjc6k2WgxUvdPpSXuO.NGU1V2E3MWZZb1Q3TUZFWA==\"}",
    "response_body": "{\"data\":\"Qx64dF9PoRtfyTk+MJBU8u67+oiERcbcGmYqOpjKgatfT+R453gbSpjead3ssGxZ7YgbuKEYWiCS8jrBBswGDFDSpivN5ufV30yi2UKid42O0TPrO19ovU6oMMpt5S9rTDb3m05\\\/WEk539WtBuomrXGhJocKPxAptE72wBgUMAiKaRJ32yFpljwBv1rAB4masHDOsmb2qbrihJ7IflT1fw==.TTE4RExLMkJWeWNtZ3JrTg==\",\"message\":\"Data Tipe Pembayaran Berhasil Diambil\",\"response_code\":\"00\",\"server_code\":200}",
    "correlation_id": "POS-XmqkXpmvzbdtTCT2fgBN-605866f76712f",
    "response_code": "200",
    "datetime_request": "2021-03-22 16:44:23",
    "datetime_response": "2021-03-22 16:44:23",
    "elapsed_time": "0.0867",
    "is_error": "false",
    "created_by": "238",
    "user_name": null,
    "created_at": "2021-03-22 16:44:23"
}

HTTP Request

POST /pos/logs/detail

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
search object optional Bersifat menyerupai (like).
search._id string optional optional Filter id.

Feature POS

API untuk menampilkan list log

Example request:

curl -X POST \
    "http://localhost:8000/pos/logs/feature" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"portal_monitoring","user_id":1,"user_name":"Nama User","key":"path"}'
const url = new URL(
    "http://localhost:8000/pos/logs/feature"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "key": "path"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/logs/feature',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'portal_monitoring',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'key' => 'path',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/logs/feature'
payload = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "key": "path"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "key": "path"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("key")
    val key: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/logs/feature")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

[
    "\/pos\/transaction\/create",
    "\/pos\/transaction\/history",
    "\/pos\/transaction\/update-payment",
    "\/pos\/transaction\/change-payment",
    "\/pos\/transaction\/retry-payment",
    "\/pos\/transaction\/check-status",
    "\/pos\/transaction\/recap",
    "\/pos\/transaction\/done",
    "\/pos\/transaction\/send-bill",
    "\/pos\/transaction\/unpaid",
    "\/pos\/transaction\/cancel",
    "\/pos\/sign-in",
    "\/pos\/forgot-password",
    "\/pos\/token\/deposit",
    "\/pos\/token\/history",
    "\/pos\/cash-deposit\/balance",
    "\/pos\/cash-deposit\/list",
    "\/pos\/cash-deposit\/create",
    "\/pos\/cashier-recap\/list",
    "\/pos\/cashier-recap\/detail",
    "\/pos\/cashier-recap\/create",
    "\/pos\/version",
    "\/pos\/queue\/create",
    "\/pos\/queue\/force-off",
    "\/pos\/washing-list2",
    "\/pos\/washing-list\/done",
    "\/pos\/washing-list\/add-rack",
    "\/pos\/get-qr",
    "\/pos\/product-category",
    "\/pos\/product-list",
    "\/pos\/product",
    "\/pos\/merchant\/detail",
    "\/pos\/outlet\/detail",
    "\/pos\/outlet\/payment-method",
    "\/pos\/outlet\/sales-type",
    "\/pos\/customer",
    "\/pos\/customer\/create",
    "\/pos\/customer\/upload-photo",
    "\/pos\/customer\/update",
    "\/pos\/customer\/delete",
    "\/pos\/financial-reports\/category",
    "\/pos\/financial-reports\/list",
    "\/pos\/financial-reports\/view",
    "\/pos\/financial-reports\/create",
    "\/pos\/financial-reports\/update",
    "\/pos\/financial-reports\/delete",
    "\/pos\/logs",
    "\/pos\/logs\/detail",
    "\/pos\/logs\/feature",
    "\/pos\/membership\/nominal-topup",
    "\/pos\/membership\/my-reward",
    "\/pos\/membership\/my-reward-management",
    "\/pos\/membership\/promo",
    "\/pos\/membership\/topup",
    "\/pos\/membership\/check-status",
    "\/pos\/membership\/change-payment",
    "\/pos\/membership\/update-payment",
    "\/pos\/membership\/retry-payment",
    "\/pos\/membership\/send-bill-toptup",
    "\/pos\/bill-v2",
    "\/pos\/claim-error\/check",
    "\/pos\/claim-error\/create"
]

HTTP Request

POST /pos/logs/feature

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
key enum required Kunci yang ingin ditampilkan path/feature.

List Response Code

API untuk menampilkan list response code

Example request:

curl -X POST \
    "http://localhost:8000/pos/logs/response_code" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"portal_monitoring","user_id":1,"user_name":"Nama User"}'
const url = new URL(
    "http://localhost:8000/pos/logs/response_code"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/logs/response_code',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'portal_monitoring',
            'user_id' => 1,
            'user_name' => 'Nama User',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/logs/response_code'
payload = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/logs/response_code")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

[
    200,
    400,
    404
]

HTTP Request

POST /pos/logs/response_code

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.

Export Log

API untuk export log

Example request:

curl -X POST \
    "http://localhost:8000/pos/logs/export" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"portal_monitoring","user_id":1,"user_name":"Nama User","pagination":"1","limit":"10","type":"excel","search":{},"filter":{"created_at_from":"2021-04-09","created_at_to":"2021-04-09"}}'
const url = new URL(
    "http://localhost:8000/pos/logs/export"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "pagination": "1",
    "limit": "10",
    "type": "excel",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/logs/export',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'portal_monitoring',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'pagination' => '1',
                'limit' => '10',
                'type' => 'excel',
                'search' => $o[0],
                'filter' => [
                    'created_at_from' => '2021-04-09',
                    'created_at_to' => '2021-04-09',
                ],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/logs/export'
payload = {
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "pagination": "1",
    "limit": "10",
    "type": "excel",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "portal_monitoring",
    "user_id": 1,
    "user_name": "Nama User",
    "pagination": "1",
    "limit": "10",
    "type": "excel",
    "search": {},
    "filter": {
        "created_at_from": "2021-04-09",
        "created_at_to": "2021-04-09"
    }
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("pagination")
    val pagination: String? = null,

    @field:SerializedName("limit")
    val limit: String? = null,

    @field:SerializedName("type")
    val type: String? = null,

    @field:SerializedName("filter.created_at_from")
    val filter.createdAtFrom: String? = null,

    @field:SerializedName("filter.created_at_to")
    val filter.createdAtTo: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/logs/export")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

HTTP Request

POST /pos/logs/export

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
pagination string optional optional Page yang diinginkan.
limit string optional optional Limit data yang tampil.
type string required Format dokumen excel/pdf.
search object optional Bersifat menyerupai (like).
filter object optional Bersifat mutlak (=).
filter.created_at_from string optional optional Filter tanggal awal.
filter.created_at_to string optional optional Filter tanggal akhir.

Menu Utama

Riwayat

API untuk menampilkan data riwayat transaksi

Example request:

curl -X POST \
    "http://localhost:8000/pos/transaction/history" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","filter":{},"page":1,"row_per_page":14}'
const url = new URL(
    "http://localhost:8000/pos/transaction/history"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/transaction/history',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'mobile',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'merchant_id' => 1,
                'merchant_name' => 'Nama Merchant',
                'outlet_id' => 2,
                'outlet_name' => 'Nama Outlet',
                'filter' => $o[0],
                'page' => 1,
                'row_per_page' => 14,
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/transaction/history'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("page")
    val page: Int? = null,

    @field:SerializedName("row_per_page")
    val rowPerPage: Int? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/transaction/history")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "length": "406",
    "per_page": "14",
    "from": "1",
    "to": "14",
    "current_page": "1",
    "last_page": "29",
    "transaction": [
        {
            "id": "5204",
            "biaya": "45700.00",
            "status": "success",
            "transaction_no": "#Bill5188",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 15:56:06",
            "updated_at": "2021-11-01 15:56:06",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4735",
                    "payment_number": "PAY-CASH-4735",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "50000.00",
                    "payment_original_amount": "45700.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 15:56:06",
                    "updated_at": "2021-11-01 15:56:06"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "35000",
                "sum_tax_amount": "700",
                "taxes": [
                    {
                        "id": "3973",
                        "transaction_id": "5204",
                        "invoice_id": "5204",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "700.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 45700,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "50000",
                "change": "4300",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6136",
                        "product_qty": "1",
                        "product_varian_id": "2130",
                        "product_id": "928",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Tidak Bersih",
                        "product_varian_name": "cuci kering gosong wash 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 45700,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5188",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 15:56:06"
            }
        },
        {
            "id": "5201",
            "biaya": "45700.00",
            "status": "success",
            "transaction_no": "#Bill5185",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 15:31:06",
            "updated_at": "2021-11-01 15:31:07",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4733",
                    "payment_number": "PAY-CASH-4733",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "50000.00",
                    "payment_original_amount": "45700.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 15:31:06",
                    "updated_at": "2021-11-01 15:31:06"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "35000",
                "sum_tax_amount": "700",
                "taxes": [
                    {
                        "id": "3970",
                        "transaction_id": "5201",
                        "invoice_id": "5201",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "700.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 45700,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "50000",
                "change": "4300",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6132",
                        "product_qty": "1",
                        "product_varian_id": "2130",
                        "product_id": "928",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Tidak Bersih",
                        "product_varian_name": "cuci kering gosong wash 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 45700,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5185",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 15:31:07"
            }
        },
        {
            "id": "5196",
            "biaya": "10200.00",
            "status": "success",
            "transaction_no": "#Bill5180",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "512",
            "customer_name": "Disana",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 11:22:54",
            "updated_at": "2021-11-01 11:23:22",
            "tanggal_ambil": "2021-11-01 11:23:22",
            "payment": [
                {
                    "id": "4729",
                    "payment_number": "PAY-OVO-4729",
                    "payment_type": "non_cash",
                    "payment_method_name": "OVO",
                    "total_fee": "1502.00",
                    "payment_amount": "10200.00",
                    "payment_original_amount": "10200.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 11:23:19",
                    "updated_at": "2021-11-01 11:23:22"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "200",
                "taxes": [
                    {
                        "id": "3965",
                        "transaction_id": "5196",
                        "invoice_id": "5196",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "500",
                "sum_discount_amount": "500",
                "total_diskon_produk": 0,
                "total_diskon_service": 500,
                "transaction_grand_total": 10200,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "10200",
                "change": "0",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6126",
                        "product_qty": "1",
                        "product_varian_id": "2449",
                        "product_id": "1013",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Product Baru 1 NOvember",
                        "product_varian_name": "Varian1",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 274,
                        "nama": "Promo Minimal 0 Gratis Diantar",
                        "reward_product_name": "Diantar",
                        "reward_type": "gratis",
                        "reward_value": 1,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "512",
                "customer_name": "Disana",
                "customer_email": "disana@gmail.com",
                "customer_phone": "087263733736",
                "customer_picture_url": "",
                "status_membership": "0",
                "account_balance": "",
                "membership_id": "",
                "transaction_grand_total": 10200,
                "payment_method_name": "OVO",
                "transaction_no": "#Bill5180",
                "sales_type_name": "Diantar",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 11:23:22"
            }
        },
        {
            "id": "5195",
            "biaya": "20200.00",
            "status": "success",
            "transaction_no": "#Bill5179",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "512",
            "customer_name": "Disana",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 11:21:00",
            "updated_at": "2021-11-01 11:22:16",
            "tanggal_ambil": "2021-11-01 11:22:16",
            "payment": [
                {
                    "id": "4728",
                    "payment_number": "PAY-OVO-4728",
                    "payment_type": "non_cash",
                    "payment_method_name": "OVO",
                    "total_fee": "1502.00",
                    "payment_amount": "20200.00",
                    "payment_original_amount": "20200.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 11:22:12",
                    "updated_at": "2021-11-01 11:22:16"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "200",
                "taxes": [
                    {
                        "id": "3964",
                        "transaction_id": "5195",
                        "invoice_id": "5195",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 20200,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "20200",
                "change": "0",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6125",
                        "product_qty": "1",
                        "product_varian_id": "2449",
                        "product_id": "1013",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Product Baru 1 NOvember",
                        "product_varian_name": "Varian1",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "512",
                "customer_name": "Disana",
                "customer_email": "disana@gmail.com",
                "customer_phone": "087263733736",
                "customer_picture_url": "",
                "status_membership": "0",
                "account_balance": "",
                "membership_id": "",
                "transaction_grand_total": 20200,
                "payment_method_name": "OVO",
                "transaction_no": "#Bill5179",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 11:22:16"
            }
        },
        {
            "id": "5194",
            "biaya": "20200.00",
            "status": "success",
            "transaction_no": "#Bill5178",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 11:19:11",
            "updated_at": "2021-11-01 11:19:11",
            "tanggal_ambil": "2021-11-01 11:19:11",
            "payment": [
                {
                    "id": "4727",
                    "payment_number": "PAY-CASH-4727",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "25000.00",
                    "payment_original_amount": "20200.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 11:19:11",
                    "updated_at": "2021-11-01 11:19:11"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "200",
                "taxes": [
                    {
                        "id": "3963",
                        "transaction_id": "5194",
                        "invoice_id": "5194",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 20200,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "25000",
                "change": "4800",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6124",
                        "product_qty": "1",
                        "product_varian_id": "2449",
                        "product_id": "1013",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Product Baru 1 NOvember",
                        "product_varian_name": "Varian1",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "211",
                "customer_name": "Tejoss",
                "customer_email": "gibran1905@gmail.com",
                "customer_phone": "0985224415222",
                "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
                "status_membership": "0",
                "account_balance": "",
                "membership_id": "",
                "transaction_grand_total": 20200,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5178",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 11:19:11"
            }
        },
        {
            "id": "5193",
            "biaya": "20200.00",
            "status": "success",
            "transaction_no": "#Bill5177",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-11-01 11:16:19",
            "updated_at": "2021-11-01 11:18:27",
            "tanggal_ambil": "2021-11-01 11:18:27",
            "payment": [
                {
                    "id": "4726",
                    "payment_number": "PAY-CASH-4726",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "25000.00",
                    "payment_original_amount": "20200.00",
                    "status_payment": "success",
                    "created_at": "2021-11-01 11:18:27",
                    "updated_at": "2021-11-01 11:18:27"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "200",
                "taxes": [
                    {
                        "id": "3962",
                        "transaction_id": "5193",
                        "invoice_id": "5193",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 20200,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "25000",
                "change": "4800",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6123",
                        "product_qty": "1",
                        "product_varian_id": "2449",
                        "product_id": "1013",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Product Baru 1 NOvember",
                        "product_varian_name": "Varian1",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "211",
                "customer_name": "Tejoss",
                "customer_email": "gibran1905@gmail.com",
                "customer_phone": "0985224415222",
                "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
                "status_membership": "0",
                "account_balance": "",
                "membership_id": "",
                "transaction_grand_total": 20200,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5177",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-11-01 11:18:27"
            }
        },
        {
            "id": "5188",
            "biaya": "50800.00",
            "status": "success",
            "transaction_no": "#Bill5172",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:40:41",
            "updated_at": "2021-10-29 16:40:42",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4720",
                    "payment_number": "PAY-CASH-4720",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "60000.00",
                    "payment_original_amount": "50800.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:40:41",
                    "updated_at": "2021-10-29 16:40:41"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "45000",
                "sum_tax_amount": "800",
                "taxes": [
                    {
                        "id": "3957",
                        "transaction_id": "5188",
                        "invoice_id": "5188",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "900.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "5000",
                "total_diskon_produk": 5000,
                "total_diskon_service": 0,
                "transaction_grand_total": 50800,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "60000",
                "change": "9200",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6116",
                        "product_qty": "1",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    },
                    {
                        "id": "6117",
                        "product_qty": "1",
                        "product_varian_id": "2129",
                        "product_id": "927",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 50800,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5172",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:40:42"
            }
        },
        {
            "id": "5187",
            "biaya": "50800.00",
            "status": "success",
            "transaction_no": "#Bill5171",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:32:13",
            "updated_at": "2021-10-29 16:32:13",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4719",
                    "payment_number": "PAY-CASH-4719",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "56000.00",
                    "payment_original_amount": "50800.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:32:13",
                    "updated_at": "2021-10-29 16:32:13"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "45000",
                "sum_tax_amount": "800",
                "taxes": [
                    {
                        "id": "3956",
                        "transaction_id": "5187",
                        "invoice_id": "5187",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "900.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "5000",
                "total_diskon_produk": 5000,
                "total_diskon_service": 0,
                "transaction_grand_total": 50800,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "56000",
                "change": "5200",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6114",
                        "product_qty": "1",
                        "product_varian_id": "2129",
                        "product_id": "927",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    },
                    {
                        "id": "6115",
                        "product_qty": "1",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 50800,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5171",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:32:13"
            }
        },
        {
            "id": "5186",
            "biaya": "15100.00",
            "status": "pending",
            "transaction_no": "#Bill5170",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:29:12",
            "updated_at": "2021-10-29 16:29:12",
            "tanggal_ambil": "-",
            "payment": [],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "100",
                "taxes": [
                    {
                        "id": "3955",
                        "transaction_id": "5186",
                        "invoice_id": "5186",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "5000",
                "total_diskon_produk": 5000,
                "total_diskon_service": 0,
                "transaction_grand_total": 15100,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6113",
                        "product_qty": "1",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 15100,
                "payment_method_name": "",
                "transaction_no": "#Bill5170",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:29:12"
            }
        },
        {
            "id": "5183",
            "biaya": "45700.00",
            "status": "success",
            "transaction_no": "#Bill5167",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:11:40",
            "updated_at": "2021-10-29 16:13:30",
            "tanggal_ambil": "2021-10-29 16:13:30",
            "payment": [
                {
                    "id": "4716",
                    "payment_number": "PAY-CASH-4716",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "50000.00",
                    "payment_original_amount": "45700.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:11:40",
                    "updated_at": "2021-10-29 16:11:40"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "35000",
                "sum_tax_amount": "700",
                "taxes": [
                    {
                        "id": "3952",
                        "transaction_id": "5183",
                        "invoice_id": "5183",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "700.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 45700,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "50000",
                "change": "4300",
                "button_cancel": "false",
                "list_product": [
                    {
                        "id": "6110",
                        "product_qty": "1",
                        "product_varian_id": "2129",
                        "product_id": "927",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 2,
                        "expired_reward": "2021-11-20 23:59:59"
                    }
                ]
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 45700,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5167",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:13:30"
            }
        },
        {
            "id": "5182",
            "biaya": "45700.00",
            "status": "success",
            "transaction_no": "#Bill5166",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:08:56",
            "updated_at": "2021-10-29 16:09:38",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4715",
                    "payment_number": "PAY-CASH-4715",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "50000.00",
                    "payment_original_amount": "45700.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:09:38",
                    "updated_at": "2021-10-29 16:09:38"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "35000",
                "sum_tax_amount": "700",
                "taxes": [
                    {
                        "id": "3951",
                        "transaction_id": "5182",
                        "invoice_id": "5182",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "700.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 45700,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "50000",
                "change": "4300",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6109",
                        "product_qty": "1",
                        "product_varian_id": "2129",
                        "product_id": "927",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 2,
                        "expired_reward": "2021-11-20 23:59:59"
                    }
                ]
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 45700,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5166",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:09:38"
            }
        },
        {
            "id": "5181",
            "biaya": "15100.00",
            "status": "success",
            "transaction_no": "#Bill5165",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:07:34",
            "updated_at": "2021-10-29 16:08:22",
            "tanggal_ambil": "2021-10-29 16:08:22",
            "payment": [
                {
                    "id": "4714",
                    "payment_number": "PAY-CASH-4714",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "20000.00",
                    "payment_original_amount": "15100.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:08:22",
                    "updated_at": "2021-10-29 16:08:22"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "100",
                "taxes": [
                    {
                        "id": "3950",
                        "transaction_id": "5181",
                        "invoice_id": "5181",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "5000",
                "total_diskon_produk": 5000,
                "total_diskon_service": 0,
                "transaction_grand_total": 15100,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "20000",
                "change": "4900",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6108",
                        "product_qty": "1",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 15100,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5165",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:08:22"
            }
        },
        {
            "id": "5180",
            "biaya": "50800.00",
            "status": "success",
            "transaction_no": "#Bill5164",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "transaction_type": "Belum Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 16:04:27",
            "updated_at": "2021-10-29 16:05:23",
            "tanggal_ambil": "-",
            "payment": [
                {
                    "id": "4713",
                    "payment_number": "PAY-CASH-4713",
                    "payment_type": "cash",
                    "payment_method_name": "CASH",
                    "total_fee": "0.00",
                    "payment_amount": "60000.00",
                    "payment_original_amount": "50800.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 16:05:23",
                    "updated_at": "2021-10-29 16:05:23"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "45000",
                "sum_tax_amount": "800",
                "taxes": [
                    {
                        "id": "3949",
                        "transaction_id": "5180",
                        "invoice_id": "5180",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "900.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "5000",
                "total_diskon_produk": 5000,
                "total_diskon_service": 0,
                "transaction_grand_total": 50800,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "60000",
                "change": "9200",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6106",
                        "product_qty": "1",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    },
                    {
                        "id": "6107",
                        "product_qty": "1",
                        "product_varian_id": "2129",
                        "product_id": "927",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [
                    {
                        "id": 306,
                        "nama": "promo jumat akhir wfh",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": [
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 3,
                        "expired_reward": "2021-11-20 23:59:59"
                    }
                ]
            },
            "detail_transaksi": {
                "customer_id": "493",
                "customer_name": "Septi real",
                "customer_email": "septiadi.rahmawan@spesolution.com",
                "customer_phone": "089786876876",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "10000",
                "membership_id": "RWS-00493",
                "transaction_grand_total": 50800,
                "payment_method_name": "CASH",
                "transaction_no": "#Bill5164",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 16:05:23"
            }
        },
        {
            "id": "5177",
            "biaya": "30400.00",
            "status": "success",
            "transaction_no": "#Bill5161",
            "merchant_name": "Merchant Backend Testing",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "438",
            "customer_name": "member miskin",
            "transaction_type": "Sudah Diambil",
            "claim_error": false,
            "is_claim_error": "0",
            "additional_notes": "",
            "created_at": "2021-10-29 14:40:51",
            "updated_at": "2021-10-29 14:40:52",
            "tanggal_ambil": "2021-10-29 14:40:52",
            "payment": [
                {
                    "id": "4710",
                    "payment_number": "PAY-MEMBERSHIP-4710",
                    "payment_type": "non_cash",
                    "payment_method_name": "Membership",
                    "total_fee": "0.00",
                    "payment_amount": "30400.00",
                    "payment_original_amount": "30400.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 14:40:51",
                    "updated_at": "2021-10-29 14:40:52"
                }
            ],
            "ringkasan_product": {
                "transaction_sub_total": "20000",
                "sum_tax_amount": "400",
                "taxes": [
                    {
                        "id": "3946",
                        "transaction_id": "5177",
                        "invoice_id": "5177",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "400.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": 30400,
                "cashier_name": "Kevin Karyawan",
                "payment_amount": "30400",
                "change": "0",
                "button_cancel": "true",
                "list_product": [
                    {
                        "id": "6102",
                        "product_qty": "2",
                        "product_varian_id": "2409",
                        "product_id": "922",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_name": "Sabun Mandi",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "20000",
                        "pelengkap": []
                    }
                ],
                "list_pelengkap": [],
                "promo": [],
                "getreward": []
            },
            "detail_transaksi": {
                "customer_id": "438",
                "customer_name": "member miskin",
                "customer_email": "membermiskin@gmail.com",
                "customer_phone": "08978656757",
                "customer_picture_url": "",
                "status_membership": "1",
                "account_balance": "219200",
                "membership_id": "RWS-00438",
                "transaction_grand_total": 30400,
                "payment_method_name": "Membership",
                "transaction_no": "#Bill5161",
                "sales_type_name": "Ambil Sendiri",
                "transaction_type": "Penjualan",
                "no_referensi": [],
                "updated_at": "2021-10-29 14:40:52"
            }
        }
    ],
    "total_transaction_today": "6",
    "data_outlet": {
        "outlet_name": "Outlet Backend Testing",
        "address": "Jakarta",
        "city": "KABUPATEN NAGAN RAYA",
        "phone": "089887786873",
        "notes": "Kevin Company adalah Perusahaan ternama di indonesia.",
        "is_active_facebook": "1",
        "link_facebook": "merchongorengang",
        "is_active_twitter": "1",
        "link_twitter": "merchongorengang",
        "is_active_website": "1",
        "link_website": "www.rewash.co.id",
        "is_active_instagram": "1",
        "link_instagram": "merchongorengang.com"
    }
}

HTTP Request

POST /pos/transaction/history

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
filter object optional Berfungsi untuk melakukan filter atau pencarian data.
page integer required Halaman yang akan ditampilkan.
row_per_page integer required Jumlah data yang akan ditampilkan.

Selesai

API untuk menampilkan data transaksi cuci yang sudah selesai

Example request:

curl -X POST \
    "http://localhost:8000/pos/washing-list/done" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","filter":{},"page":1,"row_per_page":14}'
const url = new URL(
    "http://localhost:8000/pos/washing-list/done"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/washing-list/done',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'mobile',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'merchant_id' => 1,
                'merchant_name' => 'Nama Merchant',
                'outlet_id' => 2,
                'outlet_name' => 'Nama Outlet',
                'filter' => $o[0],
                'page' => 1,
                'row_per_page' => 14,
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/washing-list/done'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "filter": {},
    "page": 1,
    "row_per_page": 14
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("page")
    val page: Int? = null,

    @field:SerializedName("row_per_page")
    val rowPerPage: Int? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/washing-list/done")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "length": "37",
    "per_page": "14",
    "from": "1",
    "to": "14",
    "current_page": "1",
    "last_page": "3",
    "washing_list": [
        {
            "washing_list_id": "3922",
            "transaction_detail_id": "6092",
            "invoice_id": "5169",
            "transaction_id": "5169",
            "transaction_no": "#Bill5153",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "customer_email": "septiadi.rahmawan@spesolution.com",
            "customer_phone": "089786876876",
            "customer_picture_url": "",
            "status_membership": "1",
            "account_balance": "10000",
            "membership_id": "RWS-00493",
            "product_varian_id": "2129",
            "product_varian_name": "cuci kering gosong 1 kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-10-29 11:03:50",
            "updated_at": "2021-10-29 11:09:57",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "77000",
                "sum_tax_amount": "1340",
                "taxes": [
                    {
                        "id": "3938",
                        "transaction_id": "5169",
                        "invoice_id": "5169",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "1340.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "10000",
                "total_diskon_produk": 10000,
                "total_diskon_service": 0,
                "transaction_grand_total": "78340",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "80000",
                "change": "1660",
                "list_product": [
                    {
                        "id": "6092",
                        "product_qty": "1",
                        "product_id": "927",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_id": "2129",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "10",
                        "sum_product_varian": "35000",
                        "pelengkap": []
                    },
                    {
                        "id": "6093",
                        "product_qty": "1",
                        "product_id": "921",
                        "product_name": "Deterjen",
                        "product_varian_id": "2081",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cair",
                        "product_varian_harga_jual": "12000",
                        "product_varian_token": "0",
                        "sum_product_varian": "12000",
                        "pelengkap": []
                    },
                    {
                        "id": "6094",
                        "product_qty": "3",
                        "product_id": "922",
                        "product_name": "Sabun Mandi",
                        "product_varian_id": "2409",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "rasa mawar",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "0",
                        "sum_product_varian": "30000",
                        "pelengkap": []
                    }
                ],
                "promo": [
                    {
                        "id": 306,
                        "nama": "promo jumat akhir wfh",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    },
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 1
                    }
                ],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "4705",
                    "payment_number": "PAY-CASH-4705",
                    "invoice_id": "5169",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "78340.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "80000.00",
                    "payment_original_amount": "78340.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 11:03:50",
                    "updated_at": "2021-10-29 11:03:50",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3921",
            "transaction_detail_id": "6089",
            "invoice_id": "5168",
            "transaction_id": "5168",
            "transaction_no": "#Bill5152",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "493",
            "customer_name": "Septi real",
            "customer_email": "septiadi.rahmawan@spesolution.com",
            "customer_phone": "089786876876",
            "customer_picture_url": "",
            "status_membership": "1",
            "account_balance": "10000",
            "membership_id": "RWS-00493",
            "product_varian_id": "2129",
            "product_varian_name": "cuci kering gosong 1 kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-10-29 10:50:59",
            "updated_at": "2021-10-29 10:57:25",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "89000",
                "sum_tax_amount": "1780",
                "taxes": [
                    {
                        "id": "3937",
                        "transaction_id": "5168",
                        "invoice_id": "5168",
                        "tax_name": "PPN",
                        "tax_percent": "2.00",
                        "tax_total": "1780.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "100780",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "200000",
                "change": "99220",
                "list_product": [
                    {
                        "id": "6089",
                        "product_qty": "2",
                        "product_id": "927",
                        "product_name": "Cuci Kering Gosong",
                        "product_varian_id": "2129",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "cuci kering gosong 1 kg",
                        "product_varian_harga_jual": "35000",
                        "product_varian_token": "20",
                        "sum_product_varian": "70000",
                        "pelengkap": []
                    },
                    {
                        "id": "6090",
                        "product_qty": "1",
                        "product_id": "921",
                        "product_name": "Deterjen",
                        "product_varian_id": "2081",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cair",
                        "product_varian_harga_jual": "12000",
                        "product_varian_token": "0",
                        "sum_product_varian": "12000",
                        "pelengkap": []
                    },
                    {
                        "id": "6091",
                        "product_qty": "1",
                        "product_id": "921",
                        "product_name": "Deterjen",
                        "product_varian_id": "2082",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Bubuk",
                        "product_varian_harga_jual": "7000",
                        "product_varian_token": "0",
                        "sum_product_varian": "7000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [
                    {
                        "id": 306,
                        "nama": "promo jumat akhir wfh",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 6,
                        "expired_reward": "2021-11-30 23:59:59"
                    },
                    {
                        "id": 307,
                        "nama": "promo cuci wfh terakhir",
                        "reward_product_name": "Sabun Mandi - rasa mawar",
                        "reward_type": "diskon",
                        "reward_value": 50,
                        "jumlah_promo": 2,
                        "expired_reward": "2021-11-20 23:59:59"
                    }
                ],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "4704",
                    "payment_number": "PAY-CASH-4704",
                    "invoice_id": "5168",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "100780.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "200000.00",
                    "payment_original_amount": "100780.00",
                    "status_payment": "success",
                    "created_at": "2021-10-29 10:50:59",
                    "updated_at": "2021-10-29 10:50:59",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3466",
            "transaction_detail_id": "5324",
            "invoice_id": "4469",
            "transaction_id": "4469",
            "transaction_no": "#Bill4453",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "427",
            "customer_name": "anakbaru3",
            "customer_email": "anakbaru@gmail.com",
            "customer_phone": "0868765672",
            "customer_picture_url": "",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2123",
            "product_varian_name": "Cuci Baju 1 Kilo",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-25 16:56:26",
            "updated_at": "2021-06-29 14:42:16",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "11000",
                "sum_tax_amount": "2200",
                "taxes": [
                    {
                        "id": "3563",
                        "transaction_id": "4469",
                        "invoice_id": "4469",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "2200.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "23200",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "35000",
                "change": "11800",
                "list_product": [
                    {
                        "id": "5324",
                        "product_qty": "1",
                        "product_id": "923",
                        "product_name": "Cuci 1 Kilo",
                        "product_varian_id": "2123",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cuci Baju 1 Kilo",
                        "product_varian_harga_jual": "11000",
                        "product_varian_token": "10",
                        "sum_product_varian": "11000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "4018",
                    "payment_number": "PAY-CASH-4018",
                    "invoice_id": "4469",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "23200.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "35000.00",
                    "payment_original_amount": "23200.00",
                    "status_payment": "success",
                    "created_at": "2021-06-25 16:56:26",
                    "updated_at": "2021-06-25 16:56:26",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3481",
            "transaction_detail_id": "5352",
            "invoice_id": "4495",
            "transaction_id": "4495",
            "transaction_no": "#Bill4479",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "401",
            "customer_name": "AnakBaru",
            "customer_email": "anak@baru.com",
            "customer_phone": "0877663536",
            "customer_picture_url": "",
            "status_membership": "1",
            "account_balance": "60000",
            "membership_id": "RWS-00401",
            "product_varian_id": "2192",
            "product_varian_name": "cuci kering gosong 0 rupiah 5kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-29 14:36:04",
            "updated_at": "2021-06-29 14:42:11",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "0",
                "sum_tax_amount": "0",
                "taxes": [
                    {
                        "id": "3582",
                        "transaction_id": "4495",
                        "invoice_id": "4495",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "0.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "10000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "10000",
                "change": "0",
                "list_product": [
                    {
                        "id": "5352",
                        "product_qty": "2",
                        "product_id": "941",
                        "product_name": "cuci kering gosong 0 rupiah",
                        "product_varian_id": "2192",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "cuci kering gosong 0 rupiah 5kg",
                        "product_varian_harga_jual": "0",
                        "product_varian_token": "20",
                        "sum_product_varian": "0",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "4042",
                    "payment_number": "PAY-CASH-4042",
                    "invoice_id": "4495",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "10000.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "10000.00",
                    "payment_original_amount": "10000.00",
                    "status_payment": "success",
                    "created_at": "2021-06-29 14:36:04",
                    "updated_at": "2021-06-29 14:36:04",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3467",
            "transaction_detail_id": "5325",
            "invoice_id": "4470",
            "transaction_id": "4470",
            "transaction_no": "#Bill4454",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "427",
            "customer_name": "anakbaru3",
            "customer_email": "anakbaru@gmail.com",
            "customer_phone": "0868765672",
            "customer_picture_url": "",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2123",
            "product_varian_name": "Cuci Baju 1 Kilo",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-25 17:07:28",
            "updated_at": "2021-06-28 11:39:44",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "22000",
                "sum_tax_amount": "4400",
                "taxes": [
                    {
                        "id": "3564",
                        "transaction_id": "4470",
                        "invoice_id": "4470",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "4400.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "36400",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "40000",
                "change": "3600",
                "list_product": [
                    {
                        "id": "5325",
                        "product_qty": "2",
                        "product_id": "923",
                        "product_name": "Cuci 1 Kilo",
                        "product_varian_id": "2123",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cuci Baju 1 Kilo",
                        "product_varian_harga_jual": "11000",
                        "product_varian_token": "20",
                        "sum_product_varian": "22000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "4019",
                    "payment_number": "PAY-CASH-4019",
                    "invoice_id": "4470",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "36400.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "40000.00",
                    "payment_original_amount": "36400.00",
                    "status_payment": "success",
                    "created_at": "2021-06-25 17:07:28",
                    "updated_at": "2021-06-25 17:07:28",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3096",
            "transaction_detail_id": "4500",
            "invoice_id": "3806",
            "transaction_id": "3806",
            "transaction_no": "#Bill3799",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "346",
            "customer_name": "rizki gabut",
            "customer_email": "septiadirahmawan2@gmail.com",
            "customer_phone": "081290458008",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MzQ2-1622704122.png",
            "status_membership": "1",
            "account_balance": "960800",
            "membership_id": "RWS-00346",
            "product_varian_id": "2123",
            "product_varian_name": "Cuci Baju 1 Kilo",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-04-07 16:37:42",
            "updated_at": "2021-06-07 17:24:35",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "0",
                "sum_tax_amount": "0",
                "taxes": [
                    {
                        "id": "2932",
                        "transaction_id": "3806",
                        "invoice_id": "3806",
                        "tax_name": "PPN",
                        "tax_percent": "1.00",
                        "tax_total": "0.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "0",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4500",
                        "product_qty": "1",
                        "product_id": "923",
                        "product_name": "Cuci 1 Kilo",
                        "product_varian_id": "2123",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cuci Baju 1 Kilo",
                        "product_varian_harga_jual": "11000",
                        "product_varian_token": "0",
                        "sum_product_varian": "11000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3442",
                    "payment_number": "PAY-CASH-3442",
                    "invoice_id": "3806",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "0.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "0.00",
                    "payment_original_amount": "0.00",
                    "status_payment": "success",
                    "created_at": "2021-04-07 16:37:42",
                    "updated_at": "2021-04-07 16:37:42",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3340",
            "transaction_detail_id": "4939",
            "invoice_id": "4178",
            "transaction_id": "4178",
            "transaction_no": "#Bill4162",
            "transaction_type": "",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "085224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2200",
            "product_varian_name": "product 10 token 3 kg",
            "payment_method_name": "",
            "status_payment": "unpaid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-04 07:46:08",
            "updated_at": "2021-06-07 17:24:25",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "2000",
                "taxes": [
                    {
                        "id": "3291",
                        "transaction_id": "4178",
                        "invoice_id": "4178",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "2000.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "22000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4939",
                        "product_qty": "1",
                        "product_id": "948",
                        "product_name": "product 10 token",
                        "product_varian_id": "2200",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "product 10 token 3 kg",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "10",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3098",
            "transaction_detail_id": "4502",
            "invoice_id": "3808",
            "transaction_id": "3808",
            "transaction_no": "#Bill3801",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "346",
            "customer_name": "rizki gabut",
            "customer_email": "septiadirahmawan2@gmail.com",
            "customer_phone": "081290458008",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MzQ2-1622704122.png",
            "status_membership": "1",
            "account_balance": "960800",
            "membership_id": "RWS-00346",
            "product_varian_id": "2123",
            "product_varian_name": "Cuci Baju 1 Kilo",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-04-07 16:46:14",
            "updated_at": "2021-06-07 17:24:13",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "0",
                "sum_tax_amount": "0",
                "taxes": [
                    {
                        "id": "2934",
                        "transaction_id": "3808",
                        "invoice_id": "3808",
                        "tax_name": "PPN",
                        "tax_percent": "1.00",
                        "tax_total": "0.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "0",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4502",
                        "product_qty": "1",
                        "product_id": "923",
                        "product_name": "Cuci 1 Kilo",
                        "product_varian_id": "2123",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "Cuci Baju 1 Kilo",
                        "product_varian_harga_jual": "11000",
                        "product_varian_token": "0",
                        "sum_product_varian": "11000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3444",
                    "payment_number": "PAY-CASH-3444",
                    "invoice_id": "3808",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "0.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "0.00",
                    "payment_original_amount": "0.00",
                    "status_payment": "success",
                    "created_at": "2021-04-07 16:46:14",
                    "updated_at": "2021-04-07 16:46:14",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3403",
            "transaction_detail_id": "5024",
            "invoice_id": "4244",
            "transaction_id": "4244",
            "transaction_no": "#Bill4228",
            "transaction_type": "",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "0985224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2237",
            "product_varian_name": "product 10 token 3 kg",
            "payment_method_name": "OVO",
            "status_payment": "unpaid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-07 11:08:26",
            "updated_at": "2021-06-07 11:09:23",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "2000",
                "taxes": [
                    {
                        "id": "3356",
                        "transaction_id": "4244",
                        "invoice_id": "4244",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "2000.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "12000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "5024",
                        "product_qty": "1",
                        "product_id": "948",
                        "product_name": "Product 10 token",
                        "product_varian_id": "2237",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "product 10 token 3 kg",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "10",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3833",
                    "payment_number": "PAY-OVO-3833",
                    "invoice_id": "4244",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "12000.00",
                    "payment_ref_id": "1368",
                    "payment_note": "",
                    "payment_type": "non_cash",
                    "payment_method_id": "30",
                    "payment_method_name": "OVO",
                    "payment_fee_in_amount": "1.00",
                    "payment_spe_fee": "2.00",
                    "charge_fee_to_end_customer": "0",
                    "total_fee": "203.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "12000.00",
                    "payment_original_amount": "12000.00",
                    "status_payment": "failed",
                    "created_at": "2021-06-07 11:08:26",
                    "updated_at": "2021-06-07 11:08:29",
                    "payment_method_code": "ovo"
                },
                {
                    "id": "3834",
                    "payment_number": "PAY-OVO-3834",
                    "invoice_id": "4244",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "12000.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "non_cash",
                    "payment_method_id": "30",
                    "payment_method_name": "OVO",
                    "payment_fee_in_amount": "1.00",
                    "payment_spe_fee": "2.00",
                    "charge_fee_to_end_customer": "0",
                    "total_fee": "203.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "12000.00",
                    "payment_original_amount": "12000.00",
                    "status_payment": "pending",
                    "created_at": "2021-06-07 11:09:33",
                    "updated_at": "2021-06-07 11:09:33",
                    "payment_method_code": "ovo"
                }
            ],
            "payment_pending": "true"
        },
        {
            "washing_list_id": "3401",
            "transaction_detail_id": "5019",
            "invoice_id": "4239",
            "transaction_id": "4239",
            "transaction_no": "#Bill4223",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "0985224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2237",
            "product_varian_name": "product 10 token 3 kg",
            "payment_method_name": "OVO",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-07 10:52:42",
            "updated_at": "2021-06-07 10:54:11",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "2000",
                "taxes": [
                    {
                        "id": "3351",
                        "transaction_id": "4239",
                        "invoice_id": "4239",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "2000.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "12000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "12000",
                "change": "0",
                "list_product": [
                    {
                        "id": "5019",
                        "product_qty": "1",
                        "product_id": "948",
                        "product_name": "Product 10 token",
                        "product_varian_id": "2237",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "product 10 token 3 kg",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "10",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3826",
                    "payment_number": "PAY-OVO-3826",
                    "invoice_id": "4239",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "12000.00",
                    "payment_ref_id": "1366",
                    "payment_note": "",
                    "payment_type": "non_cash",
                    "payment_method_id": "30",
                    "payment_method_name": "OVO",
                    "payment_fee_in_amount": "1.00",
                    "payment_spe_fee": "2.00",
                    "charge_fee_to_end_customer": "0",
                    "total_fee": "203.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "12000.00",
                    "payment_original_amount": "12000.00",
                    "status_payment": "failed",
                    "created_at": "2021-06-07 10:52:42",
                    "updated_at": "2021-06-07 10:52:45",
                    "payment_method_code": "ovo"
                },
                {
                    "id": "3830",
                    "payment_number": "PAY-CASH-3830",
                    "invoice_id": "4239",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "12000.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "12000.00",
                    "payment_original_amount": "12000.00",
                    "status_payment": "success",
                    "created_at": "2021-06-07 10:57:27",
                    "updated_at": "2021-06-07 10:57:27",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3342",
            "transaction_detail_id": "4941",
            "invoice_id": "4180",
            "transaction_id": "4180",
            "transaction_no": "#Bill4164",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "085224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2145",
            "product_varian_name": "cuci kering cepat gosong 3.5kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-04 09:23:22",
            "updated_at": "2021-06-04 17:36:14",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "0",
                "sum_tax_amount": "0",
                "taxes": [
                    {
                        "id": "3293",
                        "transaction_id": "4180",
                        "invoice_id": "4180",
                        "tax_name": "PPN",
                        "tax_percent": "1.00",
                        "tax_total": "0.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "0",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4941",
                        "product_qty": "1",
                        "product_id": "932",
                        "product_name": "cuci kering cepat gosong",
                        "product_varian_id": "2145",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "cuci kering cepat gosong 3.5kg",
                        "product_varian_harga_jual": "15000",
                        "product_varian_token": "0",
                        "sum_product_varian": "15000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3781",
                    "payment_number": "PAY-CASH-3781",
                    "invoice_id": "4180",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "0.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "0.00",
                    "payment_original_amount": "0.00",
                    "status_payment": "success",
                    "created_at": "2021-06-04 09:23:22",
                    "updated_at": "2021-06-04 09:23:22",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3348",
            "transaction_detail_id": "4947",
            "invoice_id": "4186",
            "transaction_id": "4186",
            "transaction_no": "#Bill4170",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "085224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2145",
            "product_varian_name": "cuci kering cepat gosong 3.5kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-04 09:49:05",
            "updated_at": "2021-06-04 17:36:01",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "0",
                "sum_tax_amount": "0",
                "taxes": [
                    {
                        "id": "3299",
                        "transaction_id": "4186",
                        "invoice_id": "4186",
                        "tax_name": "PPN",
                        "tax_percent": "1.00",
                        "tax_total": "0.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "0",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4947",
                        "product_qty": "1",
                        "product_id": "932",
                        "product_name": "cuci kering cepat gosong",
                        "product_varian_id": "2145",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "cuci kering cepat gosong 3.5kg",
                        "product_varian_harga_jual": "15000",
                        "product_varian_token": "0",
                        "sum_product_varian": "15000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3786",
                    "payment_number": "PAY-CASH-3786",
                    "invoice_id": "4186",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "0.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "0.00",
                    "payment_original_amount": "0.00",
                    "status_payment": "success",
                    "created_at": "2021-06-04 09:49:05",
                    "updated_at": "2021-06-04 09:49:05",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3385",
            "transaction_detail_id": "5002",
            "invoice_id": "4229",
            "transaction_id": "4229",
            "transaction_no": "#Bill4213",
            "transaction_type": "Penjualan",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "085224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2237",
            "product_varian_name": "product 10 token 3 kg",
            "payment_method_name": "CASH",
            "status_payment": "paid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-04 16:51:24",
            "updated_at": "2021-06-04 17:35:53",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "20000",
                "sum_tax_amount": "4000",
                "taxes": [
                    {
                        "id": "3342",
                        "transaction_id": "4229",
                        "invoice_id": "4229",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "4000.00"
                    }
                ],
                "sum_service_amount": "10000",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "34000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "40000",
                "change": "6000",
                "list_product": [
                    {
                        "id": "5002",
                        "product_qty": "2",
                        "product_id": "948",
                        "product_name": "Product 10 token",
                        "product_varian_id": "2237",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "product 10 token 3 kg",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "20",
                        "sum_product_varian": "20000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [
                {
                    "id": "3817",
                    "payment_number": "PAY-CASH-3817",
                    "invoice_id": "4229",
                    "user_id": "347",
                    "user_name": "Kevin Karyawan",
                    "invoice_transaction_grand_total": "34000.00",
                    "payment_ref_id": "0",
                    "payment_note": "",
                    "payment_type": "cash",
                    "payment_method_id": "21",
                    "payment_method_name": "CASH",
                    "payment_fee_in_amount": "0.00",
                    "payment_spe_fee": "0.00",
                    "charge_fee_to_end_customer": "1",
                    "total_fee": "0.00",
                    "payment_method_fee_type": "all",
                    "payment_amount": "40000.00",
                    "payment_original_amount": "34000.00",
                    "status_payment": "success",
                    "created_at": "2021-06-04 16:51:24",
                    "updated_at": "2021-06-04 16:51:24",
                    "payment_method_code": "cash"
                }
            ],
            "payment_pending": "false"
        },
        {
            "washing_list_id": "3343",
            "transaction_detail_id": "4942",
            "invoice_id": "4181",
            "transaction_id": "4181",
            "transaction_no": "#Bill4165",
            "transaction_type": "",
            "merchant_name": "Merchant Backend Testing",
            "additional_notes": "",
            "outlet_id": "250",
            "outlet_name": "Outlet Backend Testing",
            "customer_id": "211",
            "customer_name": "Tejoss",
            "customer_email": "akuntestspeyymokuba@gmail.com",
            "customer_phone": "085224415222",
            "customer_picture_url": "https:\/\/api-customer.spesolution.com\/customer\/image\/cst_MjEx-1616144348.jpg",
            "status_membership": "0",
            "account_balance": "",
            "membership_id": "",
            "product_varian_id": "2200",
            "product_varian_name": "product 10 token 3 kg",
            "payment_method_name": "",
            "status_payment": "unpaid",
            "status": "incomplete",
            "rack_id": "138",
            "rack_name": "rak backend testing",
            "created_at": "2021-06-04 09:23:37",
            "updated_at": "2021-06-04 13:14:08",
            "tanggal_ambil": "-",
            "bill": {
                "transaction_sub_total": "10000",
                "sum_tax_amount": "2000",
                "taxes": [
                    {
                        "id": "3294",
                        "transaction_id": "4181",
                        "invoice_id": "4181",
                        "tax_name": "PPH21",
                        "tax_percent": "20.00",
                        "tax_total": "2000.00"
                    }
                ],
                "sum_service_amount": "0",
                "sum_discount_amount": "0",
                "total_diskon_produk": 0,
                "total_diskon_service": 0,
                "transaction_grand_total": "12000",
                "cashier_name ": "Kevin Karyawan",
                "payment_amount": "0",
                "change": "0",
                "list_product": [
                    {
                        "id": "4942",
                        "product_qty": "1",
                        "product_id": "948",
                        "product_name": "product 10 token",
                        "product_varian_id": "2200",
                        "product_thumbnail": "http:\/\/api-product-stock.spesolution.com\/image\/5e9fc561114aa.jfif",
                        "product_varian_name": "product 10 token 3 kg",
                        "product_varian_harga_jual": "10000",
                        "product_varian_token": "10",
                        "sum_product_varian": "10000",
                        "pelengkap": []
                    }
                ],
                "promo": [],
                "getreward": [],
                "list_pelengkap": []
            },
            "payment": [],
            "payment_pending": "false"
        }
    ],
    "total_transaction_today": "0",
    "data_outlet": {
        "outlet_name": "Outlet Backend Testing",
        "address": "Jakarta",
        "city": "KABUPATEN NAGAN RAYA",
        "phone": "089887786873",
        "notes": "Kevin Company adalah Perusahaan ternama di indonesia.",
        "is_active_facebook": "1",
        "link_facebook": "merchongorengang",
        "is_active_twitter": "1",
        "link_twitter": "merchongorengang",
        "is_active_website": "1",
        "link_website": "www.rewash.co.id",
        "is_active_instagram": "1",
        "link_instagram": "merchongorengang.com"
    }
}

HTTP Request

POST /pos/washing-list/done

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
filter object optional Berfungsi untuk melakukan filter atau pencarian data.
page integer required Halaman yang akan ditampilkan.
row_per_page integer required Jumlah data yang akan ditampilkan.

Promo & Membership

List My Cart

API untuk mengkalkulasi produk yang akan di proses.

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/my-reward-v2" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","customer_id":12,"status_membership":"1","product_variant":[{"id":1500,"harga_asli":2000,"qty":3}],"service":[{"id":15,"biaya_servis":5000}],"filter":{}}'
const url = new URL(
    "http://localhost:8000/pos/membership/my-reward-v2"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "product_variant": [
        {
            "id": 1500,
            "harga_asli": 2000,
            "qty": 3
        }
    ],
    "service": [
        {
            "id": 15,
            "biaya_servis": 5000
        }
    ],
    "filter": {}
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/my-reward-v2',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'mobile',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'merchant_id' => 1,
                'merchant_name' => 'Nama Merchant',
                'outlet_id' => 2,
                'outlet_name' => 'Nama Outlet',
                'customer_id' => 12,
                'status_membership' => '1',
                'product_variant' => [
                    [
                        'id' => 1500,
                        'harga_asli' => 2000,
                        'qty' => 3,
                    ],
                ],
                'service' => [
                    [
                        'id' => 15,
                        'biaya_servis' => 5000,
                    ],
                ],
                'filter' => $o[0],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/my-reward-v2'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "product_variant": [
        {
            "id": 1500,
            "harga_asli": 2000,
            "qty": 3
        }
    ],
    "service": [
        {
            "id": 15,
            "biaya_servis": 5000
        }
    ],
    "filter": {}
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "product_variant": [
        {
            "id": 1500,
            "harga_asli": 2000,
            "qty": 3
        }
    ],
    "service": [
        {
            "id": 15,
            "biaya_servis": 5000
        }
    ],
    "filter": {}
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("customer_id")
    val customerId: Int? = null,

    @field:SerializedName("status_membership")
    val statusMembership: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/my-reward-v2")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "list_reward": [
        {
            "jumlah_reward": 3,
            "id_promosi": 126,
            "nama_promosi": "Promo Ramadan",
            "deskripsi": "Promo gratis ",
            "target_promosi": "member",
            "reward_product_id": 2103,
            "reward_product_name": "Sabun Mandi - rasa mangga",
            "reward_type": "gratis",
            "reward_value": 1,
            "reward_product_type": "varian_produk",
            "status": "Dipakai",
            "nama_promosi_detail": "Gratis 1 Sabun Mandi - rasa mangga"
        },
        {
            "jumlah_reward": 1,
            "id_promosi": 137,
            "nama_promosi": "promosi servis digendong kevin",
            "deskripsi": "deskripsi promosi",
            "target_promosi": "all",
            "reward_product_id": 114,
            "reward_product_name": "Digendong Kevin",
            "reward_type": "gratis",
            "reward_value": 100,
            "reward_product_type": "servis",
            "status": "Dipakai",
            "nama_promosi_detail": "Gratis Digendong Kevin"
        }
    ],
    "mapping_product_variant": [
        {
            "id": 2103,
            "harga_asli": "20000",
            "qty": 2,
            "harga_diskon": 40000,
            "harga_akhir": 0,
            "nama_promo": "Gratis 2 Sabun Mandi - rasa mangga"
        }
    ],
    "mapping_service": {
        "service_id": 114,
        "harga_asli": 10000,
        "harga_diskon": 10000,
        "harga_akhir": 0,
        "nama_promo": "Gratis Digendong Kevin"
    },
    "promotion": [
        126,
        126,
        137
    ],
    "label_promo": [
        "Gratis 2 Sabun Mandi - rasa mangga",
        "Gratis Digendong Kevin"
    ],
    "tax_outlet": [
        {
            "id": "48",
            "tax_name": "PPH21",
            "tax_percent": "20.0"
        }
    ],
    "subtotal_produk": 240000,
    "subtotal_service": 10000,
    "total_pajak_produk": 40000,
    "total_diskon_produk": 40000,
    "total_diskon_service": 10000,
    "total_diskon": 50000,
    "grand_total": 240000,
    "note": "grand_total = belum ditambah admin fee (jika ada)"
}

HTTP Request

POST /pos/membership/my-reward-v2

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
customer_id integer required Id customer yang ingin transaksi.
status_membership enum required Jika 0 non membership, jika 1 membership.
product_variant object required Varian produk yang dibeli.
product_variant.*.id integer required Id variant yang dibeli.
product_variant.*.harga_asli integer required Total harga per variant yang dibeli.
product_variant.*.qty integer required Jumlah produk yang dibeli.
service object required Servis yang digunakan.
service.*.id integer required Id servis yang digunakan.
service.*.biaya_servis integer required Biaya servis yang digunakan.
filter object optional Berfungsi untuk melakukan filter atau pencarian data.

List My Reward Management

API untuk menampilkan reward tanpa ada status (di menu manajemen pelanggan)

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/my-reward-management" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","customer_id":12,"status_membership":"1","filter":{}}'
const url = new URL(
    "http://localhost:8000/pos/membership/my-reward-management"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "filter": {}
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/my-reward-management',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'mobile',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'merchant_id' => 1,
                'merchant_name' => 'Nama Merchant',
                'outlet_id' => 2,
                'outlet_name' => 'Nama Outlet',
                'customer_id' => 12,
                'status_membership' => '1',
                'filter' => $o[0],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/my-reward-management'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "filter": {}
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "customer_id": 12,
    "status_membership": "1",
    "filter": {}
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("customer_id")
    val customerId: Int? = null,

    @field:SerializedName("status_membership")
    val statusMembership: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/my-reward-management")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "list_reward": [
        {
            "jumlah_reward": 57,
            "id_promosi": 2,
            "nama_promosi": "Promo Gratis Cuy",
            "deskripsi": "Ini Gratis",
            "target_promosi": "all",
            "reward_product_id": 1938,
            "reward_product_name": "Automation Detergent A-160",
            "reward_type": "potongan",
            "reward_value": 500,
            "reward_product_type": "varian_produk",
            "status": ""
        }
    ]
}

HTTP Request

POST /pos/membership/my-reward-management

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
customer_id integer required Id customer yang ingin transaksi.
status_membership enum required Jika 0 non membership, jika 1 membership.
filter object optional Berfungsi untuk melakukan filter atau pencarian data.

List Promotion

API untuk menampilkan list promosi yang tersedia

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/promo" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","page":1,"limit":10,"filter":{}}'
const url = new URL(
    "http://localhost:8000/pos/membership/promo"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "page": 1,
    "limit": 10,
    "filter": {}
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/promo',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
            $o = [
                clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
            ],
            null,
            [],
            [
                'srq' => 'mobile',
                'user_id' => 1,
                'user_name' => 'Nama User',
                'merchant_id' => 1,
                'merchant_name' => 'Nama Merchant',
                'outlet_id' => 2,
                'outlet_name' => 'Nama Outlet',
                'page' => 1,
                'limit' => 10,
                'filter' => $o[0],
            ],
            []
        ),
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/promo'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "page": 1,
    "limit": 10,
    "filter": {}
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "page": 1,
    "limit": 10,
    "filter": {}
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("page")
    val page: Int? = null,

    @field:SerializedName("limit")
    val limit: Int? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/promo")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "length": "1",
    "per_page": "100",
    "from": "1",
    "to": "1",
    "current_page": "1",
    "last_page": "1",
    "promotion": [
        {
            "id": 1,
            "nama": "Promo Gratis Cuci Bed Cover",
            "deskripsi": "Ini merupakan Testing Promo",
            "target_promosi": "member",
            "merchant_id": 102,
            "merchant_name": "Odette Swan Laundry",
            "min_transaksi_struk": 0,
            "min_transaksi_rp": "0.00",
            "periode_from": "2021-02-02 00:00:00",
            "periode_to": "2021-03-02 00:00:00",
            "is_all_product": "false",
            "reward_product_type": "varian_produk",
            "reward_product_id": 304,
            "reward_product_name": "Bed Cover",
            "reward_type": "gratis",
            "reward_value": 0,
            "is_cancelled": "false",
            "created_at": "2021-02-03 16:29:11",
            "updated_at": "2021-02-03 16:29:11",
            "created_by": 343,
            "updated_by": 343,
            "deleted_at": null,
            "deleted_by": null,
            "status": "kadaluarsa",
            "detail": [
                {
                    "id": 1,
                    "promotion_id": 1,
                    "outlet_id": 61,
                    "outlet_name": "Laundry Odette One",
                    "product_id": 302,
                    "product_name": "Jas",
                    "created_at": "2021-02-03 16:29:11",
                    "updated_at": "2021-02-03 16:29:11",
                    "created_by": 343,
                    "updated_by": 343,
                    "deleted_at": null,
                    "deleted_by": null
                },
                {
                    "id": 2,
                    "promotion_id": 1,
                    "outlet_id": 61,
                    "outlet_name": "Laundry Odette One",
                    "product_id": 305,
                    "product_name": "Pakaian Satuan",
                    "created_at": "2021-02-03 16:29:11",
                    "updated_at": "2021-02-03 16:29:11",
                    "created_by": 343,
                    "updated_by": 343,
                    "deleted_at": null,
                    "deleted_by": null
                },
                {
                    "id": 3,
                    "promotion_id": 1,
                    "outlet_id": 61,
                    "outlet_name": "Laundry Odette One",
                    "product_id": 301,
                    "product_name": "Pakaian",
                    "created_at": "2021-02-03 16:29:11",
                    "updated_at": "2021-02-03 16:29:11",
                    "created_by": 343,
                    "updated_by": 343,
                    "deleted_at": null,
                    "deleted_by": null
                },
                {
                    "id": 4,
                    "promotion_id": 1,
                    "outlet_id": 63,
                    "outlet_name": "Laundry Odette Three",
                    "product_id": 300,
                    "product_name": "Rewash Detergent",
                    "created_at": "2021-02-03 16:29:11",
                    "updated_at": "2021-02-03 16:29:11",
                    "created_by": 343,
                    "updated_by": 343,
                    "deleted_at": null,
                    "deleted_by": null
                },
                {
                    "id": 5,
                    "promotion_id": 1,
                    "outlet_id": 63,
                    "outlet_name": "Laundry Odette Three",
                    "product_id": 317,
                    "product_name": "Kebaya Satuan",
                    "created_at": "2021-02-03 16:29:11",
                    "updated_at": "2021-02-03 16:29:11",
                    "created_by": 343,
                    "updated_by": 343,
                    "deleted_at": null,
                    "deleted_by": null
                }
            ]
        }
    ],
    "status_tersedia": "dijadwalkan, berlangsung, dibatalkan, kadaluarsa"
}

HTTP Request

POST /pos/membership/promo

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
page integer required Halaman yang akan ditampilkan.
limit integer required Batas data yang akan ditampilkan.
filter object optional Berfungsi untuk melakukan filter atau pencarian data.

Top-Up

List Nominal

API untuk menampilkan nominal topup yang tersedia

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/nominal-topup" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet"}'
const url = new URL(
    "http://localhost:8000/pos/membership/nominal-topup"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/nominal-topup',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/nominal-topup'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/nominal-topup")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "pilihan": [
        50000,
        100000,
        150000,
        200000,
        250000,
        300000
    ],
    "kelipatan": 10000,
    "minimal": 10000,
    "maksimal": 1000000
}

HTTP Request

POST /pos/membership/nominal-topup

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.

Create Transaction

API untuk membuat transaksi top-up

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/topup" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","device_id":"etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr","customer_id":"15","customer_name":"Nama Customer","customer_email":"email.customer@gmail.com","customer_phone":"0897898676554","payment_type":"non_cash","payment_method_name":"OVO","payment_amount":0,"payment":[{"payment_type":"non_cash","payment_method_id":30,"payment_method_name":"OVO","payment_method_code":"ovo","payment_amount":10000}]}'
const url = new URL(
    "http://localhost:8000/pos/membership/topup"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/topup',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'device_id' => 'etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr',
            'customer_id' => '15',
            'customer_name' => 'Nama Customer',
            'customer_email' => 'email.customer@gmail.com',
            'customer_phone' => '0897898676554',
            'payment_type' => 'non_cash',
            'payment_method_name' => 'OVO',
            'payment_amount' => 0,
            'payment' => [
                [
                    'payment_type' => 'non_cash',
                    'payment_method_id' => 30,
                    'payment_method_name' => 'OVO',
                    'payment_method_code' => 'ovo',
                    'payment_amount' => 10000,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/topup'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("device_id")
    val deviceId: String? = null,

    @field:SerializedName("customer_id")
    val customerId: String? = null,

    @field:SerializedName("customer_name")
    val customerName: String? = null,

    @field:SerializedName("customer_email")
    val customerEmail: String? = null,

    @field:SerializedName("customer_phone")
    val customerPhone: String? = null,

    @field:SerializedName("payment_type")
    val paymentType: String? = null,

    @field:SerializedName("payment_method_name")
    val paymentMethodName: String? = null,

    @field:SerializedName("payment_amount")
    val paymentAmount: Int? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/topup")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "merchant_id": "177",
    "merchant_name": "Automation Merchant",
    "outlet_id": "190",
    "outlet_name": "Automation Outlet",
    "user_id": "261",
    "user_name": "si automation",
    "customer_id": "344",
    "customer_name": "Deee",
    "customer_email": "rovbt@gmail.com",
    "customer_phone": "081290458008",
    "payment_method": "OVO",
    "status_payment": "pending",
    "nominal_topup": "10000",
    "saldo_awal": "210000",
    "saldo_akhir": "220000",
    "created_by": "261",
    "updated_by": "261",
    "updated_at": "2021-02-26 10:50:15",
    "created_at": "2021-02-26 10:50:15",
    "id": 73,
    "transaction_no": "#Topup73",
    "payment_number": "TOPUP-OVO-73",
    "qr_string": "",
    "payment_pending": "true",
    "data_payment_pending": {
        "business_id": "5e7dd53b3661e91cb091150f",
        "amount": "10000",
        "payment_number": "TOPUP-OVO-73",
        "customer_phone_payment": "081290458008",
        "qr_string": "",
        "status": "PENDING",
        "created_at": "2021-02-26 10:50:16"
    },
    "membership_id": "RWS-00344",
    "status_output": "BERHASIL",
    "transaction_date": "2021-02-26 10:50:15",
    "transaction_payment_date": "2021-02-26 10:50:15",
    "payment_method_code": "ovo",
    "list_outlet": "Automation Outlet"
}

HTTP Request

POST /pos/membership/topup

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
device_id string required Token FCM.
customer_id string required Id customer yang transaksi top-up.
customer_name string required Nama customer yang melakukan transaksi top-up.
customer_email string required Email customer yang melakukan transaksi top-up.
customer_phone string required Telepon customer yang melakukan transaksi top-up.
payment_type string required Tipe pembayaran, hanya non_cash.
payment_method_name string required Nama metode pembayaran.
payment_amount integer required Jumlah transaksi.
payment object required
payment.*.payment_type string required Tipe pembayaran yang digunakan, hanya non_cash.
payment.*.payment_method_id integer required Nama outlet yang sedang login.
payment.*.payment_method_name string required Nama metode pembayaran.
payment.*.payment_method_code string required Kode metode pembayaran.
payment.*.payment_amount integer required Nominal transaksi.

Check Status Payment

API untuk melakukan pengecekan status payment, apakah sudah terbayar apa belum

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/check-status" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"payment_number":"TOPUP-OVO-73","payment_method_code":"ovo"}'
const url = new URL(
    "http://localhost:8000/pos/membership/check-status"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "payment_number": "TOPUP-OVO-73",
    "payment_method_code": "ovo"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/check-status',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'payment_number' => 'TOPUP-OVO-73',
            'payment_method_code' => 'ovo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/check-status'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "payment_number": "TOPUP-OVO-73",
    "payment_method_code": "ovo"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "payment_number": "TOPUP-OVO-73",
    "payment_method_code": "ovo"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("payment_number")
    val paymentNumber: String? = null,

    @field:SerializedName("payment_method_code")
    val paymentMethodCode: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/check-status")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "status": "false",
    "data": {
        "payment_number": "TOPUP-OVO-73",
        "status": "SUCCESS",
        "amount": "10000.00",
        "payment_ref_id": 1143
    }
}

HTTP Request

POST /pos/membership/check-status

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
payment_number string required Kode pembayaran yang didapat.
payment_method_code string required Code metode pembayaran yang digunakan.

Change Payment

API untuk mengganti metode pembayaran sebelum edit pembayaran

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/change-payment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","transaction_id":"21","payment_number":"TOPUP-OVO-73","payment_amount":"10000","payment_method_code":"ovo"}'
const url = new URL(
    "http://localhost:8000/pos/membership/change-payment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_id": "21",
    "payment_number": "TOPUP-OVO-73",
    "payment_amount": "10000",
    "payment_method_code": "ovo"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/change-payment',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'transaction_id' => '21',
            'payment_number' => 'TOPUP-OVO-73',
            'payment_amount' => '10000',
            'payment_method_code' => 'ovo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/change-payment'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_id": "21",
    "payment_number": "TOPUP-OVO-73",
    "payment_amount": "10000",
    "payment_method_code": "ovo"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_id": "21",
    "payment_number": "TOPUP-OVO-73",
    "payment_amount": "10000",
    "payment_method_code": "ovo"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("transaction_id")
    val transactionId: String? = null,

    @field:SerializedName("payment_number")
    val paymentNumber: String? = null,

    @field:SerializedName("payment_amount")
    val paymentAmount: String? = null,

    @field:SerializedName("payment_method_code")
    val paymentMethodCode: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/change-payment")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "status": "true"
}

Example response (204):

{
    "status": "false"
}

HTTP Request

POST /pos/membership/change-payment

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
transaction_id string required Id transaksi yang ingin diubah.
payment_number string required Kode pembayaran yang didapat.
payment_amount string required Total pembayaran.
payment_method_code string required Code metode pembayaran yang digunakan.

Edit Payment

API untuk mengedit metode pembayaran

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/update-payment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","device_id":"etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr","customer_id":"15","customer_name":"Nama Customer","customer_email":"email.customer@gmail.com","customer_phone":"0897898676554","payment_type":"non_cash","payment_method_name":"OVO","payment_amount":0,"payment":[{"payment_type":"non_cash","payment_method_id":30,"payment_method_name":"OVO","payment_method_code":"ovo","payment_amount":10000}]}'
const url = new URL(
    "http://localhost:8000/pos/membership/update-payment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/update-payment',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'device_id' => 'etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr',
            'customer_id' => '15',
            'customer_name' => 'Nama Customer',
            'customer_email' => 'email.customer@gmail.com',
            'customer_phone' => '0897898676554',
            'payment_type' => 'non_cash',
            'payment_method_name' => 'OVO',
            'payment_amount' => 0,
            'payment' => [
                [
                    'payment_type' => 'non_cash',
                    'payment_method_id' => 30,
                    'payment_method_name' => 'OVO',
                    'payment_method_code' => 'ovo',
                    'payment_amount' => 10000,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/update-payment'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "customer_id": "15",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "payment_type": "non_cash",
    "payment_method_name": "OVO",
    "payment_amount": 0,
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("device_id")
    val deviceId: String? = null,

    @field:SerializedName("customer_id")
    val customerId: String? = null,

    @field:SerializedName("customer_name")
    val customerName: String? = null,

    @field:SerializedName("customer_email")
    val customerEmail: String? = null,

    @field:SerializedName("customer_phone")
    val customerPhone: String? = null,

    @field:SerializedName("payment_type")
    val paymentType: String? = null,

    @field:SerializedName("payment_method_name")
    val paymentMethodName: String? = null,

    @field:SerializedName("payment_amount")
    val paymentAmount: Int? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/update-payment")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

HTTP Request

POST /pos/membership/update-payment

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
device_id string required Token FCM.
customer_id string required Id customer yang transaksi top-up.
customer_name string required Nama customer yang melakukan transaksi top-up.
customer_email string required Email customer yang melakukan transaksi top-up.
customer_phone string required Telepon customer yang melakukan transaksi top-up.
payment_type string required Tipe pembayaran, hanya non_cash.
payment_method_name string required Nama metode pembayaran.
payment_amount integer required Jumlah transaksi.
payment object required
payment.*.payment_type string required Tipe pembayaran yang digunakan, hanya non_cash.
payment.*.payment_method_id integer required Nama outlet yang sedang login.
payment.*.payment_method_name string required Nama metode pembauaran.
payment.*.payment_method_code string required Kode metode pembayaran.
payment.*.payment_amount integer required Nominal transaksi.

Retry Payment

API untuk mencoba melakukan pembayaran ulang

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/retry-payment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","device_id":"etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr","transaction_id":21,"payment_type":"non_cash","payment_method_id":"30","payment_method_name":"OVO","payment_amount":"10000","phone":"OVO","payment":[{"payment_type":"non_cash","payment_method_id":30,"payment_method_name":"OVO","payment_method_code":"ovo","payment_amount":10000}]}'
const url = new URL(
    "http://localhost:8000/pos/membership/retry-payment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "transaction_id": 21,
    "payment_type": "non_cash",
    "payment_method_id": "30",
    "payment_method_name": "OVO",
    "payment_amount": "10000",
    "phone": "OVO",
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/retry-payment',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'device_id' => 'etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr',
            'transaction_id' => 21,
            'payment_type' => 'non_cash',
            'payment_method_id' => '30',
            'payment_method_name' => 'OVO',
            'payment_amount' => '10000',
            'phone' => 'OVO',
            'payment' => [
                [
                    'payment_type' => 'non_cash',
                    'payment_method_id' => 30,
                    'payment_method_name' => 'OVO',
                    'payment_method_code' => 'ovo',
                    'payment_amount' => 10000,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/retry-payment'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "transaction_id": 21,
    "payment_type": "non_cash",
    "payment_method_id": "30",
    "payment_method_name": "OVO",
    "payment_amount": "10000",
    "phone": "OVO",
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "device_id": "etEF7sY1QPmyZhPJOMtC1w:APA91bGgaXMw3p43xF4UiOvE5zOVtv2-CkuHNKkiecRzFZUBLE2LXk-HvTP6rKNjM8vSo5qYqs29Jt4b0DKkNOXIiA_ZsMu8yZtqxZqUO_zsZQX-vsfagt_kP-puWIeE1ecEytulqRJr",
    "transaction_id": 21,
    "payment_type": "non_cash",
    "payment_method_id": "30",
    "payment_method_name": "OVO",
    "payment_amount": "10000",
    "phone": "OVO",
    "payment": [
        {
            "payment_type": "non_cash",
            "payment_method_id": 30,
            "payment_method_name": "OVO",
            "payment_method_code": "ovo",
            "payment_amount": 10000
        }
    ]
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("device_id")
    val deviceId: String? = null,

    @field:SerializedName("transaction_id")
    val transactionId: Int? = null,

    @field:SerializedName("payment_type")
    val paymentType: String? = null,

    @field:SerializedName("payment_method_id")
    val paymentMethodId: String? = null,

    @field:SerializedName("payment_method_name")
    val paymentMethodName: String? = null,

    @field:SerializedName("payment_amount")
    val paymentAmount: String? = null,

    @field:SerializedName("phone")
    val phone: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/retry-payment")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "status": "true"
}

Example response (204):

{
    "status": "false"
}

HTTP Request

POST /pos/membership/retry-payment

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
device_id string required Token FCM.
transaction_id integer required Id transaksinya.
payment_type string required Tipe pembayaran, bisa cash atau non_cash.
payment_method_id string required Id metode pembayaran.
payment_method_name string required Nama metode pembayaran.
payment_amount string required Total transaksi.
phone string required Nomor telepon untuk melakukan traksaksi.
payment object required
payment.*.payment_type string required Tipe pembayaran yang digunakan, hanya non_cash.
payment.*.payment_method_id integer required Nama outlet yang sedang login.
payment.*.payment_method_name string required Nama metode pembauaran.
payment.*.payment_method_code string required Kode metode pembayaran.
payment.*.payment_amount integer required Nominal transaksi.

Send Bill

API untuk mengirim bill ke email atau whatsapp

Example request:

curl -X POST \
    "http://localhost:8000/pos/membership/send-bill-toptup" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"srq":"mobile","user_id":1,"user_name":"Nama User","merchant_id":1,"merchant_name":"Nama Merchant","outlet_id":2,"outlet_name":"Nama Outlet","transaction_no":"#Topup73","customer_name":"Nama Customer","customer_email":"email.customer@gmail.com","customer_phone":"0897898676554","cashier_name":"Si Kasir","outlet_address":"Jakarta","outlet_phone_number":"02193623623","nominal_topup":50000,"saldo_akhir":50000,"status_output":"Berhasil","transaction_date":"2021-02-26 10:49:50","transaction_payment_date":"2021-02-26 11:49:50","membership_id":"RWS-334"}'
const url = new URL(
    "http://localhost:8000/pos/membership/send-bill-toptup"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_no": "#Topup73",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "cashier_name": "Si Kasir",
    "outlet_address": "Jakarta",
    "outlet_phone_number": "02193623623",
    "nominal_topup": 50000,
    "saldo_akhir": 50000,
    "status_output": "Berhasil",
    "transaction_date": "2021-02-26 10:49:50",
    "transaction_payment_date": "2021-02-26 11:49:50",
    "membership_id": "RWS-334"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/pos/membership/send-bill-toptup',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'srq' => 'mobile',
            'user_id' => 1,
            'user_name' => 'Nama User',
            'merchant_id' => 1,
            'merchant_name' => 'Nama Merchant',
            'outlet_id' => 2,
            'outlet_name' => 'Nama Outlet',
            'transaction_no' => '#Topup73',
            'customer_name' => 'Nama Customer',
            'customer_email' => 'email.customer@gmail.com',
            'customer_phone' => '0897898676554',
            'cashier_name' => 'Si Kasir',
            'outlet_address' => 'Jakarta',
            'outlet_phone_number' => '02193623623',
            'nominal_topup' => 50000,
            'saldo_akhir' => 50000,
            'status_output' => 'Berhasil',
            'transaction_date' => '2021-02-26 10:49:50',
            'transaction_payment_date' => '2021-02-26 11:49:50',
            'membership_id' => 'RWS-334',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'http://localhost:8000/pos/membership/send-bill-toptup'
payload = {
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_no": "#Topup73",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "cashier_name": "Si Kasir",
    "outlet_address": "Jakarta",
    "outlet_phone_number": "02193623623",
    "nominal_topup": 50000,
    "saldo_akhir": 50000,
    "status_output": "Berhasil",
    "transaction_date": "2021-02-26 10:49:50",
    "transaction_payment_date": "2021-02-26 11:49:50",
    "membership_id": "RWS-334"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
{
    "srq": "mobile",
    "user_id": 1,
    "user_name": "Nama User",
    "merchant_id": 1,
    "merchant_name": "Nama Merchant",
    "outlet_id": 2,
    "outlet_name": "Nama Outlet",
    "transaction_no": "#Topup73",
    "customer_name": "Nama Customer",
    "customer_email": "email.customer@gmail.com",
    "customer_phone": "0897898676554",
    "cashier_name": "Si Kasir",
    "outlet_address": "Jakarta",
    "outlet_phone_number": "02193623623",
    "nominal_topup": 50000,
    "saldo_akhir": 50000,
    "status_output": "Berhasil",
    "transaction_date": "2021-02-26 10:49:50",
    "transaction_payment_date": "2021-02-26 11:49:50",
    "membership_id": "RWS-334"
}
import com.google.gson.annotations.SerializedName

data class PostModel(
    @field:SerializedName("srq")
    val srq: String? = null,

    @field:SerializedName("user_id")
    val userId: Int? = null,

    @field:SerializedName("user_name")
    val userName: String? = null,

    @field:SerializedName("merchant_id")
    val merchantId: Int? = null,

    @field:SerializedName("merchant_name")
    val merchantName: String? = null,

    @field:SerializedName("outlet_id")
    val outletId: Int? = null,

    @field:SerializedName("outlet_name")
    val outletName: String? = null,

    @field:SerializedName("transaction_no")
    val transactionNo: String? = null,

    @field:SerializedName("customer_name")
    val customerName: String? = null,

    @field:SerializedName("customer_email")
    val customerEmail: String? = null,

    @field:SerializedName("customer_phone")
    val customerPhone: String? = null,

    @field:SerializedName("cashier_name")
    val cashierName: String? = null,

    @field:SerializedName("outlet_address")
    val outletAddress: String? = null,

    @field:SerializedName("outlet_phone_number")
    val outletPhoneNumber: String? = null,

    @field:SerializedName("nominal_topup")
    val nominalTopup: Int? = null,

    @field:SerializedName("saldo_akhir")
    val saldoAkhir: Int? = null,

    @field:SerializedName("status_output")
    val statusOutput: String? = null,

    @field:SerializedName("transaction_date")
    val transactionDate: String? = null,

    @field:SerializedName("transaction_payment_date")
    val transactionPaymentDate: String? = null,

    @field:SerializedName("membership_id")
    val membershipId: String? = null,

)

const val BASEURL = "http://localhost:8000/"
class ApiClient {
    companion object{
        private var retrofit:Retrofit?=null
        fun getApiClient(): Retrofit {
            val gson = GsonBuilder()
                .setLenient()
                .create()
            val okHttpClient = OkHttpClient.Builder()
                .readTimeout(100, TimeUnit.SECONDS)
                .connectTimeout(100, TimeUnit.SECONDS)
                .build()
            if (retrofit == null) {
                retrofit = Retrofit.Builder()
                    .baseUrl(BASEURL)
                    .client(okHttpClient)
                    .addConverterFactory(GsonConverterFactory.create(gson))
                    .build()
            }
            return retrofit!!
        }
    }
}

interface ApiInterface {
    @POST("pos/membership/send-bill-toptup")
    fun getResponse(): Call<List<PostModel>>
}

fun getResponse():LiveData<List<PostModel>>{
    val data = MutableLiveData<List<PostModel>>()

    apiInterface?.getResponse()?.enqueue(object : Callback<List<PostModel>>{

        override fun onFailure(call: Call<List<PostModel>>, t: Throwable) {
            data.value = null
        }

        override fun onResponse(
            call: Call<List<PostModel>>,
            response: Response<List<PostModel>>
        ) {

            val res = response.body()
            if (response.code() == 200 &&  res!=null){
                data.value = res
            }else{
                data.value = null
            }
        }
    })
    return data
}

Example response (200):

{
    "subject": "Bukti Pembayaran Rewash",
    "receiver": "penerima.email@gmail.com",
    "type": "email",
    "status": "success"
}

HTTP Request

POST /pos/membership/send-bill-toptup

Body Parameters

Parameter Type Status Description
srq string required Asal request.
user_id integer required User id yang sedang login.
user_name string required User name yang sedang login.
merchant_id integer required Id merchant yang sedang login.
merchant_name string required Nama merchant yang sedang login.
outlet_id integer required Id outlet yang sedang login.
outlet_name string required Nama outlet yang sedang login.
transaction_no string required Kode bill transaksi topup yang didapat.
customer_name string required Nama customer yang melakukan transaksi top-up.
customer_email string required Email customer yang melakukan transaksi top-up.
customer_phone string required Telepon customer yang melakukan transaksi top-up.
cashier_name string required Nama kasir yang sedang login.
outlet_address string required Alamat outlet yang melakukan transaksi.
outlet_phone_number string required Nomor telepon outlet yang melakukan transaksi.
nominal_topup integer required Jumlah nominal transaksi top-up.
saldo_akhir integer required Saldo akhir ketika berhasil top-up.
status_output string required Status pembayaran.
transaction_date string required Tanggal transaksi top-up.
transaction_payment_date string required Tanggal bayar transaksi top-up.
membership_id string required Kode memberhip.