### Node.js RSA Signature Authentication Example Source: https://dom-pagamentos.readme.io/reference/autentica%C3%A7%C3%A3o-com-assinatura-rsa This example shows how to sign a payload using a private key, set up authentication headers with a token and signature, and send a POST request to the API for signature verification. Ensure you have the 'axios' library installed and replace placeholders with your actual token and key path. ```javascript const url = 'https://apiv3.dompagamentos.com.br/checkout/production/verify-signature-rsa'; // Token de autenticação const token = '{{seu_token}}'; (async () => { try { // Assina o payload com a chave privada const signature = signPayload(payload, privateKeyPath); // Configuração do cabeçalho const headers = { 'Content-Type': 'application/json', 'Signature': signature, 'Authorization': `Bearer ${token}` }; // Envia a requisição POST usando axios const response = await axios.post(url, payload, { headers }); // Exibe o status e a resposta console.log('HTTP Code:', response.status); console.log('Response:', response.data); } catch (error) { console.error('Erro:', error.message); } })(); ``` -------------------------------- ### Payment Plan Request Example Source: https://dom-pagamentos.readme.io/reference/criar-plano This example shows the structure of a request to create a payment plan. ```json { "description": "Plano Ouro", "value": 58.99, "external_reference": "OURO-001", "frequency": 1, "frequency_type": "MONTH", "repetitions": 0, "payment_methods": [ "credit_card" ], "installments": [ 1 ], "billing_type": "prepaid", "billing_day": 0, "retry_days": 3 } ``` -------------------------------- ### Activate Subscription Request Example Source: https://dom-pagamentos.readme.io/reference/clientes-copy Example of activating a subscription using its ID and providing a reason for reactivation. ```json { "reason": "Customer requested reactivation." } ``` -------------------------------- ### Create Subscription Example Source: https://dom-pagamentos.readme.io/reference/clientes Example JSON payload for creating a new subscription with auto-recurring payment details. ```json { "reason": "Solicitado pelo cliente" } ``` -------------------------------- ### Get Subscription Response Example Source: https://dom-pagamentos.readme.io/reference/clientes-copy This snippet illustrates a typical response when retrieving subscription details. It includes identifiers, customer and plan information, auto-recurring settings, payment details, status, and timestamps. ```json { "id": "389ffa5a-c95b-4258-927a-d48cc6829ca3", "customer_id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "plan_id": "", "external_reference":"Assinatura 001", "auto_recurring": { "description": "Plano Ouro", "value": 58.99, "frequency" : 1, "frequency_type": "MONTH", "repetitions": 0, "billing_type": "prepaid", "billing_day":0, "trial_period_days":0, "retry_days": 3 }, "payment_method": "credit_card", "card":{ "installments":1, "token": "2c2b1bf5085716225061bb09e1d6df1094239e64efa737b9f6b3aed00c3011fc" }, "cashback_active":false, "postbackurl": "https://seudominio.com.br/webhook", "metadata": "{'meta':'ok'}", "current_cycle": 1, "start_date_invoice": "2024-10-10", "next_date_invoice": "2024-10-10", "end_date_invoice": "", "status": "active", "created_at": "2024-10-01T16:00:00Z", "updated_at": "2019-10-01T17:00:00Z", "platform": [ ``` -------------------------------- ### Create Subaccount Example Source: https://dom-pagamentos.readme.io/reference/clientes-copy Example of a request body to create a new subaccount with detailed financial and partner information. ```json { "name": "Subconta 01", "external_reference": "1234", "address": { "street": "Rua da Subconta", "number": "100", "neighborhood": "Centro", "zip_code": "0000000", "city": "Florianópolis", "state": "SC" }, "partner_adm": { "name": "Administrador", "doc": "12345678911", "birthdate": null, "email": "subconta@subconta.com", "phone": null }, "support": { "phone": "4899999999", "email": "subconta@subconta.com", "site": null }, "financial_pixout": { "key": "11111111111111", "type": "CNPJ" }, "status": "APPROVED", "msg": "", "credentials": { "public_key": "pk_490fcabb-5101-gd45-a5ee-2659ea9d793i", "token": "f92b*******************29a523" }, "created_at": "2025-02-20T10:39:13Z", "updated_at": "2025-02-20T10:39:13Z" } ``` -------------------------------- ### Failure Response Example (Subaccount Not Found) Source: https://dom-pagamentos.readme.io/reference/alterar-modo-de-repasse This example shows the response when the specified subaccount cannot be found. ```json { "status": "FAIL", "msg": "Subconta não encontrada" } ``` -------------------------------- ### Create Plan API Request Example Source: https://dom-pagamentos.readme.io/reference/planos Example request body for creating a new payment plan with specific configurations. ```json { "description": "Plano Ouro", "value": 58.99, "external_reference": "OURO-001", "frequency" : 1, "frequency_type": "MONTH", "repetitions": 0, "payment_methods": [ "credit_card" ], "installments": [ 1 ], "billing_type": "prepaid", "billing_day":0, "ret ``` -------------------------------- ### Cashback Query No Records Found Example Source: https://dom-pagamentos.readme.io/reference/consulta-cashback Example response when no cashback records are found for the specified consumer. ```json { "status": "FAIL", "msg": "Nenhum registro localizado!" } ``` -------------------------------- ### Create Customer Payload Example Source: https://dom-pagamentos.readme.io/reference/clientes Example payload for creating a customer, including basic contact and identification details. ```json { "cod_external": "string", "customer": { "name": "string", "email": "string", "mobile_phone": "string", "document": "string", "document_type": "string", "birthdate": "2020-12-31", "gender": "string" } } ``` -------------------------------- ### Cancel Subscription Example Source: https://dom-pagamentos.readme.io/reference/cancelar-assinatura This example shows the structure of a successful response when canceling a subscription. It includes details of the subscription that was canceled. ```json { "id": "389ffa5a-c95b-4258-927a-d48cc6829ca3", "customer_id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "plan_id": "", "external_reference":"Assinatura 001", "auto_recurring": { "description": "Plano Ouro", "value": 58.99, "frequency" : 1, "frequency_type": "MONTH", "repetitions": 0, "billing_type": "prepaid", "billing_day":0, "retry_days": 3 }, "payment_method": "credit_card", "card":{ "installments":1, "token": "2c2b1bf5085716225061bb09e1d6df1094239e64efa737b9f6b3aed00c3011fc" }, "cashback_active":false, "postbackurl": "https://seudominio.com.br/webhook", "metadata": "{'meta':'ok'}", "current_cycle": 1, "start_date_invoice": "2024-10-10", "next_date_invoice": "2024-10-10", "end_date_invoice": "", "status": "canceled", "created_at": "2024-10-01T16:00:00Z", "updated_at": "2019-10-01T17:00:00Z", "platform": [ { "fee_details": { "fee_transaction": { "type": "variable", "value": 10 }, "fee_cashback": { "type": "fixed", "value": 5 } } } ] } ``` -------------------------------- ### Empty Response Example Source: https://dom-pagamentos.readme.io/reference/criar-plano This example shows an empty JSON object as a response, potentially indicating an error or no data. ```json {} ``` -------------------------------- ### Tokenization Example - HTML/JavaScript Source: https://dom-pagamentos.readme.io/reference/tokenizacao This example demonstrates how to use the `getTokenCard` function to obtain a token, brand, and BIN for a credit card transaction. It includes form fields to capture these details and submit them. Ensure the SDK is loaded before this script runs. ```html
``` -------------------------------- ### Get Customer Response Body Source: https://dom-pagamentos.readme.io/reference/clientes Example JSON response when successfully retrieving a customer's details using their ID. ```json { "id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "name": "João da Silva", "email": "joao@dopagamentos.com", "code_external": "REF_CUSTOMER_001", "document": "11111111111", "document_type": "CPF", "gender": "male", "address": { "street": "Av. General", "number": "s/n", "neighborhood":"Centro", "zip_code": "88036200", "city": "Florianópolis" }, "birthdate": "1981-06-01", "mobile_phone": "48999999999" } ``` -------------------------------- ### Get Customer Success Response Source: https://dom-pagamentos.readme.io/reference/assinaturas Example of a successful response when retrieving customer details. Includes customer information and associated card tokens. ```json { "id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "name": "João da Silva", "email": "joao@dopagamentos.com", "code_external": "REF_CUSTOMER_001", "document": "11111111111", "document_type": "CPF", "gender": "male", "address": { "street": "Av. General", "number": "s/n", "neighborhood":"Centro", "zip_code": "88036200", "city": "Florianópolis", "state": "SC" }, "cards_tokens": [ { "token": "65432f17bd804123456789abcdefghijklmno", "last_4_digits": "1234", "brand": "mastercard", "holder_name": "Joao da Silva", "expire": "12/2035", "exp_month": "12", "exp_year": "2035", "active": "Y" } ], "status": "active", "created_at": "2024-10-01T15:36:00Z", "updated_at": "2024-10-01T15:36:00Z", "birthdate": "1981-06-01", "mobile_phone": "48999999999", "status":"active" } ``` -------------------------------- ### Consultar Plano Example Source: https://dom-pagamentos.readme.io/reference/consultar-plano This example shows the expected JSON response when successfully consulting a plan. It includes details like plan ID, description, value, recurrence settings, and status. ```json { "id": "6fd5256a-8299-471b-be45-2016ff6bc548", "description": "Plano Ouro", "value": 58.99, "external_reference": "OURO-001", "frequency" : 1, "frequency_type": "MONTH", "repetitions": 0, "payment_methods": [ "credit_card" ], "installments": 3, "billing_type": "prepaid", "billing_day":0, "trial_period_days":0, "retry_days": 3, "status": "active", "created_at": "2024-10-01T16:00:00Z", "updated_at": "2019-10-01T17:00:00Z" } ``` -------------------------------- ### Customer Creation Response Example (200 OK) Source: https://dom-pagamentos.readme.io/reference/criar-cliente This example shows a successful response when a customer is created. It includes all customer details. ```json { "id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "name": "João da Silva", "email": "joao@dopagamentos.com", "code_external": "REF_CUSTOMER_001", "document": "11111111111", "document_type": "CPF", "gender": "male", "address": { "street": "Av. General", "number": "s/n", "neighborhood":"Centro", "zip_code": "88036200", "city": "Florianópolis", "state": "SC" }, "status": "active", "created_at": "2024-10-01T15:36:00Z", "updated_at": "2024-10-01T15:36:00Z", "birthdate": "1981-06-01", "mobile_phone": "48999999999", "status":"active" } ``` -------------------------------- ### Get EDI Transactions Source: https://dom-pagamentos.readme.io/reference/subcontas Retrieves EDI transaction data, allowing filtering by type, start date, and end date. Requires an Authorization header. ```APIDOC ## GET /edi/transactions ### Description Retrieves EDI transaction data, with options to filter by transaction type and date range. ### Method GET ### Endpoint /edi/transactions ### Parameters #### Query Parameters - **type** (string) - Required - Period of transactions: 'order' (purchase date) or 'settlement' (liquidation date). - **date_start** (datetime) - Required - Initial search date (Y-m-d H:m:s). - **date_end** (string) - Required - Final search date (Y-m-d H:m:s). #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "OK"). - **total** (string) - The total number of transactions found. - **data** (array) - An array of transaction objects. - **id** (string) - The unique identifier for the transaction. - **code_external** (string) - The external code for the transaction. - **status** (string) - The status of the transaction (e.g., "Pendente"). - **date** (string) - The date of the transaction. - **date_liquid** (string) - The liquidation date. - **installments** (string) - The number of installments. - **total** (string) - The total amount. - **total_liquid** (string) - The net total amount. - **cost** (string) - The cost associated with the transaction. #### Response Example (200) ```json { "status": "OK", "total": "2", "data": [ { "id": "b621bd00-dfc9-11ee-8444-cc5ef8b5abab", "code_external": "546sdf6545", "status": "Pendente", "date": "2023-07-05 15:53:33", "date_liquid": "2023-07-06", "installments": "1", "total": "117.8", "total_liquid": "108.57", "cost": "9.230000000000004" }, { "id": "b621c25f-dfc9-11ee-8444-cc5ef8b5abab", "code_external": "458479842", "status": "Pendente", "date": "2023-07-05 15:53:33", "date_liquid": "2023-07-06", "installments": "1", "total": "117.8", "total_liquid": "108.57", "cost": "9.230000000000004" } ] } ``` #### Error Response (400) ```json { "status": "FAIL", "msg": "Descrição do erro." } ``` ``` -------------------------------- ### List Subaccounts Example Source: https://dom-pagamentos.readme.io/reference/listar-subcontas This example demonstrates how to list subaccounts. It includes query parameters for pagination and an Authorization header for authentication. The response shows the structure of the returned subaccount data. ```json { "openapi": "3.1.0", "info": { "title": "Dom Pagamentos", "version": "3.0" }, "servers": [ { "url": "{apiUrl}", "variables": { "apiUrl": { "default": "apiUrl" } } } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "name": "Authorization", "in": "header", "x-bearer-format": "bearer", "x-default": "authToken" } } }, "security": [ { "sec0": [] } ], "paths": { "/subaccount": { "get": { "summary": "Listar subcontas", "description": "Retorna uma lista de subcontas", "operationId": "listar-subcontas", "parameters": [ { "name": "page", "in": "query", "description": "Página buscada", "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "Authorization", "in": "header", "description": "token da privada da plataforma", "schema": { "type": "string", "default": "Bearer" } }, { "name": "limit", "in": "query", "description": "Limite de itens retornados por página (limite máximo de 100)", "schema": { "type": "integer", "format": "int32", "default": 100 } } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"total\": 1,\n \"per_page\": 100,\n \"page\": \"1\",\n \"total_pages\": 1,\n \"data\": [\n {\n \"id\": \"26e1d2bf-26f4-4611-b6b8-0efd6563a23g\",\n \"corporate_doc\": \"11111111111111\",\n \"corporate_name\": \"Subconta 01 Ltda\",\n \"name\": \"subconta 01\",\n \"external_reference\": \"1234\",\n \"address\": {\n \"street\": \"Rua da Subconta\",\n \"number\": \"100\",\n \"neighborhood\": \"Centro\",\n \"zip_code\": \"0000000\",\n \"city\": \"Florianópolis\",\n \"state\": \"SC\"\n },\n \"partner_adm\": {\n \"name\": \"Administrador\",\n \"doc\": \"12345678911\",\n \"birthdate\": null,\n \"email\": \"subconta@subconta.com\",\n \"phone\": null\n },\n \"support\": {\n \"phone\": \"4899999999\",\n \"email\": \"subconta@subconta.com\",\n \"site\": null\n },\n \"financial_pixout\": {\n \"key\": \"11111111111111\",\n \"type\": \"CNPJ\"\n },\n \"status\": \"APPROVED\",\n \"msg\": \"\",\n \"credentials\": {\n \"public_key\": \"pk_490fcabb-5101-gd45-a5ee-2659ea9d793i\",\n \"token\": \"f92b*******************29a523\"\n },\n \"created_at\": \"2025-02-20T10:39:13Z\",\n \"updated_at\": \"2025-02-20T10:39:13Z\"\n }\n ]\n}" } }, "schema": { "type": "object", "properties": { "total": { "type": "integer", "example": 1, "default": 0 }, "per_page": { "type": "integer", "example": 100, "default": 0 }, "page": { "type": "string", "example": "1" }, "total_pages": { "type": "integer", "example": 1, "default": 0 }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "example": "26e1d2bf-26f4-4611-b6b8-0efd6563a23g" }, "corporate_doc": { "type": "string", "example": "11111111111111" }, "corporate_name": { "type": "string", "example": "Subconta 01 Ltda" }, "name": { "type": "string", "example": "subconta 01" }, "external_reference": { "type": "string", "example": "1234" }, "address": { "type": "object", "properties": { "street": { "type": "string", "example": "Rua da Subconta" }, "number": { "type": "string", "example": "100" }, "neighborhood": { "type": "string", "example": "Centro" }, "zip_code": { "type": "string", "example": "0000000" }, "city": { "type": "string", "example": "Florianópolis" }, "state": { "type": "string", "example": "SC" } } }, "partner_adm": { "type": "object", "properties": { "name": { "type": "string", "example": "Administrador" }, "doc": { "type": "string", "example": "12345678911" }, "birthdate": { "type": "string", "example": null }, "email": { "type": "string", "example": "subconta@subconta.com" }, "phone": { "type": "string", "example": null } } }, "support": { "type": "object", "properties": { "phone": { "type": "string", "example": "4899999999" }, "email": { "type": "string", "example": "subconta@subconta.com" }, "site": { "type": "string", "example": null } } }, "financial_pixout": { "type": "object", "properties": { "key": { "type": "string", "example": "11111111111111" }, "type": { "type": "string", "example": "CNPJ" } } }, "status": { "type": "string", "example": "APPROVED" }, "msg": { "type": "string", "example": "" }, "credentials": { "type": "object", "properties": { "public_key": { "type": "string", "example": "pk_490fcabb-5101-gd45-a5ee-2659ea9d793i" }, "token": { "type": "string", "example": "f92b*******************29a523" } } }, "created_at": { "type": "string", "example": "2025-02-20T10:39:13Z" }, "updated_at": { "type": "string", "example": "2025-02-20T10:39:13Z" } } } } } } } } } } } } } } ``` -------------------------------- ### Get Card Token with React + TypeScript Source: https://dom-pagamentos.readme.io/reference/three_ds Integrate card tokenization within a React component using TypeScript. This example demonstrates loading the SDK and calling `getTokenCard` to obtain payment details. ```typescript // DomPagamentoForm.tsx import React, { useState, useEffect, useRef } from 'react'; declare global { interface Window { getTokenCard: ( publicKey: string, cardData: any, installments: number, callback: (data: any) => void ) => void; module?: any; } } const DomPagamentoForm: React.FC = () => { const formRef = useRef(null); const [formData] = useState({ name: 'João da Silva', document: '11111111111', number: '5147430374257642', cvv: '652', month: '01', year: '25', customer_id: '', installments: 1, }); const [tokenData, setTokenData] = useState({ token: '', brand: '', bin: '', }); // Carrega o SDK no carregamento do componente useEffect(() => { (window as any).module = {}; const script = document.createElement('script'); script.src = 'https://apiv3.dompagamentos.com.br/js/sdk-dompagamentos.min.js'; script.async = true; script.onload = () => { delete (window as any).module; console.log('SDK da Dom Pagamentos carregado com sucesso.'); }; document.body.appendChild(script); }, []); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); const publicKey = 'pk_6d05f363eb03512dd0960af902bacba18be7329dab32322d'; if (typeof window.getTokenCard !== 'function') { alert('SDK DomPagamentos ainda não carregada.'); return; } const dataCard = { name: formData.name, document: formData.document, customer_id: formData.customer_id, number: formData.number, cvv: formData.cvv, month: formData.month, year: formData.year, }; window.getTokenCard(publicKey, dataCard, formData.installments, (data: any) => { console.log('resposta:', data); if (data.token) { setTokenData({ token: data.token, brand: data.brand, bin: data.bin, }); ``` -------------------------------- ### Consultar Subconta Source: https://dom-pagamentos.readme.io/reference/consultar-subconta This example shows how to make a GET request to the /subaccount/{id} endpoint to retrieve subaccount details. Ensure you include the Authorization header with your bearer token and the subaccount ID in the path. ```json { "openapi": "3.1.0", "info": { "title": "Dom Pagamentos", "version": "3.0" }, "servers": [ { "url": "{apiUrl}", "variables": { "apiUrl": { "default": "apiUrl" } } } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "name": "Authorization", "in": "header", "x-bearer-format": "bearer", "x-default": "authToken" } } }, "security": [ { "sec0": [] } ], "paths": { "/subaccount/{id}": { "get": { "summary": "Consultar subconta", "description": "Consulta dados da subconta", "operationId": "consultar-subconta", "parameters": [ { "name": "Authorization", "in": "header", "description": "token da privada da plataforma", "schema": { "type": "string", "default": "Bearer" } }, { "name": "id", "in": "path", "description": "Id da subconta", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"id\": \"4bfc6124-ceee-4f6f-9f29-75059b3f5d9c\",\n \"corporate_doc\": \"52711237000184\",\n \"corporate_name\": \"Dom Digital\",\n \"name\": \"Dom Pagamentos\", \n \"external_reference\": \"REF_COMPANY_001\",\n \"address\": {\n \"street\": \"Av. General\",\n \"number\": \"s/n\",\n \"neighborhood\": \"Centro\",\n \"zip_code\": \"88036200\",\n \"city\": \"Florianópolis\",\n \"state\": \"SC\"\n },\n \"partner_adm\": {\n \"name\": \"joão da Silva\",\n \"doc\": \"11111111111\", \n \"birthdate\": \"2000-01-01\",\n \"email\": \"joaodasilva@dompagamentos.com\",\n \"phone\": \"48991191311\"\n }, \n \"support\": {\n \"phone\": \"48999999999\",\n \"email\": \"suporte@dompagamentos.com\", \n \"site\": \"https://dompagamentos.com.br\"\n },\n \"financial_transfer\": \"flow\",\n \"negotiation\": {\n \"days_transfer_store\": 31,\n \"days_transfer_pix_store\": 1,\n \"days_transfer_boleto_store\": 1,\n \"retention_days_release_online\": 0,\n \"retention_daily_online\": 0,\n \"boleto\": {\n \"mdr\": 3.49,\n \"mdr_type\": \"FIXED\",\n \"fee_transaction\": 1\n },\n \"pix_online\": {\n \"mdr\": 1.99,\n \"mdr_type\": \"VARIABLE\",\n \"fee_transaction\": 1\n },\n \"credit\": {\n \"fee_transaction\": 1,\n \"installments\": [\n {\n \"installment\": 1,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 4.99,\n \"interest_rate_our\": 0\n },\n {\n \"installment\": 2,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 4.99,\n \"interest_rate_our\": 0\n },\n {\n \"installment\": 3,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 4.99,\n \"interest_rate_our\": 0\n },\n {\n \"installment\": 4,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 4.99,\n \"interest_rate_our\": 0\n },\n {\n \"installment\": 5,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 4.99,\n \"interest_rate_our\": 0\n },\n {\n \"installment\": 6,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 7,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 8,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 9,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 10,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 11,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n },\n {\n \"installment\": 12,\n \"mdr\": 4.99,\n \"fees\": 0,\n \"effective_rate\": 6,\n \"interest_rate_our\": 1.01\n }\n ]\n },\n \"mdr_signature\": "" } } ``` -------------------------------- ### Get Subaccount Response Source: https://dom-pagamentos.readme.io/reference/clientes Example JSON response when retrieving an existing subaccount. It details the subaccount's identification, corporate information, partner details, support contacts, financial transfer settings, and platform fees. ```json { "id": "4bfc6124-ceee-4f6f-9f29-75059b3f5d9c", "corporate_doc": "52711237000184", "corporate_name": "Dom Digital", "name": "Dom Pagamentos", "external_reference": "REF_COMPANY_001", "address": { "street": "Av. General", "number": "s/n", "neighborhood": "Centro", "zip_code": "88036200", "city": "Florianópolis", "state": "SC" }, "partner_adm": { "name": "joão da Silva", "doc": "11111111111", "birthdate": "2000-01-01", "email": "joaodasilva@dompagamentos.com", "phone": "48991191311" }, "support": { "phone": "48999999999", "email": "suporte@dompagamentos.com", "site": "https://dompagamentos.com.br" }, "financial_transfer": "flow", "negotiation": { "days_transfer_store": 31, "days_transfer_pix_store": 1, "days_transfer_boleto_store": 1, "retention_days_release_online": 0, "retention_daily_online": 0, "boleto": { "mdr": 3.49, "mdr_type": "FIXED", "fee_transaction": 1 }, "pix_online": { "mdr": 1.99, "mdr_type": "VARIABLE", "fee_transaction": 1 }, "credit": { "fee_transaction": 1, "installments": [ { "installment": 1, "mdr": 4.99, "fees": 0, "effective_rate": 4.99, "interest_rate_our": 0 }, { "installment": 2, "mdr": 4.99, "fees": 0, "effective_rate": 4.99, "interest_rate_our": 0 }, { "installment": 3, "mdr": 4.99, "fees": 0, "effective_rate": 4.99, "interest_rate_our": 0 }, { "installment": 4, "mdr": 4.99, "fees": 0, "effective_rate": 4.99, "interest_rate_our": 0 }, { "installment": 5, "mdr": 4.99, "fees": 0, "effective_rate": 4.99, "interest_rate_our": 0 }, { "installment": 6, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 7, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 8, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 9, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 10, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 11, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 }, { "installment": 12, "mdr": 4.99, "fees": 0, "effective_rate": 6, "interest_rate_our": 1.01 } ] }, "mdr_signature": 4.99, "withdraw": { "fee": 0.99, "limit_transfer": 50000 }, "fee_cashback": 3 }, "platform": { "fee_details": { "fee_withdraw": { "value": 0.99, "type": "fixed" } } }, "financial_pixout":{ "key": "52711237000184", "type": "CNPJ" }, "status": "approved", "msg": "", "credentials":{ "public_ley": "pk_cb389d86-3025-4d49-b029-2e238501bc40", "token": "2c8e*******************5bcb99" }, "created_at": "2024-10-01T15:36:00Z", "updated_at": "2024-10-01T15:36:00Z" } ``` -------------------------------- ### Success Response Example Source: https://dom-pagamentos.readme.io/reference/alterar-modo-de-repasse This is an example of a successful response when the financial transfer mode is updated. ```json { "status": "OK", "msg": "Modo de repasse alterado com sucesso" } ``` -------------------------------- ### Payment Link Creation API Example Source: https://dom-pagamentos.readme.io/reference/clientes-copy This example demonstrates how to create a payment link using the API. It includes product details and payment configuration options. ```json { "title": "Link de pagamento criado por api", "description": "Este link permite realizar o pagamento de suas compras", "actived": true, "limit": 100, "imageUrl": "", "expireAt": "", "redirect_url":"https://dompagamentos.com.br", "phone": true, "address_delivery": true, "address_invoice": true, "confirm_email": true, "birthdate": true, "sex": false, "products": [ { "externCode": "A001", "name": "nome prod1", "price": 10.5, "min": 0, "max": 5 } ], "paymentConfig": { "pix": true, "credit": true, "boleto": true, "installments": 12, "boletoExpireDay": 5, "interest_rate_installment": 1 } } ```