### Get Customer Balance Request Example Source: https://docs.mayar.id/api-reference/usagebasedmembership/customerbalance This example demonstrates how to make a GET request to retrieve a customer's credit balance. Ensure you include the necessary product ID, membership tier ID, and member ID in the query parameters, along with your API key in the Authorization header. ```bash curl --request GET 'https://api.mayar.id/credit/v1/credit/customer/balance?productId=810328a4-6eeb-4680-8f05-8d578da46c40&membershipTierId=261acae0-d6ae-4d8c-adf5-6fb8c2361514&memberId=PQVS4KGY' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Curl Request Example Source: https://docs.mayar.id/api-reference/customer/searchcustomerbyemail Demonstrates how to make a GET request to the customer search endpoint using curl. Replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET `https://api.mayar.id/hl/v1/customer/detail?email=testingmayar@gmail.com` \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Get All Reviews Request Example Source: https://docs.mayar.id/api-reference/reviews/getallreviews Use this cURL command to make a GET request to retrieve all reviews. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET `https://api.mayar.id/hl/v1/reviews \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Request Example Source: https://docs.mayar.id/api-reference/transaction/dailytransaction Example of how to make a GET request to the daily transactions endpoint using curl. ```bash curl --request GET 'https://api.mayar.id/hl/v1/transactions/daily' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Get Product Page Request Example Source: https://docs.mayar.id/api-reference/product/productpage Use this cURL command to fetch a list of products. Replace 'Paste-Your-API-Key-Here' with your actual API key. The 'page' and 'pageSize' parameters control pagination. ```bash curl --request GET 'https://api.mayar.id/hl/v1/product?page=1&pageSize=10' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Create Installment Request Example Source: https://docs.mayar.id/api-reference/installment/create Use this cURL command to send a POST request to create a new installment plan. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request POST 'https://api.mayar.id/hl/v1/installment/create' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data-raw '{ \ "email": "azumiikecee@gmail.com", "mobile": "089961367511", "name": "Azumii", "amount": 1500000, "installment": { "description": "Cicil Produk Kelas Online 3 Bulan", "interest": 0, "tenure": 3, "dueDate": 11 } } ' ``` -------------------------------- ### cURL Request Example Source: https://docs.mayar.id/api-reference/reqpayment/detail Use this cURL command to make a GET request to retrieve the details of a single payment request. Replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET 'https://api.mayar.id/hl/v1/payment/e890d24a-cfc0-4915-83d2-3166b9ffba9e' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Re-open Product Request Example Source: https://docs.mayar.id/api-reference/product/reopen Use this cURL command to send a GET request to re-open a product. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and '{id}' with the product's unique ID. ```bash curl --request GET 'https://api.mayar.id/hl/v1/product/open/a02a76e1-25b4-49dd-9d1f-e84dd34ecbb4' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### cURL Request Example Source: https://docs.mayar.id/api-reference/creditbasedproduct/customerbalance Use this cURL command to make a GET request to retrieve a customer's credit balance. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and provide valid customerId and productId. ```bash curl --request GET 'https://api.mayar.id/credit/v1/credit/customer/balance?customerId=9de4b4b4-525c-4ee0-ac9c-b29c3e10fe55&productId=2b649982-411e-42e0-9b9c-0a17f9a55d44' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Close Product Request Example Source: https://docs.mayar.id/api-reference/product/close Use this cURL command to send a GET request to close a product. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and provide the correct product ID. ```bash curl --request GET 'https://api.mayar.id/hl/v1/product/close/a02a76e1-25b4-49dd-9d1f-e84dd34ecbb4' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Successful Response Example Source: https://docs.mayar.id/api-reference/usagebasedmembership/registnewmembershipcustomer This is an example of a successful response (200 OK) when a new customer is registered for the membership credit product. ```json { "statusCode": 200, "message": "success", "membershipCustomer": { "id": "68ca1a1c-7ed8-47f3-a5c2-c5ff314dd750", "userId": "35776524-8ea9-46ac-b2dd-89efc496593f", "paymentLinkId": "40f26fbe-f4d8-4693-975f-e6d105d291e6", "createdAt": 1756088397669, "nextPayment": 1758766797571, "isLifetimePeriod": null, "paymentLink": { "id": "40f26fbe-f4d8-4693-975f-e6d105d291e6", "name": "produk baru 2", "description": "
xcxcxccx
\n" } } } ``` -------------------------------- ### Successful Response Example Source: https://docs.mayar.id/api-reference/reviews/getallreviews This is an example of a successful response (200 OK) when retrieving reviews. It includes pagination details and an array of review objects. ```json { "statusCode": 200, "messages": "success", "hasMore": false, "pageCount": 1, "pageSize": 10, "page": 1, "total": 1, "data": [ { "id": "11f4d767-4d88-41ff-8777-06564d906fe7", "createdAt": 1778223034383, "customerId": "22eb6224-c20a-4bc2-9b99-13b21e7048c6", "message": "Bagus sekali, takde minusnyo", "paymentLinkId": "e2b3f5d5-0c62-47ba-8a01-6c1c209e0f77", "rating": 5, "status": "ACTIVE", "updatedAt": 1778225558788, "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413", "multipleImage": [], "content": [], "customer": { "id": "22eb6224-c20a-4bc2-9b99-13b21e7048c6", "name": "Test Mayar" }, "paymentLink": { "id": "e2b3f5d5-0c62-47ba-8a01-6c1c209e0f77", "name": "Kelas Pemrograman Web Dasar", "type": "course", "link": "website", "subType": null } } ] } ``` -------------------------------- ### Successful Response Example Source: https://docs.mayar.id/api-reference/transaction/dailytransaction Example of a successful 200 OK response containing daily transaction data. ```json { "statusCode": 200, "data": { "date": "2026-05-08", "tpvCount": 125000, "trxCount": 10 } } ``` -------------------------------- ### Get Product Detail Request Source: https://docs.mayar.id/api-reference/product/detail Use this cURL command to make a GET request to the product detail endpoint. Replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET 'https://api.mayar.id/hl/v1/product/4d26ea37-d093-4b92-8f5f-0faec64d65b0' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Register New Customer Request Example Source: https://docs.mayar.id/api-reference/creditbasedproduct/registernewcustomer This example demonstrates how to register a new customer using a cURL request. It includes the product ID, optional trial credit, and customer information such as name, email, and mobile number. ```bash curl --request POST 'https://api.mayar.id/credit/v1/credit/credit-usage/customer/regist' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data-raw '{ \ "productId": "43eadce2-bc52-4e38-a832-93fb835f2a69", \ "trialCredit": 300, //optional \ "customerInfo": { \ "name" : "john doe", \ "email" : "johndoe@gmail.com", \ "mobile" : "08777777777" \ } \ }' ``` -------------------------------- ### Get Installment Detail Request Source: https://docs.mayar.id/api-reference/installment/detail Use this cURL command to make a GET request to retrieve the details of a specific installment. Replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET 'https://api.mayar.id/hl/v1/installment/ba82c2dd-06c1-4b6c-bc59-a9c00801c842' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Get Installment Detail Source: https://docs.mayar.id/llms.txt Endpoint used to view details and status of a created installment plan. ```APIDOC ## Get Installment Detail ### Description Endpoint used to view details and status of installment that have been created. ### Method GET ### Endpoint /api/reference/installment/detail ### Parameters #### Query Parameters - **installmentId** (string) - Required - The ID of the installment. ``` -------------------------------- ### cURL Request Example Source: https://docs.mayar.id/api-reference/usagebasedmembership/registnewmembershipcustomer Use this cURL command to register a new customer for the membership credit product. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request POST 'https://api.mayar.id/credit/v1/credit/membership/customer/regist' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data-raw '{ \ "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6", \ "membershipTierId": "9bbbfa01-1bf8-4e4d-8470-cdf7066b6ea2", \ "membershipMonthlyPeriod": 1, // mandatory must 1, 3, 6, 12 \ "trialCredit": 100, //optional \ "customerInfo": { \ "name" : "memberTambahan", \ "email" : "tambahan@gg.com", \ "mobile" : "08777777799" \ } \ }' ``` -------------------------------- ### Get Installment Detail Source: https://docs.mayar.id/api-reference/installment/detail Retrieves the details and status of a specific installment using its unique ID. ```APIDOC ## GET /hl/v1/installment/{id} ### Description Retrieves the details and status of a specific installment using its unique ID. ### Method GET ### Endpoint `https://api.mayar.id/hl/v1/installment/{id}` `https://api.mayar.club/hl/v1/installment/{id}` (Sandbox) ### Parameters #### Path Parameters - **id** (string) - Required - A unique identifier obtained when creating an installment. Example: `ba82c2dd-06c1-4b6c-bc59-a9c00801c842` #### Request Headers - **Authorization** (string) - Required - Bearer token for authentication. Example: `Bearer Paste-Your-API-Key-Here` ### Response #### Success Response (200) - **statusCode** (integer) - Status code from API. - **messages** (string) - Status message describing the status code. - **data** (array of object) - Main response data. - **id** (string) - Main ID (UUID). - **createdAt** (integer) - Creation time (timestamp in ms). - **period** (string) - Installment period (e.g., "MONTHLY"). - **tenure** (integer) - Installment duration (in months). - **dueDate** (integer) - Due date value (e.g., `11`). - **interest** (integer) - Interest value. - **interestType** (string) - Type of interest (e.g., "FLAT"). - **paymentLinkId** (stringYo test
\n", "link": "jasa-pembuatan-website-82187", "type": "generic_link", "subType": null, "status": "deleted", "name": "Jasa Pembuatan Website ", "limit": null, "redirectUrl": "", "installmentId": null, "variant": "[{"id":"18399af2-1063-4022-868d-23917ee8410b","name":"Produk Dengan Jumlah 15","description":"\n","amount":12000,"limit":null,"notes":"","redirectUrl":"","status":"ACTIVE","createdAt":1728286386687}]", "membershipTier": [], "event": null, "order": null, "coverImageId": null, "multipleImageId": "468565a7-b2ad-4ec1-8cbe-2308160c5a4b", "coverImage": null, "multipleImage": [ { "id": "62a02c2d-2d46-4382-9683-b49e5971bfa0", "fileType": "jpeg", "createdAt": 1729063348803, "updatedAt": 1729064548803, "url": "https://media.mayar.id/images/62a02c2d-2d46-4382-9683-b49e5971bfa0.jpeg" }, { "id": "7b3777d4-0c94-4bfe-9dd9-da691f6bf575", "fileType": "jpeg", "createdAt": 1729063348032, "updatedAt": 1729065148033, "url": "https://media.mayar.id/images/7b3777d4-0c94-4bfe-9dd9-da691f6bf575.jpeg" }, { "id": "c81180e7-e91f-464e-abd7-b19254f76cf0", "fileType": "jpeg", "createdAt": 1729063348209, "updatedAt": 1729063948210, "url": "https://media.mayar.id/images/c81180e7-e91f-464e-abd7-b19254f76cf0.jpeg" } ], "variants": [ { "id": "18399af2-1063-4022-868d-23917ee8410b", "name": "Produk Dengan Jumlah 15", "description": "\n", "amount": 12000, "limit": null, "notes": "", "redirectUrl": "", "status": "ACTIVE", "createdAt": 1728286386687 } ], "transactions": [], "linkUrl": "https://testingmayar.myr.id/plink/jasa-pembuatan-website-82187", "linkPayment": "https://testingmayar.myr.id/pl/jasa-pembuatan-website-82187" }, { "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356", "amount": 100000, "category": null, "createdAt": 1768375011056, "description": "Testing
\n", "link": "pembuatan-jasa-web", "type": "generic_link", "subType": null, "status": "active", "name": "Pembuatan Jasa Web", "limit": null, "redirectUrl": "", "installmentId": null, "variant": "[{"id":"986cb91e-70ee-4579-a046-3201f936e6e1","name":"Landing Page ","description":"\n","amount":100000,"limit":null,"notes":"","redirectUrl":"","status":"ACTIVE","createdAt":1778236239496},{"id":"99de25dc-0302-4d64-9467-6f1c85fbc1bb","name":"Sistem Crud","description":"\n","amount":500000,"limit":null,"notes":"","redirectUrl":"","status":"ACTIVE","createdAt":1778236254836}]", "membershipTier": [], "event": null, "order": null, "coverImageId": null, "multipleImageId": "62840541-d45d-4e3f-a13a-e4f8bcdf4e5d", "coverImage": null, "multipleImage": [ { "id": "503d493e-7ae5-4892-80a6-b925e057698f", "fileType": "jpeg", "createdAt": 1775731966396, "updatedAt": 1775731974978, "url": "https://media.mayar.id/images/503d493e-7ae5-4892-80a6-b925e057698f.jpeg" } ], "variants": [ { "id": "986cb91e-70ee-4579-a046-3201f936e6e1", "name": "Landing Page ", "description": "\n", "amount": 100000, "limit": null, "notes": "", "redirectUrl": "", "status": "ACTIVE", "createdAt": 1778236239496 }, { "id": "99de25dc-0302-4d64-9467-6f1c85fbc1bb", "name": "Sistem Crud", "description": "\n", "amount": 500000, "limit": null, "notes": "", "redirectUrl": "", "status": "ACTIVE", "createdAt": 1778236254836 } ], "transactions": [], "linkUrl": "https://testingmayar.myr.id/plink/pembuatan-jasa-web", "linkPayment": "https://testingmayar.myr.id/pl/pembuatan-jasa-web" } ] } ``` -------------------------------- ### Sandbox Endpoint for Re-opening Product Source: https://docs.mayar.id/api-reference/product/reopen The sandbox URL for the re-open product endpoint. Replace '{id}' with the specific product ID. ```bash https://api.mayar.club/hl/v1/product/open/{id} ``` -------------------------------- ### POST Create Installment Source: https://docs.mayar.id/api-reference/installment/create Endpoint used to create installment plans. It allows specifying customer details, payment amount, and installment terms. ```APIDOC ## POST /hl/v1/installment/create ### Description Endpoint used to create installment plans. It allows specifying customer details, payment amount, and installment terms. ### Method POST ### Endpoint https://api.mayar.id/hl/v1/installment/create ### Parameters #### Request Body - **email** (string) - Required - Customer email used to send proof of payment, or payment reminders - **mobile** (string) - Required - Customer telephone number - **name** (string) - Required - Customer Name - **amount** (integer) - Required - Nominal amount of payment - **installment** (Object) - Required - Installment details - **description** (string) - Required - General description of the transaction or order. - **interest** (number | integer) - Required - Installment interest (%) - **tenure** (number | integer) - Required - Installment tenor period (months) - **dueDate** (number | integer) - Required - Due date each month ### Request Example ```json { "email": "azumiikecee@gmail.com", "mobile": "089961367511", "name": "Azumii", "amount": 1500000, "installment": { "description": "Cicil Produk Kelas Online 3 Bulan", "interest": 0, "tenure": 3, "dueDate": 11 } } ``` ### Response #### Success Response (200) - **statusCode** (integer) - - **messages** (string) - - **data** (Object) - - **id** (string) - - **createdAt** (integer) - - **dueDate** (integer) - - **interest** (integer) - - **interestType** (string) - - **period** (string) - - **tenure** (integer) - - **invoices** (Array) - - **id** (string) - - **amount** (integer) - - **updatedAt** (integer) - - **category** (string) - - **status** (string) - - **index** (integer) - - **link** (string) - - **description** (string) - - **interestAmount** (integer) - - **remainingAmount** (integer) - - **customerId** (string) - - **customer** (Object) - - **id** (string) - - **email** (string) - - **mobile** (string) - - **name** (string) - #### Response Example ```json { "statusCode": 200, "messages": "Success", "data": { "id": "ba82c2dd-06c1-4b6c-bc59-a9c00801c842", "createdAt": 1755631209521, "dueDate": 11, "interest": 0, "interestType": "FLAT", "period": "MONTHLY", "tenure": 3, "invoices": [ { "id": "9fe1b9c4-b5d5-4d45-bf1a-5c4849631725", "amount": 500000, "updatedAt": 1755631210118, "category": null, "status": "unpaid", "index": 1, "link": "mkcn4u72ki", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 1000000, "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "customer": { "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "email": "azumiikecee@gmail.com", "mobile": "089961367511", "name": "Azumii" } }, { "id": "977777d6-af25-464e-a8ca-e290b3007275", "amount": 500000, "updatedAt": 1755631210119, "category": null, "status": "unpaid", "index": 2, "link": "0ll429zxvsue", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 500000, "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "customer": { "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "email": "azumiikecee@gmail.com", "mobile": "089961367511", "name": "Azumii" } }, { "id": "1dde3426-f6a4-43d2-a1d9-2cd2fa05eb9a", "amount": 500000, "updatedAt": 1755631210120, "category": null, "status": "unpaid", "index": 3, "link": "h8fiobqkek", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 0, "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "customer": { "id": "62d1a396-07d8-4d93-a14c-9ec801f3af20", "email": "azumiikecee@gmail.com", "mobile": "089961367511", "name": "Azumii" } } ] } } ``` ``` -------------------------------- ### Add Customer Credit Request Example Source: https://docs.mayar.id/api-reference/usagebasedmembership/addcustomercredit Use this cURL command to send a POST request to add credit to a customer's account. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and provide the necessary member, product, and tier IDs. ```bash curl --request POST 'https://api.mayar.id/credit/v1/credit/customer/add-credit' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '{ \ "memberId" : "KKGOL1MV", // optionally mandatory "productId": "40f26fbe-f4d8-4693-975f-e6d105d291e6", "membershipTierId": "9bbbfa01-1bf8-4e4d-8470-cdf7066b6ea2", "amount": 100 }' ```