{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"4c37e47e-eac6-49f7-b7c5-41c412714564","name":"ALL4PAY DOCUMENTATION","description":"Changelog <small>v.3.0</small>\n____________________________________\n* Authentication summary for only one <code>authentication header</code>\n* Improved performance allowing for faster responses\n* Endpoint summary for easy integration\n* Inclusion of PIX withdrawal method\n* Review of response return rules\n* Inclusion of the Sandbox environment with Swagger\n* Interactive approval page for Sandbox simulation\n* Postman package availability in the integrated environment\n* New get deposit endpoint parameters\n\n<br/>\n\nOverview\n____________________________________\n1. Call Create Deposit or Create Withdraw API method to send request in the All4Pay system.\n2. All4Pay checks if the deposit or withdrawal is valid.\n3. If the request is valid, All4Pay responds with 200 HTTP status and returns the data. After receiving 200 HTTP status, you will receive the callback notification, and continue the process to update infos in your system.\n4. If the request is not valid, All4Pay returns 422 (or other) error HTTP status and an error message.\n5. Your callback_url is defined on your dashboard. All4Pay sends payment callback when order status is changed to pending, confirmed, expired or to any other status. Read more about All4Pay deposit statuses or withdraw statuses. Please note, that payment notifications are sent using POST method.\n6. In order to avoid multiple erroneous requests, we block equal deposit and withdrawal requests from the same user ID and same requested amount up to few minutes. (example: bug in the frontend when not disabling submit after clicking once).\n<br/><br/>\n\nAPI Request Limits\n____________________________________\n216,000 / hour per ip address for all API endpoints.\n\n| Environment   | Endpoint      | Request Limit  |\n| ------------- |:-------------:| :-------------:|\n| Live          | POST /deposit | 50 / seconds   |\n| Live          | GET /witddraw | 50 / seconds   |\n| Live          | POST /deposit | 50 / seconds   |\n| Live          | GET /witddraw | 50 / seconds   |\n\nAPI returns 429 HTTP error if limit is exceeded.\n\nAPI Requests\n____________________________\nAPI Request is used to query All4Pay API (examples: Create Deposit, Get Deposit).\nAPI Request attributes:\n<ul>\n<li>Action - Which API method was queried.</li>\n<li>Response - HTTP status returned by All4Pay.</li>\n<li>Parameters - Parameters used to query All4Pay API.</li>\n<li>Response - Parameters returned by All4Pay.</li>\n</ul>\n\nAPI Authentication\n_______________________________\nAll All4Pay API calls require authentication. You can authenticate your api by providing header: Token.\n\nAPI Key - You can generate your API Token key in account area. From dashboard navigation go to api page and create new API Token key.\n\nPOST {{urlProduction}}/deposit/\nAccept: */*\nUser-Agent: PHP\nToken: <token>\n\nErrors\n__________________________________________\nMost common API error responses described below. Error response must be identified by HTTP status and reason attribute in your application.\n\nPlease note, that specific API methods, for example Create Deposit has their own errors (422 Illegal Conditions - when parameters are invalid).\n\n| HTTP Status | Reason | Message |\n| ------------- |:-------------:| :-------------:|\n| 401(Unauthorized) | Bad Credentials | API Credentials is not valid |\n| 401(Unauthorized) | Illegal Conditions | We were unable to complete your transaction due to your dayli limit of R$ XX,XX . You Still have R$ XX,XX available to deposit today. |\n| 401(Unauthorized) | Illegal Conditions | user CPF blocked by All4pay. |\n| 401(Unauthorized) | Illegal Conditions | user_id blocked by All4pay. |\n| 404(Not Found) | PageNotFound | Page, action or record not found |\n| 404 (Not Found) | Results not found | Results not found |\n| 422 (Unauthorized) | Illegal Conditions | Parameters not valid |\n| 429 (Unauthorized) | Rate Limit Exception | API request limit is exceeded |\n| 500 (Internal Server Error) | Internal ServerError | Something wrong in All4Pay |\n\nIssues\nThe common issues why your app or API integration possible not working.\n_____________________________________\n\nUnable to create deposit / withdraw or unable to send a request to All4Pay API\n_____________________________________\n\nPossible reasons:\n\n<ul>\n<li>Wrong API credentials. Please check if you have entered them correctly. Make sure that there are no spaces before or after the text.</li>\n<li>Wrong API credentials HMAC. Check your account if the operation option is enabled for the key you are using.</li>\n<li>cURL or other library used to communicate with All4Pay API is outdated or is working incorrectly. Please check library version.</li>\n<li>Your server can not reach All4Pay.com. Please check if All4Pay.com is available and if your server can reach it.</li>\n</ul>\n\n_______________________________\nThe order status is not updated after payment in your system or All4Pay does not send transaction callback (Callback Notification)\n_______________________________\n\nPossible reasons:\n\n<ul>\n<li>Your server is on a private network, for example localhost. Please make sure that your application is publicly accessible.</li>\n<li>Your website is disabled (in maintenance mode).</li>\n<li>Your server firewall, third-party security service (cloudflare, incapsula, etc.) or your application is blocking All4Pay IP address.</li>\n<li>Yout return url is incorrect, make sure address entered in your account is correct.</li>\n</ul>\n\nCONDITION TO SOLICITATION WITHDRAW\nIf your balance available is not sufficient to request a withdrawal transaction, we will respond with:\n_______________________________\n\n<pre name=\"code\" class=\"js\">\n{\n\t\"message\":\"Withdrawal amount greater than your balance available\",\n\t\"reason\":\"IllegalConditions\",\n\t\"code\":\"0443\"\n}\n</pre>\n<pre name=\"code\" class=\"js\">\n{\n\t\"message\":\"Insufficient balance available due to pending withdrawals\",\n\t\"reason\":\"IllegalConditions\",\n\t\"code\":\"0442\"\n}\n</pre>\n<pre name=\"code\" class=\"js\">\n{\n\t\"message\":\"Withdrawal not allowed due to insufficient balance available\",\n\t\"reason\":\"IllegalConditions\",\n\t\"code\":\"0441\"\n}\n</pre>\n<br/><br/>\n\nAPI Request Control(amount limits)\n_____________________________________\nAs a way of avoiding possible fraud, All4pay has a user rating that imposes a daily deposit limit per method. Daily limits for default or VIP users are configured according to your needs. We carry out the control based on the volume, amount of deposits and user activity time, based on your user_id and CPF.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"17337981","team":2440019,"collectionId":"4c37e47e-eac6-49f7-b7c5-41c412714564","publishedId":"U16dSoz7","public":true,"publicUrl":"https://apidoc.all4pay.com","privateUrl":"https://go.postman.co/documentation/17337981-4c37e47e-eac6-49f7-b7c5-41c412714564","customColor":{"top-bar":"012b44","right-sidebar":"424244","highlight":"80b141"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-09-01T20:05:48.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"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/f01fb0fe828abe32c83a3aca486ccd419c22eab4671a8b2f985df5f55385fa50","favicon":"https://res.cloudinary.com/postman/image/upload/v1630526027/team/p8t0qbrcvwkd3ehwf3vl.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://apidoc.all4pay.com/view/metadata/U16dSoz7"}