{"info":{"_postman_id":"c938c6c4-df62-44a5-94b9-b7ae680e8326","name":"Payment","description":"<html><head></head><body><h2 id=\"authentication\">Authentication</h2>\n<p>To use the payments API you should do the following:</p>\n<ul>\n<li><p>Sign up at <a href=\"https://cryptogram.vip\">Cryptogram </a> for a free account.</p>\n</li>\n<li><p>Obtain your access token in the <em>Developer</em> section under your account.</p>\n</li>\n<li><p>Add the token to the <code>Authorization</code> header of your HTTP requests using the format: <code>Authorization: Bearer YOUR_ACCESS_TOKEN</code></p>\n</li>\n</ul>\n<h2 id=\"payment-workflow\">Payment Workflow</h2>\n<ol>\n<li><p>Frontend: Determine the total sum of purchase and currency for a customer.</p>\n</li>\n<li><p>API: Send a request to create payment of the total sum and currency.</p>\n</li>\n<li><p>Frontend: Redirect the customer to the generated payment url.</p>\n</li>\n<li><p>Cryptogram: The customer completes the payment and is redirected back.</p>\n</li>\n<li><p>API: Listen for payment notification and/or send a request to retrieve the details.</p>\n</li>\n</ol>\n<h2 id=\"instant-payments-notifications\">Instant Payments Notifications</h2>\n<p>IPN (Instant payment notifications, or webhooks) is used to notify you when the status of a payment changes, follow these steps to get started:</p>\n<ul>\n<li><p>Create webhook in the <em>Developer</em> section under your account.</p>\n</li>\n<li><p>Specify the target url, when the notification will be sent to.</p>\n</li>\n<li><p>Please make sure that firewall software on your server (such as: Cloudflare) allows our requests to come through. It may be required to whitelist our IP addresses.</p>\n</li>\n<li><p>When the status of a payment changes, you will receive a POST request at the provided url. The body of the request will only contain the \"id\" of the payment resource, and you should send a request to retrieve the payment details.</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"resource\": \"CommercePayment\",\n    \"id\": \"6d8eefdb-7e06-47e9-bcc9-7aa320c3aa82\"\n}\n\n</code></pre>\n<ul>\n<li>In the event of a failure, we will re-attempt the request for 19 more times over the period of several hours.</li>\n</ul>\n<h2 id=\"available-wallets\">Available Wallets</h2>\n<p>When creating a payment, you must specify the accepted cryptocurrency. Below are the available wallets and their identifiers:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Identifier</strong></th>\n<th><strong>Wallet</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>btc</td>\n<td>Bitcoin</td>\n</tr>\n<tr>\n<td>eth</td>\n<td>Ethereum</td>\n</tr>\n<tr>\n<td>bnb</td>\n<td>Binance Coin</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"42478447","collectionId":"c938c6c4-df62-44a5-94b9-b7ae680e8326","publishedId":"2sAYdbQDza","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-03T10:48:38.000Z"},"item":[{"name":"Create Payment","id":"c7b0609e-80da-4634-8f3d-c7231bfa7aea","protocolProfileBehavior":{"disabledSystemHeaders":{"accept":true},"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{your_access_token}"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 10,\n    \"currency\": \"USD\",\n    \"wallets\": [\"bnb\"],\n    \"title\": \"Vulputate ipsum penatibus.\",\n    \"description\": \"Ullamcorper quia lorem penatibus? Mi hendrerit sequi fuga. Magni, nobis cum ultrices dapibus provident.\",\n    \"redirect\": \"https://cryptogram.vip\",\n    \"expires_at\": \"2025-05-19T09:13:28\",\n    \"message\": \"Magnam hic esse mollitia! Similique ligula, minus montes pellentesque dis, consequuntur imperdiet.\"\n}","options":{"raw":{"language":"json"}}},"url":"https://cryptogram.vip/api/v1/commerce-payments","description":"<p>This endpoint should be used to create payment on our servers.</p>\n<h3 id=\"request-fields\">Request Fields:</h3>\n<ul>\n<li><p>amount (required): The amount that users have to pay in fiat currency.</p>\n</li>\n<li><p>currency (required): The fiat currency in which the amount is denominated.</p>\n</li>\n<li><p>wallets (required): The accepted cryptocurrencies for this payment.</p>\n</li>\n<li><p>title (required): The title to be displayed on the payment page.</p>\n</li>\n<li><p>description (required): The description of the payment for the customer.</p>\n</li>\n<li><p>redirect (required): Where the customer should be redirected to after payment.</p>\n</li>\n<li><p>message (required): The message that should be displayed to the customer after payment.</p>\n</li>\n<li><p>expires_at (required): This is when the payment link should expire.</p>\n</li>\n</ul>\n<h3 id=\"response-fields\">Response Fields:</h3>\n<p>It is the same as the <a href=\"https://go.postman.co/workspace/Cryptogram~bb52492c-a318-414a-ab82-2041e5a5a476/documentation/42478447-c938c6c4-df62-44a5-94b9-b7ae680e8326?entity=request-e4c12f20-2cf3-4f06-8014-8e69d8832450\">Get Payment</a> request.</p>\n","urlObject":{"path":["api","v1","commerce-payments"],"host":["https://cryptogram.vip"],"query":[],"variable":[]}},"response":[{"id":"744e9e5d-2c46-4d6d-a831-4aa282c7c480","name":"Newly Created","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 10,\n    \"currency\": \"USD\",\n    \"wallets\": [\"bnb\"],\n    \"title\": \"Vulputate ipsum penatibus.\",\n    \"description\": \"Ullamcorper quia lorem penatibus? Mi hendrerit sequi fuga. Magni, nobis cum ultrices dapibus provident.\",\n    \"redirect\": \"https://cryptogram.vip\",\n    \"expires_at\": \"2025-05-19T09:13:28\",\n    \"message\": \"Magnam hic esse mollitia! Similique ligula, minus montes pellentesque dis, consequuntur imperdiet.\"\n}","options":{"raw":{"language":"json"}}},"url":"https://cryptogram.vip/api/v1/commerce-payments"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 21 Feb 2025 13:01:12 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.27"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"1000"},{"key":"X-RateLimit-Remaining","value":"999"},{"key":"Vary","value":"Origin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"strict-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"2a36905c-aadc-4cf5-98e6-0f2b8cdfe57a\",\n    \"amount\": 10,\n    \"currency\": \"USD\",\n    \"title\": \"Vulputate ipsum penatibus.\",\n    \"description\": \"Ullamcorper quia lorem penatibus? Mi hendrerit sequi fuga. Magni, nobis cum ultrices dapibus provident.\",\n    \"redirect\": \"https://cryptogram.vip\",\n    \"message\": \"Magnam hic esse mollitia! Similique ligula, minus montes pellentesque dis, consequuntur imperdiet.\",\n    \"expires_at\": \"2025-05-19T09:13:28.000000Z\",\n    \"created_at\": \"2025-02-21T13:01:12.000000Z\",\n    \"updated_at\": \"2025-02-21T13:01:12.000000Z\",\n    \"wallets\": [\n        \"bnb\"\n    ],\n    \"url\": \"https://cryptogram.vip/payments/2a36905c-aadc-4cf5-98e6-0f2b8cdfe57a\",\n    \"transaction\": null\n}"}],"_postman_id":"c7b0609e-80da-4634-8f3d-c7231bfa7aea"},{"name":"Get Payment","id":"e4c12f20-2cf3-4f06-8014-8e69d8832450","protocolProfileBehavior":{"disabledSystemHeaders":{"accept":true},"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{your_access_token}"}]},"isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"https://cryptogram.vip/api/v1/commerce-payments/{payment_id}","description":"<p>This endpoint should be used to retrieve payment details</p>\n<h3 id=\"response-fields\">Response Fields:</h3>\n<p>The payment properties submitted at the time of creation will be included, along with the following additional properties:</p>\n<ul>\n<li><p><strong>id:</strong> This is the payment id. Save it with the associated record for the customer at your backend, so that you can use it to verify payment at a later date.</p>\n</li>\n<li><p><strong>created_at:</strong> The date when the payment was created.</p>\n</li>\n<li><p><strong>updated_at:</strong> The last time the payment was updated.</p>\n</li>\n<li><p><strong>url:</strong> The payment link to which the customer should be redirected.</p>\n</li>\n<li><p><strong>transaction:</strong> This is available when the customer has initiated transaction with one of the accepted cryptocurrencies of the payment, otherwise it will be null.</p>\n</li>\n<li><p><strong>transaction.wallet:</strong> This is the wallet the customer has chosen for the payment.</p>\n</li>\n<li><p><strong>transaction.status:</strong> This is the current state. It is one of <code>completed</code>, <code>pending</code>, <code>canceled</code></p>\n</li>\n<li><p><strong>transaction.value:</strong> This is the expected amount the customer should pay in crypto.</p>\n</li>\n<li><p><strong>transaction.price:</strong> This is the expected amount, converted to fiat currency.</p>\n</li>\n<li><p><strong>transaction.received:</strong> This is the amount that has been received by the customer in crypto.</p>\n</li>\n<li><p><strong>transaction.received_price:</strong> This is the received amount, converted to fiat currency.</p>\n</li>\n<li><p><strong>transaction.address:</strong> This is where the customer should send the crypto.</p>\n</li>\n<li><p><strong>transaction.completed_at:</strong> When the transaction was marked as completed.</p>\n</li>\n<li><p><strong>transaction.created_at:</strong> When the transaction was created.</p>\n</li>\n<li><p><strong>transaction.updated_at:</strong> When the transaction was last updated.</p>\n</li>\n</ul>\n","urlObject":{"path":["api","v1","commerce-payments","{payment_id}"],"host":["https://cryptogram.vip"],"query":[],"variable":[]}},"response":[{"id":"7e539a54-bcd4-4e98-b9af-5c2b5f117950","name":"Payment Details","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"https://cryptogram.vip/api/v1/commerce-payments/{payment_id}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 21 Feb 2025 14:16:01 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.27"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"1000"},{"key":"X-RateLimit-Remaining","value":"999"},{"key":"Vary","value":"Origin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"strict-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"7344515a-926b-411b-bf95-8064a2341dec\",\n    \"amount\": 10,\n    \"currency\": \"USD\",\n    \"title\": \"Vulputate ipsum penatibus.\",\n    \"description\": \"Ullamcorper quia lorem penatibus? Mi hendrerit sequi fuga. Magni, nobis cum ultrices dapibus provident.\",\n    \"redirect\": \"https://cryptogram.vip\",\n    \"message\": \"Magnam hic esse mollitia! Similique ligula, minus montes pellentesque dis, consequuntur imperdiet.\",\n    \"expires_at\": \"2025-05-19T09:13:28.000000Z\",\n    \"created_at\": \"2025-02-21T13:38:45.000000Z\",\n    \"updated_at\": \"2025-02-21T13:38:45.000000Z\",\n    \"wallets\": [\n        \"bnb\"\n    ],\n    \"url\": \"https://cryptogram.vip/payments/7344515a-926b-411b-bf95-8064a2341dec\",\n    \"transaction\": {\n        \"wallet\": \"bnb\",\n        \"currency\": \"USD\",\n        \"status\": \"completed\",\n        \"value\": 0.01499948,\n        \"price\": 10,\n        \"received\": 0.0149995,\n        \"received_price\": 10,\n        \"address\": \"0x91e1fD3da33423Daf871126f9ef831B7f8FF3d4E\",\n        \"completed_at\": \"2025-02-21T13:43:04.000000Z\",\n        \"canceled_at\": null,\n        \"created_at\": \"2025-02-21T13:38:57.000000Z\",\n        \"updated_at\": \"2025-02-21T13:43:04.000000Z\"\n    }\n}"}],"_postman_id":"e4c12f20-2cf3-4f06-8014-8e69d8832450"},{"name":"Update Payment","id":"f40afab5-d63c-4a6d-802a-2eb8bff9cab1","protocolProfileBehavior":{"disabledSystemHeaders":{"accept":true},"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{your_access_token}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Facere rhoncus sapien laoreet.\",\n    \"description\": \"Exercitation voluptatum etiam rem sem laudantium! Viverra eros, commodi arcu quasi risus facilisi doloribus.\",\n    \"redirect\": \"https://cryptogram.vip/auth/login\",\n    \"message\": \"Diamlorem molestiae odio cillum, dictumst primis sequi et nobis iusto, penatibus nam placerat augue doloremque.\"\n}","options":{"raw":{"language":"json"}}},"url":"https://cryptogram.vip/api/v1/commerce-payments/{payment_id}","description":"<p>This endpoint should be used to update an existing payment on our servers.</p>\n<h3 id=\"request-fields\">Request Fields:</h3>\n<ul>\n<li><p>title: The title to be displayed on the payment page.</p>\n</li>\n<li><p>description: The description of the payment for the customer.</p>\n</li>\n<li><p>redirect: Where the customer should be redirected to after payment.</p>\n</li>\n<li><p>message: The message that should be displayed to the customer after payment.</p>\n</li>\n</ul>\n<h3 id=\"response-fields\">Response Fields:</h3>\n<p>It is the same as the <a href=\"https://go.postman.co/workspace/Cryptogram~bb52492c-a318-414a-ab82-2041e5a5a476/documentation/42478447-c938c6c4-df62-44a5-94b9-b7ae680e8326?entity=request-e4c12f20-2cf3-4f06-8014-8e69d8832450\">Get Payment</a> request.</p>\n","urlObject":{"path":["api","v1","commerce-payments","{payment_id}"],"host":["https://cryptogram.vip"],"query":[],"variable":[]}},"response":[],"_postman_id":"f40afab5-d63c-4a6d-802a-2eb8bff9cab1"}],"event":[{"listen":"prerequest","script":{"id":"1a97e4de-31b4-430a-9480-f5bda71f0210","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"fec3015e-e511-4663-9c94-2818fe4f49b0","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"app_url","value":"https://cryptogram.vip","type":"string"},{"key":"token","value":"{your_access_token}","type":"string"},{"key":"payment_id","value":"{payment_id}"}]}