### Get Pending Balance using .NET Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This .NET code example shows how to fetch the pending balance using HttpClient. It configures the request with the necessary headers for authorization and content type. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class PendingBalanceRetriever { public static async Task GetPendingBalanceAsync() { using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Add("Authorization", "Bearer TOKEN"); client.DefaultRequestHeaders.Add("Accept", "application/json"); client.DefaultRequestHeaders.Add("Content-Type", "application/json"); HttpResponseMessage response = await client.GetAsync("https://api.pushinpay.com.br/api/transactions/credit/pending-balance"); if (response.IsSuccessStatusCode) { string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } else { Console.WriteLine($"Error: {response.StatusCode}"); } } } public static void Main(string[] args) { GetPendingBalanceAsync().Wait(); } } ``` -------------------------------- ### Get Pending Balance using Node.js Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This Node.js example shows how to make an API call to get the pending balance using the built-in 'https' module. It constructs the request with the necessary headers for authorization and content type. ```javascript const https = require('https'); const options = { hostname: 'api.pushinpay.com.br', port: 443, path: '/api/transactions/credit/pending-balance', method: 'GET', headers: { 'Authorization': 'Bearer TOKEN', 'Accept': 'application/json', 'Content-Type': 'application/json' } }; const req = https.request(options, (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { console.log(data); }); }); req.on('error', (error) => { console.error(error); }); req.end(); ``` -------------------------------- ### Get Pending Balance using Java Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This Java code demonstrates how to fetch the pending balance using the Apache HttpClient library. It constructs an HTTP GET request with the required headers for authentication and content type. ```java import org.apache.http.client.methods.HttpGet; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class PendingBalance { public static void main(String[] args) throws Exception { CloseableHttpClient httpClient = HttpClients.createDefault(); HttpGet request = new HttpGet("https://api.pushinpay.com.br/api/transactions/credit/pending-balance"); request.setHeader("Authorization", "Bearer TOKEN"); request.setHeader("Accept", "application/json"); request.setHeader("Content-Type", "application/json"); try { String response = httpClient.execute(request, responseHandler -> EntityUtils.toString(response.getEntity())); System.out.println(response); } finally { httpClient.close(); } } } ``` -------------------------------- ### POST /transactions/credit/charge-setup Source: https://app.theneo.io/pushinpay/pix/cartao/configuracao-de-cobranca This endpoint creates a credit card charge setup. After the response, initiate the 3DS collection process using the provided token and collect URL. ```APIDOC ## POST /transactions/credit/charge-setup ### Description This endpoint creates a credit card charge setup. After the response, initiate the 3DS collection process using the provided token and collect URL. ### Method POST ### Endpoint /transactions/credit/charge-setup ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer TOKEN - **Accept** (string) - Required - application/json - **Content-Type** (string) - Required - application/json #### Request Body - **customerId** (number) - Optional - **customer** (object) - Required - **name** (string) - Required - **email** (string) - Required - **phoneNumber** (string) - Required - **document** (object) - Required - **type** (string) - Required - **number** (string) - Required - **address** (object) - Required - **street** (string) - Required - **streetNumber** (string) - Required - **zipCode** (string) - Required - **state** (string) - Required - **city** (string) - Required - **district** (string) - Required - **complement** (string) - Optional - **card** (object) - Required - **cardNumber** (string) - Required - **cardCvv** (string) - Required - **cardExpirationDate** (string) - Required - **cardHolderName** (string) - Required ### Request Example ```json { "customerId": 123, "customer": { "name": "João da Silva", "email": "joao@example.com", "phoneNumber": "+5511999999999", "document": { "type": "CPF", "number": "12345678909" }, "address": { "street": "Av. Paulista", "streetNumber": "1000", "zipCode": "01310-100", "state": "SP", "city": "São Paulo", "district": "Bela Vista", "complement": "Apto 101" } }, "card": { "cardNumber": "4111111111111111", "cardCvv": "123", "cardExpirationDate": "12/2030", "cardHolderName": "João da Silva" } } ``` ### Response #### Success Response (200) - **3ds** (object) - Information about 3D Secure authentication. - **id** (string) - The ID of the 3DS session. - **token** (string) - The token required for 3DS collection. - **collectUrl** (string) - The URL to collect 3DS data. - **providerType** (string) - The provider type for 3DS (e.g., CYBERSOURCE). - **error** (object | null) - Any error that occurred during 3DS setup. - **card** (object) - Information about the card. - **cardId** (string) - The ID of the card. - **cvv** (string) - The CVV of the card. - **customerId** (number) - The ID of the customer associated with the card. #### Response Example ```json { "3ds": { "id": "b3144...", "token": "eyJhb...", "collectUrl": "https://centinelapi.cardinalcommerce.com/V1/Cruise/Collect", "providerType": "CYBERSOURCE", "error": null }, "card": { "cardId": "56953...", "cvv": "123", "customerId": 123 } } ``` #### Error Responses - **400** (Object) - Bad Request -- Composição do request inválido - **401** (Object) - Unauthorized -- Chave TOKEN inválida - **403** (Object) - Forbidden -- Apenas administradores - **404** (Object) - Not Found -- Pedido não existe - **405** (Object) - Method Not Allowed -- Método não permitido - **406** (Object) - Not Acceptable -- Formato JSON inválido - **410** (Object) - Gone -- Essa requisição não existe mais - **418** (Object) - I'm a teapot. - **429** (Object) - Too Many Requests -- Muitas requisições em um curto espaço de tempo - **500** (Object) - Internal Server Error -- Favor tente mais tarde - **503** (Object) - Service Unavailable -- Estamos temporariamente inativos, favor aguardar. ``` -------------------------------- ### Get Pending Balance using Go Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This Go code snippet demonstrates how to retrieve the pending balance from the Pushinpay API. It uses the standard 'net/http' package to create and send an HTTP GET request with the required headers. ```go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "https://api.pushinpay.com.br/api/transactions/credit/pending-balance", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Authorization", "Bearer TOKEN") req.Header.Add("Accept", "application/json") req.Header.Add("Content-Type", "application/json") resp, err := client.Do(req) if err != nil { fmt.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Get Pending Balance using PHP Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This PHP code example illustrates how to retrieve the pending balance from the Pushinpay API. It uses cURL to send the GET request with the necessary authorization and content type headers. ```php ``` -------------------------------- ### Get Pending Balance using Python Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This Python code snippet demonstrates how to make a request to the Pushinpay API to get the pending balance. It uses the 'requests' library and sets the appropriate headers for the API call. ```python import requests url = "https://api.pushinpay.com.br/api/transactions/credit/pending-balance" headers = { "Authorization": "Bearer TOKEN", "Accept": "application/json", "Content-Type": "application/json" } response = requests.get(url, headers=headers) print(response.text) ``` -------------------------------- ### Consult Boleto Data - API Request Example Source: https://app.theneo.io/pushinpay/pix/boleto/dados-boleto This example demonstrates how to make an API request to retrieve all data associated with a specific boleto. It includes required header parameters such as Authorization and Accept, and a path parameter for the boleto's ID. The response structure is detailed, showing all fields related to the boleto, transaction, and account information. ```cURL curl -X GET \ 'https://api.theneo.io/v1/bankslips/{id}' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Accept: application/json' ``` -------------------------------- ### cURL Request for Charge Setup Source: https://app.theneo.io/pushinpay/pix/cartao/configuracao-de-cobranca This cURL command demonstrates how to set up a credit card charge using the PushInPay API. It includes necessary headers such as Authorization, Accept, and Content-Type, along with a JSON payload containing customer and card details. ```curl 1curl --location 'https://api.pushinpay.com.br/api/transactions/credit/charge-setup' \ 2--header 'Authorization: Bearer' \ 3--header 'Accept: application/json' \ 4--header 'Content-Type: application/json' \ 5--data-raw '{ 6 "customerId": 123, 7 "customer": { 8 "name": "João da Silva", 9 "email": "joao@example.com", 10 "phoneNumber": "+5511999999999", 11 "document": { 12 "type": "CPF", 13 "number": "12345678909" 14 }, 15 "address": { 16 "street": "Av. Paulista", 17 "streetNumber": "1000", 18 "zipCode": "01310-100", 19 "state": "SP", 20 "city": "São Paulo", 21 "district": "Bela Vista", 22 "complement": "Apto 101" 23 } 24 }, 25 "card": { 26 "cardNumber": "4111111111111111", 27 "cardCvv": "123", 28 "cardExpirationDate": "12/2030", 29 "cardHolderName": "João da Silva" 30 } 31}' ``` -------------------------------- ### Consultar Boleto por Período - cURL Example Source: https://app.theneo.io/pushinpay/pix/boleto/consultar-boleto-por-periodo This cURL command demonstrates how to consult bank slips within a specific period. It requires an Authorization token and specifies the desired content type and accept headers. The query parameters include the start and end dates for the period. ```cURL curl --location 'https://api.pushinpay.com.br/api/transactions/bankslip/period?start_date=2025-06-20&end_date=2025-07-20' \ --header 'Authorization: Bearer' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Get Pending Balance using Ruby Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This snippet shows how to fetch the pending balance from the Pushinpay API using Ruby. It utilizes the 'httparty' gem for making HTTP requests and includes the required headers for authentication and content negotiation. ```ruby require 'httparty' response = HTTParty.get('https://api.pushinpay.com.br/api/transactions/credit/pending-balance', headers: { 'Authorization' => 'Bearer TOKEN', 'Accept' => 'application/json', 'Content-Type' => 'application/json' } ) puts response.body ``` -------------------------------- ### Pushinpay API Response Example (JSON) Source: https://app.theneo.io/pushinpay/pix/boleto/dados-boleto This JSON object represents a successful response from the Pushinpay API, typically for a transaction-related query. It includes detailed information about the transaction, payer, and associated account. The nested 'transaction' and 'account' objects provide further context on payment status and account details. ```json { "id": "A0233...", "transaction_id": "A0233...", "account_id": "9F83...", "your_number": "123", "our_number": "0000056...", "type": "BANKSLIP_PIX", "due_date": "2025-10-22T00:00:00.000000Z", "amount": "1000", "payer_name": "teste", "payer_document": "00000000000", "payer_email": "teste@teste.com", "payer_phone_prefix": "11", "payer_phone_number": "111111111", "payer_address_zipcode": "13482300", "payer_address_public_place": "Rua Antonio Palermo", "payer_address_neighborhood": "Parque Residencial Stahlberg", "payer_address_number": "123", "payer_address_complement": null, "payer_address_city": "Limeira", "payer_address_state": "SP", "discount_type": "fixed", "discount_date": null, "discount_amount": null, "late_fine_type": "fixed", "late_fine_date": null, "late_fine_amount": null, "late_payment_type": "fixed", "late_payment_date": null, "late_payment_amount": null, "webhook_url": null, "qr_code": "0002010...", "bar_code": "43599...", "digitable_line": "435900...", "created_at": "2025-10-17T19:57:39.493000Z", "updated_at": "2025-10-17T19:57:41.863000Z", "transaction": { "id": "A02336...", "status": "created" | "paid" | "canceled", "amount": "1000", "original_amount": "1000", "description": null, "external_id": "a023...", "payment_type": "bolepix", "refunded": "0", "voided": "0", "captured": "0", "account_id": "9F83...", "deleted_at": null, "created_at": "2025-10-17T19:57:39.463000Z", "updated_at": "2025-10-17T19:57:41.843000Z", "webhook_url": null, "transactions_pix_cash_in_id": "A0233...", "end_to_end_id": null, "payer_name": null, "payer_national_registration": null, "payer_type": null, "gateway": "9", "transactions_bank_slip_id": null, "transaction_type": "4", "payment_link_id": null, "payer_email": null, "in_infraction": false, "token_used": null, "refund_id": null, "bank_ispb": null, "end_to_end_refund_id": null, "is_threeds": false, "iid": "80..." }, "account": { "id": "9F83E...", "documentNumber": "00000000000000", "businessName": "Desenvolvimentos Porto", "contactNumber": "+5511777777777", "businessEmail": "teste@teste.com", "address": { "id": 222, "postalCode": "580...", "street": "Rua Praia Formosa", "number": "5", "addressComplement": null, "neighborhood": "Mangabeira", "account_id": "9F83EC...", "city": "João Pessoa", "state": "PB", "approved": true, "deleted_at": null, "created_at": "2025-07-30T15:32:31.863000Z", "updated_at": "2025-07-30T15:34:09.827000Z", "state_id": 15, "city_id": 2652 } } } ``` -------------------------------- ### Get Pending Balance using cURL Source: https://app.theneo.io/pushinpay/pix/cartao/saldo-pendente This snippet demonstrates how to retrieve the pending balance using a cURL request. It includes the necessary URL, authorization, accept, and content type headers. The response is the pending balance in cents. ```bash curl --location 'https://api.pushinpay.com.br/api/transactions/credit/pending-balance' \ --header 'Authorization: Bearer' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Define Transaction Response Example Source: https://app.theneo.io/pushinpay/pix/cartao/definir-transacao This JSON object represents a successful response (200 OK) from the Pushinpay API after defining a transaction. It includes the transaction ID, status, value, description, payment type, and timestamps. ```json { "id": "a028c4...", "status": "created" | "paid" | "canceled", "value": 1500, "description": "Pagamento CARD", "payment_type": "credit_card", "created_at": "2025-10-20T14:11:28.713000Z", "updated_at": "2025-10-20T14:11:28.713000Z", "webhook_url": "https://example.com/webhook", "payer_name": null, "payer_national_registration": null } ``` -------------------------------- ### Retrieve Boleto using cURL Source: https://app.theneo.io/pushinpay/pix/boleto/dados-boleto This cURL command demonstrates how to retrieve a Boleto from the Pushinpay API. It specifies the GET request method, the endpoint URL with a transaction ID placeholder, and includes necessary authorization and content type headers. This is a foundational example for interacting with the API. ```curl curl --location --globoff 'https://api.pushinpay.com.br/api/transactions/{id}/boleto' \ --header 'Authorization: Bearer' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' ``` -------------------------------- ### POST /pix/cashIn - Create Pix Payment Source: https://app.theneo.io/pushinpay/pix/pix Generates a Pix payment charge, returning a payment code and a QR Code for the customer to complete the payment. ```APIDOC ## POST /pix/cashIn ### Description Gera uma cobrança PIX, retornando um código de pagamento e um QR Code para que o cliente possa efetuar o pagamento. ### Method POST ### Endpoint /pix/cashIn ### Parameters #### Request Body - **webhook_url** (string) - Optional - URL to receive payment status updates. ### Request Example ```json { "amount": 100.00, "description": "Payment for services", "webhook_url": "https://example.com/webhook" } ``` ### Response #### Success Response (200) - **payment_code** (string) - The Pix payment code. - **qr_code** (string) - The QR Code for payment. #### Response Example ```json { "payment_code": "EFT1234567890ABCDEF", "qr_code": "https://pix.bcb.gov.br/pix/qrcode/...?payload=..." } ``` ``` -------------------------------- ### POST /websites/app_theneo_io_pushinpay/create-charge Source: https://app.theneo.io/pushinpay/pix/cartao/criar-cobraca This endpoint creates a credit card charge. It requires response data from the 3DS iframe configuration. If the response includes `authData.response`, a 3D Secure challenge will be initiated. ```APIDOC ## POST /websites/app_theneo_io_pushinpay/create-charge ### Description Creates a credit card charge. Requires 3DS iframe response data. Initiates 3D Secure challenge if `authData.response` is present in the API response. ### Method POST ### Endpoint `/websites/app_theneo_io_pushinpay/create-charge` ### Parameters #### Request Body - **cardData** (object) - Required - Contains the card details for the charge. - **number** (string) - Required - The credit card number. - **expiryMonth** (string) - Required - The card's expiration month. - **expiryYear** (string) - Required - The card's expiration year. - **cvv** (string) - Required - The card's CVV. - **holderName** (string) - Required - The name of the cardholder. - **amount** (number) - Required - The amount to charge. - **currency** (string) - Required - The currency of the charge (e.g., 'BRL'). - **captureMethod** (string) - Required - The capture method ('sync' or 'async'). - **redirectURL** (string) - Required - The URL to redirect to after transaction completion. - **callbackURL** (string) - Required - The URL for transaction status callbacks. - **metadata** (object) - Optional - Additional data to be associated with the transaction. ### Request Example ```json { "cardData": { "number": "1111111111111111", "expiryMonth": "12", "expiryYear": "2025", "cvv": "123" }, "holderName": "John Doe", "amount": 1000, "currency": "BRL", "captureMethod": "sync", "redirectURL": "https://yourdomain.com/redirect", "callbackURL": "https://yourdomain.com/callback", "metadata": { "orderId": "12345" } } ``` ### Response #### Success Response (200) - **transactionId** (string) - The ID of the created transaction. - **status** (string) - The initial status of the transaction. - **authData** (object) - Contains data for 3D Secure authentication if required. - **response** (object) - Contains `stepUrl` and `token` for initiating the 3D Secure challenge. - **stepUrl** (string) - The URL for the 3D Secure step-up authentication. - **token** (string) - The token required for the 3D Secure challenge. #### Response Example ```json { "transactionId": "txn_abc123", "status": "pending_authentication", "authData": { "response": { "stepUrl": "https://3ds.example.com/challenge", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } } ``` ### Handling 3D Secure If `authData.response` is present in the response, use the provided `stepUrl` and `token` to initiate the 3D Secure challenge using the following JavaScript: ```javascript
function startChallenge3DS(stepUrl, stepToken) { const formStep = document.getElementById("stepForm"); const inputJwt = document.getElementById("stepInputJwt"); formStep.action = stepUrl; inputJwt.value = stepToken; formStep.submit(); } // Example usage: // startChallenge3DS(response.authData.response.stepUrl, response.authData.response.token); ``` The user will enter the code sent by their bank within the iframe to confirm the transaction. ``` -------------------------------- ### Initiate 3DS Challenge with JavaScript Source: https://app.theneo.io/pushinpay/pix/cartao/criar-cobraca This snippet demonstrates how to initiate the 3D Secure (3DS) challenge by submitting a form to a specified URL with a JWT. It requires a form element with id 'stepForm' and an input with id 'stepInputJwt', along with an iframe with name 'stepUpIframe'. The function `startChallenge3DS` takes the step URL and token as input. ```html ``` ```javascript function startChallenge3DS(stepUrl, stepToken) { const formStep = document.getElementById("stepForm"); const inputJwt = document.getElementById("stepInputJwt"); // Define o endpoint e o token JWT formStep.action = stepUrl; inputJwt.value = stepToken; // Envia o formulário para o iframe formStep.submit(); } ``` -------------------------------- ### GET /cashOut - Pix Cash Out Source: https://app.theneo.io/pushinpay/pix/pix Performs a cash withdrawal via API. ```APIDOC ## GET /cashOut ### Description Realiza saque via API. ### Method GET ### Endpoint /cashOut ### Parameters #### Query Parameters - **amount** (number) - Required - The amount to withdraw. - **destination_account** (string) - Required - The account details for the withdrawal. ### Response #### Success Response (200) - **message** (string) - Confirmation message of the withdrawal. #### Response Example ```json { "message": "Withdrawal successful" } ``` ``` -------------------------------- ### GET /transaction/{id} - Consult Pix Transaction Source: https://app.theneo.io/pushinpay/pix/pix Used to query the STATUS of a Pix transaction. ```APIDOC ## GET /transaction/{id} ### Description Utilizado para consultar o STATUS de uma transação PIX. ### Method GET ### Endpoint /transaction/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the transaction. ### Response #### Success Response (200) - **status** (string) - The current status of the transaction (e.g., "created", "paid", "canceled"). #### Response Example ```json { "status": "paid" } ``` ``` -------------------------------- ### GET /transactions/credit/get-transaction Source: https://app.theneo.io/pushinpay/pix/cartao/criar-cobraca This endpoint retrieves the status of a transaction. It is used to poll for transaction completion after a 3D Secure challenge. ```APIDOC ## GET /transactions/credit/get-transaction ### Description Retrieves the status of a specific transaction. This endpoint is intended to be polled periodically (e.g., every 5 seconds) to monitor transaction progress. ### Method GET ### Endpoint `/transactions/credit/get-transaction` ### Parameters #### Query Parameters - **transactionId** (string) - Required - The unique identifier of the transaction to retrieve. ### Request Example ``` GET /transactions/credit/get-transaction?transactionId=txn_abc123 ``` ### Response #### Success Response (200) - **transaction** (object) - Contains details about the transaction. - **status** (string) - The current status of the transaction (e.g., 'succeeded', 'failed', 'processing'). #### Response Example ```json { "transaction": { "id": "txn_abc123", "status": "succeeded" } } ``` ### Verifying Transaction Status Create a dedicated page to verify the transaction result. This page should poll the `Obter Transação` endpoint every 5 seconds, checking if the status is 'succeeded' or 'failed'. Once the user submits the bank code from the 3DS challenge, the system will automatically call the `redirectURL`. Your verification page should listen for messages from the iframe. When the message `event.data?.status === "succeeded"` is received, the transaction is considered complete. ```javascript async function verifyTransaction(id) { const loadingElement = document.getElementById("loading"); const messageElement = document.getElementById("message"); loadingElement.style.display = "block"; messageElement.style.display = "none"; let interval = null; try { interval = setInterval(async () => { try { const response = await fetch( `/transactions/credit/get-transaction?transactionId=${id}` ); const res = await response.json(); const status = res.transaction?.status; if (status === "succeeded") { clearInterval(interval); loadingElement.style.display = "none"; messageElement.textContent = "✅ Pagamento concluído com sucesso!"; messageElement.style.color = "green"; messageElement.style.display = "block"; window.parent.postMessage({ status: "succeeded" }, window.location.origin); } if (status === "failed") { clearInterval(interval); loadingElement.style.display = "none"; messageElement.textContent = "❌ Falha ao realizar pagamento."; messageElement.style.color = "red"; messageElement.style.display = "block"; window.parent.postMessage({ status: "failed" }, window.location.origin); } } catch (err) { clearInterval(interval); loadingElement.style.display = "none"; messageElement.textContent = "Erro ao verificar a transação."; messageElement.style.color = "red"; messageElement.style.display = "block"; window.parent.postMessage({ status: "error" }, window.location.origin); } }, 5000); } catch (e) { loadingElement.style.display = "none"; messageElement.textContent = "Erro inesperado."; messageElement.style.color = "red"; messageElement.style.display = "block"; window.parent.postMessage({ status: "error" }, "*"); } } // Example usage: // verifyTransaction("txn_abc123"); ``` ``` -------------------------------- ### POST /api/websites/app_theneo_io_pushinpay Source: https://app.theneo.io/pushinpay/pix/cartao/criar-cobraca Creates a new transaction for a given payment link. This endpoint handles payment processing, including 3D Secure authentication if required. ```APIDOC ## POST /api/websites/app_theneo_io_pushinpay ### Description Creates a new transaction for a given payment link. This endpoint handles payment processing, including 3D Secure authentication if required. ### Method POST ### Endpoint `/api/websites/app_theneo_io_pushinpay` ### Parameters #### Header Parameters - **Authorization** (string) - Required - Colocar no formato Bearer TOKEN - **Accept** (string) - Required - application/json - **Content-Type** (string) - Required - application/json #### Request Body - **paymentLinkId** (string) - Required - ID da transação - **amount** (number) - Required - Valor em centavos de reais - **paymentMethod** (object) - Required - Show child attributes - **paymentSource** (object) - Required - Show child attributes - **threeDSecure2** (object) - Required - Show child attributes - **webhook_url** (string) - Optional - Webhook caso houver ### Request Example ```json { "paymentLinkId": "string", "amount": 0, "paymentMethod": {}, "paymentSource": {}, "threeDSecure2": {}, "webhook_url": "string" } ``` ### Response #### Success Response (200) - **transaction** (object) - Details of the created transaction. - **authData** (object) - Authentication data, including 3D Secure response. #### Response Example ```json { "transaction": { "id": "A0292...", "status": "pending" | "created" | "paid" | "canceled", "amount": "500", "original_amount": "500", "description": "Pagamento CARD", "external_id": "0b2...", "payment_type": "credit_card", "refunded": "0", "voided": "0", "captured": "0", "account_id": "9F41...", "deleted_at": null, "created_at": "2025-10-20T19:10:58.920000Z", "updated_at": "2025-10-20T20:01:10.812000Z", "webhook_url": "https://example.com/webhook", "transactions_pix_cash_in_id": null, "end_to_end_id": null, "payer_name": null, "payer_national_registration": null, "payer_type": null, "gateway": "5", "transactions_bank_slip_id": null, "transaction_type": "5", "payment_link_id": null, "payer_email": null, "in_infraction": false, "token_used": null, "refund_id": null, "bank_ispb": null, "end_to_end_refund_id": null, "is_threeds": true, "iid": "80..." }, "authData": { "action": "REDIRECT", "providerType": "CYBERSOURCE", "responseType": "AUTHENTICATION", "response": { "pareq": "eyJtZ...", "token": "eyJhb..." }, "networkTransactionId": "7609..." } } ``` #### Error Responses - **400** Bad Request: Composição do request inválido - **401** Unauthorized: Chave TOKEN inválida - **403** Forbidden: Apenas administradores - **404** Not Found: Pedido não existe - **405** Method Not Allowed: Método não permitido - **406** Not Acceptable: Formato JSON inválido - **410** Gone: Essa requisição não existe mais - **418** I'm a teapot. - **429** Too Many Requests: Muitas requisições em um curto espaço de tempo - **500** Internal Server Error: Favor tente mais tarde - **503** Service Unavailable: Estamos temporariamente inativos, favor aguardar. ``` -------------------------------- ### GET /accounts/find Source: https://app.theneo.io/pushinpay/pix/conta/obter-dados Retrieves account data based on the provided ID. This endpoint is used to fetch details of a specific account. ```APIDOC ## GET /accounts/find ### Description Retrieves account data based on the provided ID. This endpoint is used to fetch details of a specific account. ### Method GET ### Endpoint /accounts/find ### Parameters #### Header Parameters - **Authorization** (string) - Required - Use 'Bearer TOKEN' - **Accept** (string) - Required - application/json - **Content-Type** (string) - Required - application/json #### Request Body - **id** (string) - Required - ID da cobrança ### Request Example ```json { "id": "123..." } ``` ### Response #### Success Response (200) - **name** (string) - The name associated with the account. - **documento** (string) - The document number (e.g., CPF or CNPJ). - **email** (string) - The email address of the account holder. - **telefone** (string) - The phone number of the account holder. - **id** (string) - The unique identifier for the account. #### Response Example ```json { "name": "Icaro", "documento": "305******06", "email": "y******************o@pushinpay.com.br", "telefone": "(**) *****-8888", "id": "9F83E..." } ``` #### Error Responses - **400** - Bad Request -- Composição do request inválido - **401** - Unauthorized -- Chave TOKEN inválida - **403** - Forbidden -- Apenas administradores - **404** - Not Found -- Pedido não existe - **405** - Method Not Allowed -- Método não permitido - **406** - Not Acceptable -- Formato JSON inválido - **410** - Gone -- Essa requisição não existe mais - **418** - I'm a teapot. - **429** - Too Many Requests -- Muitas requisições em um curto espaço de tempo - **500** - Internal Server Error -- Favor tente mais tarde - **503** - Service Unavailable -- Estamos temporariamente inativos, favor aguardar. ``` -------------------------------- ### POST /pix Source: https://app.theneo.io/pushinpay/pix/criar-pix This endpoint creates a Pix payment code. Ensure your account is created and approved, and be mindful of value requirements and split rules. ```APIDOC ## POST /pix ### Description This endpoint creates a Pix payment code. Ensure your account is created and approved, and be mindful of value requirements and split rules. ### Method POST ### Endpoint /pix ### Parameters #### Request Body - **value** (integer) - Required - The value of the charge in cents. - **webhook_url** (string) - Optional - The URL to receive payment notifications. - **split_rules** (array) - Optional - A list of rules for splitting values. ### Request Example ```json { "value": 3500, "webhook_url": "http://teste.com", "split_rules": [] } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier of the generated transaction. - **qr_code** (string) - Complete Pix code in EMV format for manual payment. - **status** (string) - Current status of the transaction (`created | paid | expired`). - **value** (integer) - The value of the charge in cents. - **webhook_url** (string) - URL provided to receive payment notifications. - **qr_code_base64** (string) - QR Code image in base64 format. - **webhook** (string/null) - Internal return of the processing of the sent notification, if any. - **split_rules** (array) - List with value splitting rules (if any splits are configured). - **end_to_end_id** (string/null) - Pix identifier generated by the Central Bank (appears after payment). - **payer_name** (string/null) - Payer's name, returned after payment. - **payer_national_registration** (string/null) - Payer's CPF or CNPJ, returned after payment. #### Response Example ```json { "id": "9c29870c-9f69-4bb6-90d3-2dce9453bb45", "qr_code": "00020101021226770014BR.GOV.BCB.PIX2555api...", "status": "created", "value": 35, "webhook_url": "http://teste.com", "qr_code_base64": "data:image/png;base64,iVBORw0KGgoAA.....", "webhook": null, "split_rules": [], "end_to_end_id": null, "payer_name": null, "payer_national_registration": null } ``` ``` -------------------------------- ### Get Account Data - cURL Source: https://app.theneo.io/pushinpay/pix/conta/obter-dados Retrieves data for a specific account using its ID. Requires Authorization, Accept, and Content-Type headers. The request body includes the account ID. ```curl curl --location --request GET 'https://api.pushinpay.com.br/api/accounts/find' \ --header 'Authorization: Bearer' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "id": "123..." }' ``` -------------------------------- ### Resposta de Criação de QR Code PIX (JSON) Source: https://app.theneo.io/pushinpay/pix/criar-pix Estrutura da resposta bem-sucedida (código 200) ao criar um QR Code PIX. Inclui o ID da transação, o código QR, status, valor, URL do webhook e outras informações relevantes. Útil para integrar com sistemas que consomem a API. ```json { "id": "9e6e0...", "qr_code": "000201...", "status": "created" | "paid" | "canceled", "value": 50, "webhook_url": "https://seu-site.com", "qr_code_base64": "data:image/png;base64,iVBOR...", "webhook": {}, "split_rules": [], "end_to_end_id": {}, "payer_name": {}, "payer_national_registration": {} } ``` -------------------------------- ### POST /pix/cashIn - Create Pix CashIn Source: https://app.theneo.io/pushinpay/pix/criar-pix This endpoint allows for the creation of a Pix QR code for cash-in transactions. It supports custom webhook URLs for status updates and can include split rules for distributing funds to multiple accounts. The API attempts to resend webhooks up to three times if they fail. ```APIDOC ## POST /pix/cashIn ### Description Creates a Pix QR code for cash-in transactions. Supports custom webhook URLs and split rules. Failed webhook attempts are retried up to three times. ### Method POST ### Endpoint /pix/cashIn ### Parameters #### Header Parameters - **Authorization** (string) - Required - Format: Bearer TOKEN - **Accept** (string) - Required - application/json - **Content-Type** (string) - Required - application/json #### Request Body - **value** (number) - Required - The amount in cents. Minimum 50 cents. - **webhook_url** (string) - Optional - URL to receive payment or refund status information. - **split_rules** (array) - Optional - Used to split payments to registered PUSHINPAY accounts. Example: `{ "value": 50, "account_id": "9C3XXXXX3A043" }` ### Request Example ```json { "value": 51, "webhook_url": "https://seu-site.com", "split_rules": [] } ``` ### Response #### Success Response (200) - **id** (string) - Transaction ID. - **qr_code** (string) - The generated Pix QR code. - **status** (string) - Transaction status: "created", "paid", or "canceled". - **value** (number) - The transaction amount. - **webhook_url** (string) - The configured webhook URL. - **qr_code_base64** (string) - Base64 encoded QR code image. - **webhook** (object) - Webhook details. - **split_rules** (array) - Applied split rules. - **end_to_end_id** (object) - End-to-end ID details. - **payer_name** (object) - Payer's name. - **payer_national_registration** (object) - Payer's national registration number. #### Response Example ```json { "id": "9e6e0...", "qr_code": "000201...", "status": "created", "value": 50, "webhook_url": "https://seu-site.com", "qr_code_base64": "data:image/png;base64,iVBOR...", "webhook": {}, "split_rules": [], "end_to_end_id": {}, "payer_name": {}, "payer_national_registration": {} } ``` #### Error Responses - **400** Bad Request - Invalid request composition. - **401** Unauthorized - Invalid TOKEN key. - **403** Forbidden - Administrators only. - **404** Not Found - Request does not exist. - **405** Method Not Allowed - Method not permitted. - **406** Not Acceptable - Invalid JSON format. - **410** Gone - This request no longer exists. - **418** I'm a teapot. - **422** Unprocessable Entity - Validation errors, e.g., value below minimum. Example: `{ "message": "O campo value deve ser no mínimo 50.", "errors": { "value": [ "O campo value deve ser no mínimo 50." ] } }` - **429** Too Many Requests - Too many requests in a short period. - **500** Internal Server Error - Please try again later. - **503** Service Unavailable - Temporarily inactive, please wait. ```