{"info":{"_postman_id":"5423fb57-e2cd-4899-9b9d-074940527af7","name":"API Documentation","description":"<html><head></head><body><p>The M4HR API is a secure and reliable solution for processing credit card payments. Designed for seamless integration, it enables businesses to accept payments efficiently while ensuring compliance with industry security standards, such as PCI DSS. This API supports a variety of credit card types, including Visa, Mastercard, American Express, and more.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"547480","collectionId":"5423fb57-e2cd-4899-9b9d-074940527af7","publishedId":"2sB3BBqXU2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-08-05T17:10:17.000Z"},"item":[{"name":"Authentication","item":[{"name":"getToken","id":"d93f966a-303a-4f77-a75f-09ed611b6a11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sbxapiuser\",\n    \"password\": \"stl_T5K=D8l!\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/getToken","description":"<h2 id=\"description\">Description</h2>\n<p>The <code>https://api.m4hr.xyz/getToken</code> endpoint is used to authenticate a user and obtain an access token for interacting with the Payment API. This endpoint accepts a POST request with a JSON payload containing the user's credentials. Upon successful authentication, it returns a token that can be used for subsequent API requests.</p>\n<h2 id=\"http-method\">HTTP Method</h2>\n<p>POST</p>\n<h2 id=\"url\">URL</h2>\n<p><code>https://api.m4hr.xyz/getToken</code></p>\n<h2 id=\"request-payload\">Request Payload</h2>\n<p>The request must include a JSON object with the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>username</code></td>\n<td>String</td>\n<td>The username for authentication.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>The password for authentication.</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-payload\">Example Payload</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"username\": \"sbxapiuser\",\n    \"password\": \"stl_T5K=D8l!\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li><p><strong>Success (200 OK)</strong>: Returns a JSON object containing the access token and its expiration details.</p>\n</li>\n<li><p><strong>Error (401 Unauthorized)</strong>: Returned if the provided credentials are invalid.</p>\n</li>\n<li><p><strong>Error (400 Bad Request)</strong>: Returned if the request payload is malformed or missing required fields.</p>\n</li>\n<li><p><strong>Error (422 Unprocessable Entity)</strong>: Returned if the request payload data is invalid.</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The endpoint is secured with HTTPS to ensure data privacy.</p>\n</li>\n<li><p>Tokens issued by this endpoint must be included in the Authorization header of subsequent API requests.</p>\n</li>\n<li><p>Ensure credentials are stored securely and not exposed in client-side code.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["getToken"],"host":["api","m4hr","xyz"],"query":[],"variable":[]}},"response":[{"id":"3b40c6fd-c53c-4090-9af6-2b235250494a","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sbxapiuser\",\n    \"password\": \"stl_T5K=D8l!\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/getToken"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 05 Aug 2025 05:25:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Set-Cookie","value":"PHPSESSID=f95be00da5631f98ba3bdda8ed957f0b; path=/"},{"key":"Set-Cookie","value":"__cf_bm=olBNF_sDQcD88hdL.V3tmrFuCza1nduMKvAf.wku9Q0-1754371527-1.0.1.1-72LKEJ1KqxZn65cz_9d_Lu9c48Om1SNQK1F2vX4G5O07dgy00mrIF_ZSPqB51.IPwawB7dHxXMuRpfuoHt.XSCgvs7gOWZGwTJ2K9lG.nCU; path=/; expires=Tue, 05-Aug-25 05:55:27 GMT; domain=.api.m4hr.xyz; HttpOnly; Secure; SameSite=None"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-orig-status","value":"200"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"96a3dfbeb98cea88-IAD"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTQzNzE1MjcsImV4cCI6MTc1NDM3MjQyNywianRpIjoiZ0JQdmVBNXRyVXJtcFQ1MjJGODFxZz09IiwiaXNzIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9zbGltLXBocC1yZWFsd29ybGQtZXhhbXBsZS1hcHAiLCJzdWIiOiJzYnhhcGl1c2VyIn0.w7wIINUx7Z52yc2O0zKJ08GQrg6lAzPVhLfy-pFPMRg\"\n}"},{"id":"d6020ea0-65e6-4015-8d8f-96f04da3121a","name":"With errors","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"sbxapiuser\",\n    \"password\": \"stl_T5K=D8l!as\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/getToken"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 05 Aug 2025 05:35:05 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-orig-status","value":"422"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"96a3edd78b51056b-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": [\n        \"Authentication data provided is invalid\"\n    ]\n}"}],"_postman_id":"d93f966a-303a-4f77-a75f-09ed611b6a11"}],"id":"638e7a82-8983-444a-9a5a-da95e2051e96","_postman_id":"638e7a82-8983-444a-9a5a-da95e2051e96","description":""},{"name":"Charge","item":[{"name":"charge","id":"335648bd-5e61-4d13-a53e-5ee2a166cf42","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"publicKey\": \"w8eyERop7ubR5staW8\",\n        \"amount\": \"22.99\",\n        \"currency\": \"USD\",\n        \"reference\": \"1254412661\",\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"email\": \"john.due@gmail.com\",\n        \"phone\": \"+555 88997766\",\n        \"address\": \"742 Evergreen Terrace\",\n        \"postalCode\": \"98052\",\n        \"city\": \"Springfield\",\n        \"state\": \"WA\",\n        \"country\": \"US\",\n        \"ip\": \"172.0.0.99\",\n        \"cardHolderName\": \"Fernando Sequeira\",\n        \"cardNumber\": 4242424242424242,\n        \"cardCVV\": \"123\",\n        \"cardExpiryMonth\": \"12\",\n        \"cardExpiryYear\": \"2099\",\n        \"notificationUrl\": \"https://notify.me/listener/\",\n        \"callbackUrl\": \"https://merchantsite.store/redirectback/hash=wlbotruchiprlstic49ev7brO8aciphlqox1d5t\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/charge","description":"<h2 id=\"description\">Description</h2>\n<p>The <code>https://api.m4hr.xyz/charge</code> endpoint processes a credit card payment transaction. This endpoint accepts a POST request with a JSON payload containing payment details, customer information, and credit card data. It requires an Authorization Bearer token in the request header for authentication. Upon successful processing, it returns a response with transaction details, including status and authorization code.</p>\n<h2 id=\"http-method\">HTTP Method</h2>\n<p>POST</p>\n<h2 id=\"url\">URL</h2>\n<p><code>https://api.m4hr.xyz/charge</code></p>\n<h2 id=\"headers\">Headers</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Authorization</code></td>\n<td><code>Bearer</code></td>\n<td>The access token obtained from the <code>/getToken</code> endpoint.</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-payload\">Request Payload</h2>\n<p>The request must include a JSON object with a <code>data</code> field containing the following properties:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>publicKey</code></td>\n<td>String</td>\n<td>The public key provided by the onboarding team.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>String</td>\n<td>The transaction amount (e.g., \"2.99\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>String</td>\n<td>The currency code for the transaction (e.g., \"USD\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>reference</code></td>\n<td>String</td>\n<td>A unique reference ID for the transaction.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>firstName</code></td>\n<td>String</td>\n<td>The cardholder's first name.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>String</td>\n<td>The cardholder's last name.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>The cardholder's email address.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>String</td>\n<td>The cardholder's phone number (e.g., \"+5068816453\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>String</td>\n<td>The cardholder's billing address.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>postalCode</code></td>\n<td>String</td>\n<td>The postal code for the billing address.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>String</td>\n<td>The city for the billing address.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>String</td>\n<td>The state or region code for the billing address (e.g., \"WA\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>String</td>\n<td>The country code for the billing address (e.g., \"US\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>ip</code></td>\n<td>String</td>\n<td>The IP address of the client initiating the transaction.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>cardHolderName</code></td>\n<td>String</td>\n<td>The full name on the credit card.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>cardNumber</code></td>\n<td>Number</td>\n<td>The credit card number (e.g., 4242424242424242).</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>cardCVV</code></td>\n<td>String</td>\n<td>The card's CVV code (e.g., \"123\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>cardExpiryMonth</code></td>\n<td>String</td>\n<td>The card's expiry month (e.g., \"12\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>cardExpiryYear</code></td>\n<td>String</td>\n<td>The card's expiry year (e.g., \"2099\").</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>notificationUrl</code></td>\n<td>String</td>\n<td>The URL to receive asynchronous transaction notifications.</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code>callbackUrl</code></td>\n<td>String</td>\n<td>The URL to redirect the user after transaction processing.</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-payload\">Example Payload</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"publicKey\": \"stoyihuzas8afe\",\n        \"amount\": \"2.99\",\n        \"currency\": \"USD\",\n        \"reference\": \"1254412661\",\n        \"firstName\": \"Fernando\",\n        \"lastName\": \"Sequeira\",\n        \"email\": \"fernando.sequeira@gmail.com\",\n        \"phone\": \"+5068816453\",\n        \"address\": \"742 Evergreen Terrace\",\n        \"postalCode\": \"11101\",\n        \"city\": \"Coroando\",\n        \"state\": \"SJ\",\n        \"country\": \"CR\",\n        \"ip\": \"172.0.0.99\",\n        \"cardHolderName\": \"Fernando Sequeira\",\n        \"cardNumber\": 4242424242424242,\n        \"cardCVV\": \"123\",\n        \"cardExpiryMonth\": \"12\",\n        \"cardExpiryYear\": \"2099\",\n        \"notificationUrl\": \"http://192.168.1.17/woocomerce-plugins/bog-3d/notify/index.php\",\n        \"callbackUrl\": \"http://sandbox.local/redirectback.php\"\n    }\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>The response is a JSON object containing transaction details under the <code>result</code> field.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>String</td>\n<td>The unique transaction ID (e.g., \"F4FA7BC7-36DD-4082-A1F8-12E929EBDFBA\").</td>\n</tr>\n<tr>\n<td><code>reference</code></td>\n<td>String</td>\n<td>The transaction reference ID provided in the request.</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>String</td>\n<td>The currency code of the transaction.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>String</td>\n<td>The transaction amount.</td>\n</tr>\n<tr>\n<td><code>authCode</code></td>\n<td>String</td>\n<td>The authorization code for the transaction (e.g., \"111111\").</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>The transaction status (e.g., \"Approved\").</td>\n</tr>\n<tr>\n<td><code>redirectUrl</code></td>\n<td>String</td>\n<td>The URL for redirection, if applicable (e.g., \"No URL\").</td>\n</tr>\n<tr>\n<td><code>descriptor</code></td>\n<td>String</td>\n<td>Also known as a billing descriptor or merchant descriptor) is the text that appears on a customer’s credit or debit card statement to identify the source of a transaction (e.g., \"sandbox descriptor\").</td>\n</tr>\n<tr>\n<td><code>timestamp</code></td>\n<td>String</td>\n<td>The timestamp of the transaction (e.g., \"2025-08-05T05:54:55.676000Z\").</td>\n</tr>\n<tr>\n<td><code>error</code></td>\n<td>Object</td>\n<td>Error details, including <code>code</code> and <code>message</code> (e.g., \"000\", \"Approved transaction\").</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"result\": {\n        \"id\": \"F4FA7BC7-36DD-4082-A1F8-12E929EBDFBA\",\n        \"reference\": \"1254412661\",\n        \"currency\": \"USD\",\n        \"amount\": \"22.99\",\n        \"authCode\": \"111111\",\n        \"status\": \"Approved\",\n        \"redirectUrl\": \"No URL\",\n        \"descriptor\": \"sandbox descriptor\",\n        \"timestamp\": \"2025-08-05T05:54:55.676000Z\",\n        \"error\": {\n            \"code\": \"000\",\n            \"message\": \"Approved transaction\"\n        }\n    }\n}\n\n</code></pre>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li>The endpoint is secured with HTTPS to protect sensitive data, such as credit card information.</li>\n<li>Ensure the <code>publicKey</code> is valid and obtained via the onboarding team.</li>\n<li>The <code>cardNumber</code> and <code>cardCVV</code> must comply with PCI DSS standards and should not be stored after processing.</li>\n<li>The <code>notificationUrl</code> and <code>callbackUrl</code> must be valid and accessible URLs for receiving notifications and redirecting users.</li>\n<li>Possible <code>status</code> values include \"Approved\", \"Declined\", \"Failed\", or \"Pending\", depending on the transaction outcome.</li>\n<li>Error codes and messages in the response provide additional context for failed transactions.</li>\n</ul>\n<h2 id=\"hosted-payment-page-flow-hpp\">Hosted Payment Page Flow (HPP)</h2>\n<p>The Hosted Payment Page (HPP) allows merchants to redirect customers to a secure PCI-compliant checkout page.</p>\n<p>This flow uses the <strong>same endpoint</strong>: <code>https://api.m4hr.xyz/charge</code></p>\n<p>When a charge request is created with <code>callbackUrl</code> and/or <code>notificationUrl</code>, the API will return a redirect URL where the customer can complete the payment using our hosted page.</p>\n<h3 id=\"request-payload-1\">Request Payload</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"publicKey\": \"stoyihuzas8afe\",\n        \"amount\": \"3.99\",\n        \"currency\": \"USD\",\n        \"reference\": \"1254412661\",\n        \"firstName\": \"Fernando\",\n        \"lastName\": \"Sequiera\",\n        \"email\": \"fernando.sequeira@gmail.com\",\n        \"phone\": \"+555 88997766\",\n        \"address\": \"742 Evergreen Terrace\",\n        \"postalCode\": \"98052\",\n        \"city\": \"Springfield\",\n        \"state\": \"SJ\",\n        \"country\": \"CR\",\n        \"ip\": \"172.0.0.99\",\n        \"notificationUrl\": \"http://sandbox.local/webhook\", \n        \"callbackUrl\": \"http://sandbox.local/redirectback.php?hash=wlbotruchiprlstic49ev7brO8aciphlqox1d5t\"\n    }\n}\n\n</code></pre>\n<h2 id=\"response-example\">Response Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"result\": {\n        \"id\": \"ECA8038D-A064-449C-81CA-B4C1ED812D8C\",\n        \"reference\": \"1254412661\",\n        \"currency\": \"USD\",\n        \"amount\": \"3.99\",\n        \"authCode\": \"888888\",\n        \"status\": \"Redirect\",\n        \"redirectUrl\": \"https://api.m4hr.xyz/redirect/1111\",\n        \"descriptor\": \"Sandbox Redirect\",\n        \"timestamp\": \"2025-10-08T16:39:10.514000Z\",\n        \"error\": {\n            \"code\": \"800\",\n            \"message\": \"Redirect customer\"\n        }\n    }\n}\n\n</code></pre>\n<h3 id=\"flow-summary\">Flow Summary</h3>\n<ol>\n<li>Merchant sends a charge request to <code>/charge</code> with standard payment parameters.</li>\n<li>API generates a payment session and returns <code>checkoutUrl</code>.</li>\n<li>Customer is redirected to the Hosted Payment Page.</li>\n<li>After payment:<ul>\n<li><code>notificationUrl</code> receives server-to-server webhook with transaction result.</li>\n<li><code>callbackUrl</code> redirects the customer back to the merchant website.</li>\n</ul>\n</li>\n</ol>\n","urlObject":{"protocol":"https","path":["charge"],"host":["api","m4hr","xyz"],"query":[],"variable":[]}},"response":[{"id":"7a858d5a-5ad0-4c1e-bb4c-98fc35467920","name":"Failed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"publicKey\": \"w8eyERop7ubR5staW8\",\n        \"amount\":  \"22.99\",\n        \"currency\": \"USD\",\n        \"reference\": \"1254412661\",\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"email\": \"john.due@gmail.com\",\n        \"phone\": \"+555 88997766\",\n        \"address\": \"742 Evergreen Terrace\",\n        \"postalCode\": \"98052\",\n        \"city\": \"Springfield\",\n        \"state\": \"WA\",\n        \"country\": \"US\",\n        \"ip\": \"172.0.0.99\",\n        \"notificationUrl\": \"https://notify.me/listener/\",\n        \"callbackUrl\": \"https://merchantsite.store/redirectback/hash=wlbotruchiprlstic49ev7brO8aciphlqox1d5t\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/charge"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 05 Aug 2025 05:49:03 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-orig-status","value":"200"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"96a4024e99985830-IAD"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"status\": \"Failed\",\n        \"error\": {\n            \"code\": \"003\",\n            \"message\": \"Merchant Mid not found\"\n        }\n    }\n}"},{"id":"1d7aaf40-95ed-4d96-913c-92292401876e","name":"Approved","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"publicKey\": \"w8eyERop7ubR5staW8\",\n        \"amount\": \"22.99\",\n        \"currency\": \"USD\",\n        \"reference\": \"1254412661\",\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"email\": \"john.due@gmail.com\",\n        \"phone\": \"+555 88997766\",\n        \"address\": \"742 Evergreen Terrace\",\n        \"postalCode\": \"98052\",\n        \"city\": \"Springfield\",\n        \"state\": \"WA\",\n        \"country\": \"US\",\n        \"ip\": \"172.0.0.99\",\n        \"cardHolderName\": \"Fernando Sequeira\",\n        \"cardNumber\": 4242424242424242,\n        \"cardCVV\": \"123\",\n        \"cardExpiryMonth\": \"12\",\n        \"cardExpiryYear\": \"2099\",\n        \"notificationUrl\": \"https://notify.me/listener/\",\n        \"callbackUrl\": \"https://merchantsite.store/redirectback/hash=wlbotruchiprlstic49ev7brO8aciphlqox1d5t\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://api.m4hr.xyz/charge"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 05 Aug 2025 05:54:55 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-orig-status","value":"200"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"96a40ae91e67b4a5-IAD"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"id\": \"F4FA7BC7-36DD-4082-A1F8-12E929EBDFBA\",\n        \"reference\": \"1254412661\",\n        \"currency\": \"USD\",\n        \"amount\": \"22.99\",\n        \"authCode\": \"111111\",\n        \"status\": \"Approved\",\n        \"redirectUrl\": \"No URL\",\n        \"descriptor\": \"sandbox descriptor\",\n        \"timestamp\": \"2025-08-05T05:54:55.676000Z\",\n        \"error\": {\n            \"code\": \"000\",\n            \"message\": \"Approved transaction\"\n        }\n    }\n}"}],"_postman_id":"335648bd-5e61-4d13-a53e-5ee2a166cf42"}],"id":"06302dbf-65c7-40a5-850b-3091b9f512fe","_postman_id":"06302dbf-65c7-40a5-850b-3091b9f512fe","description":""},{"name":"Get Transaction","item":[{"name":"Get Transaction","id":"d033aa3c-9a74-409f-a330-a56081b24c45","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://api.m4hr.xyz/charge/b848uprikUbinlcru9/A22C49B7-F6B7-4C1B-BD13-CC8102DC16C5","description":"<p>You can retrieve the status and details of a transaction using the following endpoint:</p>\n<p>GET <a href=\"https://api.m4hr.xyz/charge/%7BpublicKey%7D/%7BtransactionId%7D\">https://api.m4hr.xyz/charge/{publicKey}/{transactionId}</a></p>\n<p><strong>Authorization is required</strong> using the <code>Bearer</code> token format.</p>\n","urlObject":{"protocol":"https","path":["charge","b848uprikUbinlcru9","A22C49B7-F6B7-4C1B-BD13-CC8102DC16C5"],"host":["api","m4hr","xyz"],"query":[],"variable":[]}},"response":[{"id":"1241a948-8ac9-43e9-8f80-021fae23c52b","name":"Transaction Found","originalRequest":{"method":"GET","header":[],"url":"https://api.m4hr.xyz/charge/b848uprikUbinlcru9/A22C49B7-F6B7-4C1B-BD13-CC8102DC16C5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Dec 2025 01:39:25 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Encoding","value":"br"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"x-do-orig-status","value":"200"},{"key":"cf-cache-status","value":"MISS"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"9ab0c9df482488f6-MIA"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"id\": \"A22C49B7-F6B7-4C1B-BD13-CC8102DC16C4\",\n        \"reference\": \"1254412661\",\n        \"currency\": \"USD\",\n        \"amount\": \"10.99\",\n        \"authCode\": \"000000\",\n        \"status\": \"Approved\",\n        \"redirectUrl\": \"No URL\",\n        \"descriptor\": \"\",\n        \"timestamp\": \"2025-12-08T20:16:15.251000Z\",\n        \"error\": {\n            \"code\": \"000\",\n            \"message\": \"Approved transaction\"\n        }\n    }\n}"},{"id":"4a89dabe-22e5-43ee-8e25-7289608d2414","name":"Transaction Not Found","originalRequest":{"method":"GET","header":[],"url":"https://api.m4hr.xyz/charge/b848uprikUbinlcru9/A22C49B7-F6B7-4C1B-BD13-CC8102DC16C5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Dec 2025 03:43:23 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Encoding","value":"br"},{"key":"expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"pragma","value":"no-cache"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"access-control-allow-methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"x-do-app-origin","value":"df1378ef-8f63-40ba-a33a-6987b2badebc"},{"key":"x-do-orig-status","value":"200"},{"key":"cf-cache-status","value":"MISS"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"9ab17f7c4f770da2-TPA"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"error\": {\n            \"code\": \"011\",\n            \"message\": \"Transaction not found\"\n        }\n    }\n}"}],"_postman_id":"d033aa3c-9a74-409f-a330-a56081b24c45"}],"id":"64f4c3ef-d8aa-4343-b888-d32e3df85010","_postman_id":"64f4c3ef-d8aa-4343-b888-d32e3df85010","description":""},{"name":"Testing (Sandbox Environment)","item":[],"id":"d99475bf-480b-43ff-910a-54e4cceb7807","description":"<p>You can simulate payment results in test mode using the following card numbers. No real charges will be made during testing.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Card Number</th>\n<th>Result</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>4242 4242 4242 4242</strong></td>\n<td>✅ Approved transaction</td>\n</tr>\n<tr>\n<td><strong>4242 4242 4242 4341</strong></td>\n<td>❌ Declined transaction</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong></p>\n<ul>\n<li><p>Use any valid future expiration date.</p>\n</li>\n<li><p>Any 3-digit CVV can be used (e.g., <code>123</code>).</p>\n</li>\n<li><p>Amount and currency can be set freely for testing.</p>\n</li>\n</ul>\n","_postman_id":"d99475bf-480b-43ff-910a-54e4cceb7807"}]}