### 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** (string) - Associated Payment Link ID. - **updatedAt** (integer) - Last update time (timestamp in ms). - **userId** (string) - User ID. - **paymentLink** (array of object) - Payment link details. - **invoices** (array of object) - List of invoices. ### Request Example ```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 '' ``` ### Response Example ```json { "statusCode": 200, "messages": "Success", "data": { "id": "ba82c2dd-06c1-4b6c-bc59-a9c00801c842", "createdAt": 1755631209521, "period": "MONTHLY", "tenure": 3, "dueDate": 11, "interest": 0, "interestType": "FLAT", "paymentLinkId": "8f722421-e8fd-4d05-ae0c-5f4a224b7923", "updatedAt": 1755631209521, "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413", "paymentLink": { "id": "8f722421-e8fd-4d05-ae0c-5f4a224b7923", "name": "Azumii", "amount": 1500000, "description": "Cicil Produk Kelas Online 3 Bulan", "customerId": "62d1a396-07d8-4d93-a14c-9ec801f3af20" }, "invoices": [ { "id": "9fe1b9c4-b5d5-4d45-bf1a-5c4849631725", "expiredAt": 1757523600000, "amount": 500000, "category": null, "status": "unpaid", "index": 1, "link": "mkcn4u72ki", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 1000000 }, { "id": "977777d6-af25-464e-a8ca-e290b3007275", "expiredAt": 1760115600000, "amount": 500000, "category": null, "status": "unpaid", "index": 2, "link": "0ll429zxvsue", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 500000 }, { "id": "1dde3426-f6a4-43d2-a1d9-2cd2fa05eb9a", "expiredAt": 1762794000000, "amount": 500000, "category": null, "status": "unpaid", "index": 3, "link": "h8fiobqkek", "description": "Cicil Produk Kelas Online 3 Bulan", "interestAmount": 0, "remainingAmount": 0 } ] } } ``` ``` -------------------------------- ### Spend Customer Credit Request Example Source: https://docs.mayar.id/api-reference/usagebasedmembership/spendcustomercredit This example demonstrates how to make a POST request to spend customer credit. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. At least one of 'customerId' or 'memberId' must be provided. ```bash curl --request POST 'https://api.mayar.id/credit/v1/credit/customer/spend' \ --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": 10 }' ``` -------------------------------- ### Create Customer Request Example Source: https://docs.mayar.id/api-reference/customer/create Use this cURL command to send a POST request to create a new customer. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request POST 'https://api.mayar.id/hl/v1/customer/create' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data-raw '{ \ "name": "Raihan Nur Azmii", "email": "mraihanna19@gmail.com", "mobile": "089912345678" } ' ``` -------------------------------- ### Verify License Request Example Source: https://docs.mayar.id/api-reference/licensecode/verifylicense Use this cURL command to send a POST request to the license verification endpoint. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and 'YOUR-LICENSE-CODE'/'YOUR-PRODUCT-ID' with the relevant values. ```bash curl --request POST 'https://api.mayar.id/software/v1/license/verify' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '{ \ "licenseCode": "YOUR-LICENSE-CODE", \ "productId": "YOUR-PRODUCT-ID" \ }' ``` -------------------------------- ### Verify License Request Example Source: https://docs.mayar.id/api-reference/saas/verify Use this cURL command to send a POST request to the license verification endpoint. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and provide the correct license code and product ID. ```bash curl --request POST 'https://api.mayar.id/saas/v1/license/verify' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '{ "licenseCode": "YOUR-LICENSE-CODE", "productId": "YOUR-PRODUCT-ID" }' ``` -------------------------------- ### Paid Transactions Response Example Source: https://docs.mayar.id/api-reference/transaction/paidtransaction This is a sample JSON response for a successful request to get paid transactions. It includes pagination details and a list of transaction objects, each with its own set of properties. ```json { "statusCode": 200, "messages": "success", "hasMore": true, "pageCount": 70, "pageSize": 10, "page": 1, "data": [ { "id": "ff5e591d-6740-442b-8aec-26e72b60c29e", "credit": 0, "status": "settled", "balanceHistoryType": "webinar", "paymentMethod": "Gratis", "customerId": "ce1234f3-6843-4d5c-8838-b7d6f7506955", "createdAt": 1755534083905, "paymentLinkTransactionId": "98f26871-de3c-4bca-ac59-d079ca44d5bd", "fee": [], "paymentLinkId": "015ff1af-c83f-4684-9401-dd74a7c6da0f", "subscriptionId": null, "xenditTransactionId": null, "subscription": null, "xenditTransaction": null, "paymentLinkTransaction": { "id": "98f26871-de3c-4bca-ac59-d079ca44d5bd", "urlParamTrackingData": null, "isAdminFeeBorneByCustomer": null, "isChannelFeeBorneByCustomer": null }, "customeField": null, "customer": { "id": "ce1234f3-6843-4d5c-8838-b7d6f7506955", "name": "trial", "email": "trial@gmail.com", "mobile": "0884444730242" }, "paymentLink": { "id": "015ff1af-c83f-4684-9401-dd74a7c6da0f", "name": "test outlook" } }, { "id": "40067bb5-e06f-4dc6-bd65-e2f6ac35643f", "credit": 0, "status": "settled", "balanceHistoryType": "membership", "paymentMethod": "Gratis", "customerId": "ce1234f3-6843-4d5c-8838-b7d6f7506955", "createdAt": 1755244097529, "paymentLinkTransactionId": "00617429-fc1c-44db-a0ba-e31d3f0edd70", "fee": [], "paymentLinkId": "a6be24df-1335-4682-902c-f0474c1826c0", "subscriptionId": null, "xenditTransactionId": null, "subscription": null, "xenditTransaction": null, "paymentLinkTransaction": { "id": "00617429-fc1c-44db-a0ba-e31d3f0edd70", "urlParamTrackingData": null, "isAdminFeeBorneByCustomer": null, "isChannelFeeBorneByCustomer": null }, "customeField": null, "customer": { "id": "ce1234f3-6843-4d5c-8838-b7d6f7506955", "name": "trial", "email": "trial@gmail.com", "mobile": "0884444730242" }, "paymentLink": { "id": "a6be24df-1335-4682-902c-f0474c1826c0", "name": "test membership cohort analisis" } }, { "id": "306aa4ae-e41b-4dc3-89c5-585ec0ae92dd", "credit": 1059, "status": "settled", "balanceHistoryType": "digital_product", "paymentMethod": "QRIS", "customerId": "6a38cf26-6bab-42c8-92be-72f3a9fd4c33", "createdAt": 1755012459984, "paymentLinkTransactionId": "8e7646b1-8c65-4219-9c49-50de5e2f0420", "fee": [ { "id": "66e365d3-9afc-4dec-ad2d-ed925433ddd9", "balanceHistoryType": "xendit_fee", "debit": 6 }, { "id": "973d31bb-c3cf-4b80-b09f-783b0a7fec88", "balanceHistoryType": "mayar_fee", "debit": 53 } ], "paymentLinkId": "d071116a-4359-4262-90dc-a7bd137c1baa", "subscriptionId": null, "xenditTransactionId": "a57b842e-8ffe-4851-9d15-7716c2f56902", "subscription": null, "paymentLinkTransaction": { "id": "8e7646b1-8c65-4219-9c49-50de5e2f0420", "urlParamTrackingData": null, "isAdminFeeBorneByCustomer": true, "isChannelFeeBorneByCustomer": true }, "customeField": null, "customer": { "id": "6a38cf26-6bab-42c8-92be-72f3a9fd4c33", "name": "Harus Buat auto testing", "email": "mayartesting05@gmail.com", "mobile": "081320547877" }, "paymentLink": { "id": "d071116a-4359-4262-90dc-a7bd137c1baa", "name": "test" } } ] } ``` -------------------------------- ### Get Customer Credit History (cURL) Source: https://docs.mayar.id/api-reference/creditbasedproduct/paginatecustomercredithistory Example of how to fetch a customer's credit transaction history using cURL. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request GET 'https://api.mayar.id/credit/v1/credit/customer/paginate-credit-history/PQVS4KGY?productId=40f26fbe-f4d8-4693-975f-e6d105d291e6&membershipTierId=261acae0-d6ae-4d8c-adf5-6fb8c2361514&page=1&limit=5' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### cURL Request Example Source: https://docs.mayar.id/api-reference/reqpayment/edit Demonstrates how to send a POST request to create a payment request using cURL. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key. ```bash curl --request POST 'https://api.mayar.id/hl/v1/invoice/create' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data-raw '{ \ "name": "Azumii", \ "email": "azumiikecee@gmail.com", \ "amount": 100000, \ "mobile": "089961367511", \ "redirectUrl": "https://web.mayar.id.", \ "description": "Ubah ReqPayment", \ "expiredAt": "2025-12-29T09:41:09.401Z", \ "id": "e890d24a-cfc0-4915-83d2-3166b9ffba9e" \ }' ``` -------------------------------- ### Get Product by Type Filter Source: https://docs.mayar.id/api-reference/product/productpagewithfilter Use this cURL command to retrieve products of a specific type, such as 'ebook'. Include your API key in the Authorization header. The example filters for 'ebook' and paginates results. ```bash curl --request GET 'https://api.mayar.id/hl/v1/product/type/ebook?page=1&pageSize=100' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' ``` -------------------------------- ### Close Invoice Request Example Source: https://docs.mayar.id/api-reference/invoice/close Use this cURL command to send a GET request to close an invoice. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and the invoice ID with the correct identifier. ```bash curl --request GET 'https://api.mayar.id/hl/v1/invoice/close/f774034d-d9cc-43a0-97d8-a2520c127f03' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Re-open Invoice Request Example Source: https://docs.mayar.id/api-reference/invoice/reopen Use this cURL command to send a GET request to re-open a specific invoice. Ensure you replace 'Paste-Your-API-Key-Here' with your actual API key and the invoice ID with the correct UUID. ```bash curl --request GET 'https://api.mayar.id/hl/v1/invoice/open/f774034d-d9cc-43a0-97d8-a2520c127f03' \ --header 'Authorization: Bearer Paste-Your-API-Key-Here' \ --data '' ``` -------------------------------- ### Product Search Response Example Source: https://docs.mayar.id/api-reference/product/search This is a successful response (200 OK) when searching for products. It contains product details, pagination information, and a list of matching products. ```json { "statusCode": 200, "messages": "success", "hasMore": false, "pageCount": 1, "pageSize": 10, "page": 1, "data": [ { "id": "3d4a503a-04a7-4587-915a-8983f0ab05f7", "amount": 300000, "category": null, "createdAt": 1704961863326, "description": "

Yo 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 }' ```