{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a16defba-0ba4-4a35-9be6-205191c70606","name":"Documentação da API Liberpay","description":"# Getting Started\n\nTo use the Liberpay API, you first need to create an account. Please visit [https://liberpay.com](https://liberpay.com) for a tutorial on creating your account.\n\n# Base URL\n\nThe base url for all api calls is `https://api.liberpay.com`\n\n# Creating an API Key\n\nVisit the \"My Profile\" page at [https://app.liberpay.com.](https://app.liberpay.com.) Then, click the button to create a new API Key. This key will only be shown once, and is valid until revoked. Copy it somewhere safe.\n\n# The Charge Lifecycle\n\nWhen accepting payment, a \"charge\" request first needs to be created by you, the seller. You can create this charge using the [create charge endpoint](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-5db6ec45-1539-4d68-9171-9c9d8eab5aaa). There are a few things to note about the lifecycle of a charge\n\nCharges have 9 possible statuses\n\n- `created` The default for all new charges\n    \n    - Details about the charge are **publicly accessible** via the charge shortcode. This is necessary to provide a payment link for the charge. Once the charge leaves `created` status, only the parties involved in the transaction can retrieve charge details.\n        \n    - Every charge has a payment link like `https://app.liberpay.com/charges/:shortcode/pay`\n        \n    - When created, updated, or payment currency set a new price quote is retrieved and the currency amount is recalculated.\n        \n    - Created cahrges have an expiration time, by default this is 5 minutes. Once expired, the [currency will need to be set](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-c7d49013-94ef-45de-a2c9-604e44f6c850) or the [charge updated](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-dfb3d51b-4a9c-4d80-a6d5-608343501219) to get a new price quote.\n        \n    - Fiat payments are handled by webhook, and charge status will update automatically. Crypto payments require the [transaction to be reported ](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-9133e38a-baa9-493b-8934-fcf3ba400038) after payment so the backend jobs can verify the validity of the transaction.\n        \n- `pending` A payment has been reported, but not confirmed.\n    \n- `confirmed` Payment has been reported and verified as valid.\n    \n- `expired` The expiration time has passed. The [currency will need to be set](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-c7d49013-94ef-45de-a2c9-604e44f6c850) or the [charge updated](https://go.postman.co/workspace/1060ba60-dcd4-4fdf-8da7-42a54ec97897/documentation/47943201-225c17b0-fdf2-4915-a660-34672bbc73f8?entity=request-dfb3d51b-4a9c-4d80-a6d5-608343501219) to get a new price quote.\n    \n- `failed` Payment was reported but failed\n    \n- `underpaid` Payment was reported, but not enough was sent.\n    \n- `refund_pending` A refund is in progress\n    \n- `refunded` Refund(s) were successfully sent, reported, and verified as valid\n    \n- `refund_failed` Refund(s) were unsuccessfully sent, or reported and found invalid\n    \n\n# Creating a Charge and Accepting Payment\n\n## Hosted Payment Page\n\nThe easiest way to create a charge and accept payment is to create the charge over the API, and then relay the payment URL to the buyer. Using this method, LiberPay handles hosting of the payment page including currency selection, charge nonce and hash management, reporting of blockchain transactions and more. This is the easiest method for integrating with LiberPay.\n\n## Self-Hosted Payment Page\n\nIf you wish to build your own payment UI and report payments manually that is possible but a more involved process. Further documentation is coming soon. At a high level you would need to:\n\n- Retrieve the gateways associated with the charge store\n    \n- Look up supported currencies across the gateways\n    \n- Set the charge currency each time a new one is selected\n    \n- Handle ERC20 token approval and retry of payment after approval\n    \n- If using Stripe for fiat, create charge `fiat_links` over the api (Documentation coming soon) and redirect the user to those links\n    \n- Manage charge nonce and hash by calling the `generateCommitment` method of the `LiberPayReceipt` contract\n    \n\nWe are more than happy to assist in integration processes. Please reach out to [support@liberpay.com](https://mailto:support@liberpay.com) for help!\n\n# Webhooks and Redirect URLs\n\nA full webhook event system and redirect URLs for the hosted payment page are being actively developed and are coming very soon. In the mean time, you will need to periodically check charge statuses for updates.\n\n# Official Smart Contracts and Blockchain Addresses\n\nNFT receipts minted by LiberPay only ever originate from these addresses:\n\n**Polygon Mainnet:** `0x714256086AC8636E95FE28D1b010a0083A684c6d`\n\nAll gateway and other fees paid over blockchain are only accepted in official USDC ERC20 tokens to the following addresses:\n\n**Main Fee Wallet:** `0xB00a8eb1e0774401208F9507d0d69360F42B9B97`","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"47943201","team":9759437,"collectionId":"a16defba-0ba4-4a35-9be6-205191c70606","publishedId":"2sB3HhshHd","public":true,"publicUrl":"https://docs.liberpay.com","privateUrl":"https://go.postman.co/documentation/47943201-a16defba-0ba4-4a35-9be6-205191c70606","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"20a5f3"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/e91f2e9b-9dfc-4024-b6bb-c2dd7cab1c36/bGliZXJwYXlfbG9nb19kYXJrbW9kZS5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"20a5f3"}},{"name":"light","logo":"https://content.pstmn.io/237f30ed-2a6a-471a-a40b-a950063cda08/bGliZXJwYXlfbG9nb19saWdodG1vZGUucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"20a5f3"}}]}},"version":"8.10.1","publishDate":"2025-08-31T22:24:33.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":"https://content.pstmn.io/237f30ed-2a6a-471a-a40b-a950063cda08/bGliZXJwYXlfbG9nb19saWdodG1vZGUucG5n","logoDark":"https://content.pstmn.io/e91f2e9b-9dfc-4024-b6bb-c2dd7cab1c36/bGliZXJwYXlfbG9nb19kYXJrbW9kZS5wbmc="}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/9acc00e63ea4d80eb3a446a0547b8fa13c680b0fc212a0289a6a475620602f41","favicon":"https://liberpay.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.liberpay.com/view/metadata/2sB3HhshHd"}