{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"4467063e-d78b-4b7b-a8ac-c9aa338213c9","name":"AnSpacePay","description":"Welcome to AnSpacePay API!  \nIn this documentation, you will find all the information on integrating with our API.  \nYou can easily integrate withdrawal and deposit functions in your application, offering your customers a secure and reliable transaction experience.\n\n## Summary\n\n1. This manual aims to establish the Security Headers that must be implemented by default for WEB applications. [Complete Documentation](https://doc.anspacepay.com/#a68c9359-72ed-4345-9bf6-a4558a0e274a)\n    \n\n### Environment\n\nIn the production environment, calls must be made using the HTTPS protocol.\n\n### The methods used for depositing and withdrawing via Pix will be:\n\n[Token](https://doc.anspacepay.com/#6c896009-0de1-4c9a-aa11-74b7f3fe15e6) - responsible for generating the token used in all requests.\n\n[Deposit](https://doc.anspacepay.com/#68f9c7a9-3cef-4fa8-8eab-1c031b720085) - In case of a deposit, our customers must call the **PaymentPix API.**\n\n[Withdraw](https://doc.anspacepay.com/#cdf22b9e-a978-41a8-ab05-d7bb83a38058) - In case of withdrawal, our customers must call the **TransferPix API.**\n\n### About callback functions\n\n[Webhook](https://doc.anspacepay.com/#2e4468c1-f84f-48b4-9b30-5ad04fc70d6a) - You can check the callback process of deposit and withdrawal methods.\n\n# Download the collection\n\nYou can download our collection to your local environment by clicking on the \"Run in Postman\" button in the upper right corner of the screen.\n\n<img src=\"https://content.pstmn.io/c1032d83-7e45-4665-9c17-8889ec2c637d/cG9zdG1hbi5wbmc=\" width=\"331\" height=\"127\">\n\nYou can use both Postman Web and Postman Desktop.\n\n# About Authorization\n\nBefore making any request, it is necessary to authenticate through the Token endpoint. [Token[POST -&gt; Token]](https://documenter.getpostman.com/view/26213144/2s93JoxRUa#52f82973-3e52-4871-8660-084754b11485)\n\n# About IP Authorization\n\nTo connect with our API in the production environment, it is necessary to inform your IP so that it is released by our firewall. In a SANDBOX environment, it is not necessary.\n\n# IPs from AnSpace\n\nOutgoing IPs from which AnSpace can make calls to the partners' API.\n\n**Production**\n\n3.217.158.141  \n100.24.146.217  \n54.235.243.113  \n35.174.203.128  \n44.206.203.196  \n54.207.112.29\n\n**Homologation**  \n3.223.125.52\n\n**Sandbox**  \n44.198.72.58\n\n# About Deposit\n\n**Use of deposit methods**\n\nIn case of a deposit, our customers must call the [PaymentPix API.](https://documenter.getpostman.com/view/26213144/2s93JoxRUa#c24bf481-a191-46b9-a6e6-1206f2019dc7)\n\n**Precondition**\n\n\\- Generation of the access token through the Token folder [(Token[POST -&gt; Token])](https://documenter.getpostman.com/view/26213144/2s93JoxRUa#52f82973-3e52-4871-8660-084754b11485)\n\n**Request:**\n\n\\- After generating the token, access a mass deposit, PaymentPix endpoint:\n\n**Headers:**\n\n**ApplicationToken** – (Obtained from the Customer Panel integration registration screen.)\n\n**Authorization** - (Bearer + access_token)\n\n**X-Request-Id -**\n\nOptional parameter where the customer can enter a hash code at the time of deposit.\n\nThe value informed in the x-request-id parameter will be encrypted using the applicationtoken as key.  \nThe method used for encryption is the HMAC-SHA256 passing two parameters, the first being the value of the x-request-id, and the second the value that comes in the Applicationtoken parameter.\n\nYou can use the site [https://www.devglan.com/online-tools/hmac-sha256-online](https://www.devglan.com/online-tools/hmac-sha256-online) to encrypt your token.\n\nThis parameter will be used in callback control on successful operations.\n\nThe x-request-id parameter will be sent in the header of the callback function.\n\nThis field supports values ​​of up to 68 characters.\n\nBody:\n\n``` json\n{\n    \"CustomId\": \"\",\n    \"amount\": 100,\n    \"dueDate\": \"30/12/2023\",\n    \"customer\": {\n        \"name\": \"SANDBOX PEOPLE NAME\",\n        \"phoneNumber\": \"+12345678910121314\",\n        \"email\": \"sandbox.people@email.sandbox.com\",\n        \"cpfcnpj\": \"87397163769\",\n        \"bankispb\":\"000000\",\n        \"bankbranch\":\"00000\",\n        \"bankaccount\":\"00000\",\n        \"address\": \"STREET 01, NUMBER 02 - HOUSE 03\",\n        \"neighborhood\": \"NEIGHBORHOOD\",\n        \"city\": \"CITY\",\n        \"state\": \"UF\",\n        \"country\": \"BRAZIL\",\n        \"zipcode\": \"12345678\"\n    },\n    \"ExpirationInMinutes\": \"6\",\n    \"confirmationUrl\": \"https://webhook.site/495472fc-207d-45ae-8c5d-731ec32779d4\"\n}\n\n ```\n\n**Bank details**:\n\nAdditional information for the deposit process.\n\n**bankispb** (optional): ISPB code of the user's bank.  \n**bankbranch** (optional): User's bank branch number.  \n**bankaccount** (optional): User's bank account number, without the hyphen, but including the check digit.\n\n**In case of success, confirmation of a deposit is carried out by confirmationUrl**\n\nAfter making the request, our system will return to the Status Code 200 customer with the payment QRCode.  \nAt this time, our system will be waiting for the payment. In case of identified payment, we carry out the processing, confirm, and send Callback to the customer.\n\nAfter sending the Callback to the client, we expect the client to return with the code 200 in case of Success. Having content in the body is unnecessary, as we only validate the Status Code.\n\nIf it returns Status Code 400, our system understands that it is critical for the customer's system and in this case, our system will consider it as sent.\n\nFor any code different from 200 and 400, our system will try to send the shipment 20 times, if not successful, our system will finish the shipment. If any callback is missed by the customer our support department can be contacted to resend the webhooks.\n\nIn case of non-payment of the QRCode, we do not have Callback communication.\n\n### Deposit status:\n\n- Pending\n    \n- Canceled\n    \n- Paid\n    \n- Overdue\n    \n\n# About Withdraw\n\n**Use of the Withdrawal method**\n\nIn case of withdrawal, our customers must call the [TransferPix API.](https://documenter.getpostman.com/view/26213144/2s93JoxRUa#5480251f-82ba-4d85-8705-5311712223e0)\n\n**Precondition:**\n\n\\- Generation of the access token through the Token folder [(Token[POST -&gt; Token])](https://documenter.getpostman.com/view/26213144/2s93JoxRUa#52f82973-3e52-4871-8660-084754b11485)\n\n**Requisition:**\n\n\\- After generating the token, access the Withdraw endpoint TransferPix folder:\n\n**Headers**:\n\n**ApplicationToken** – (Obtained from the Customer Panel integration registration screen.)\n\n**Authorization** - (Bearer + access_token)\n\n**x-request-id (**\n\nOptional parameter where the customer can enter a hash code at the time of withdrawal.\n\nThe value informed in the x-request-id parameter will be encrypted using the applicationtoken as key.  \nThe method used for encryption is the  \nHMAC-SHA256 passes two parameters, the first being the value of the x-resquest-id, and the second being the value of the Applicationtoken parameter.\n\nYou can use the site [https://www.devglan.com/online-tools/hmac-sha256-online](https://www.devglan.com/online-tools/hmac-sha256-online) to encrypt your token.\n\nThis parameter will be used in callback control on successful operations.\n\nThe x-request-id parameter will be sent in the header of the callback function.\n\nThis field supports values ​​of up to 68 characters.\n\nBody:''\n\n``` json\n\"digitalSignature\": \"\",\n\"amount\": 1,\n\"favorecido\": {\n    \"nome\": \"SANDBOX PEOPLE NAME\",\n    \"cpfcnpj\": \"87397163769\",\n    \"chave\": {\n        \"idTipoChavePIX\": 1,\n        \"chavePIX\": \"87397163769\"\n    },\n    \"bankispb\":\"000000\",\n    \"bankbranch\":\"00000\",\n    \"bankaccount\":\"00000\"\n},\n\"confirmationUrl\": \"https://webhook.site/495472fc-207d-45ae-8c5d-731ec32779d4\",\n\"updateUrl\": \"https://webhook.site/bd2f10b5-daa1-4980-87c5-50d38b182a36\"\n\n ```\n\n**  \nBank details**:\n\nAdditional information for the withdrawal process.\n\n**bankispb** (optional): ISPB code of the user's bank.  \n**bankbranch** (optional): User's bank branch number.  \n**bankaccount** (optional): User's bank account number, without the hyphen, but including the check digit.\n\nOptional information:**\n\n**In case of success, confirmation of a withdraw is carried out by confirmationUrl. In the event of a reversal, it will be carried out exclusively through the updateUrl.**\n\n**Successful payment**\n\nAfter we receive the withdrawal request and process it asynchronously and wait for the bank to return, if the bank confirms it, we send a Callback confirming the withdrawal. The expected code for them is 200 can be content.\n\nIf it returns Status code 400, our system understands that it is critical to the client's system and in this case, our system considers it as sent.\n\nFor anything other than 200 and 400, our system will try to send the submission 20 times, if unsuccessful, our system will terminate the submission attempt. If any callback is missed by the customer our support department can be contacted to resend the webhooks.\n\n**Payment instability:**\n\nWe received the withdrawal request and processed it asynchronously and waited for the bank to return. If the bank returns that it was unable to pay, for example (Destination institution rejected payment, origin institution rejected payment, unstable central bank or other reasons) we return the instability codes:\n\n**  \nWithdraw:**\n\n01 - INSTABILITY\n\n02 - RETURNED TRANSACTION\n\n03 - REJECTED TRANSACTION","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"34318601","collectionId":"4467063e-d78b-4b7b-a8ac-c9aa338213c9","publishedId":"2sAY545JZ5","public":true,"publicUrl":"https://doc.anspacepay.com","privateUrl":"https://go.postman.co/documentation/34318601-4467063e-d78b-4b7b-a8ac-c9aa338213c9","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2024-11-11T20:23:59.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"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/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://anspacepay.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://doc.anspacepay.com/view/metadata/2sAY545JZ5"}