### Registrar Pedido Pago com Cartão de Crédito (API UTMify) Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Registra um pedido pago via cartão de crédito na plataforma UTMify. Requer a chave de API nos cabeçalhos e um payload JSON detalhando o pedido, cliente, produtos e parâmetros de rastreamento. O status 'paid' indica que o pagamento foi processado. ```json { "orderId": "b101ea20-72c7-473d-bcc4-416fe4d8f3be", "platform": "GlobalPay", "paymentMethod": "credit_card", "status": "paid", "createdAt": "2024-07-15 13:30:14", "approvedDate": "2024-07-15 13:30:14", "refundedAt": null, "customer": { "name": "Lucas Pereira Barros", "email": "lucaspbarros@gmail.com", "phone": "21996972147", "document": "24883871428", "country": "US", "ip": "242.53.157.167" }, "products": [ { "id": "ab341a39-52e1-4dda-92c8-ef336f2bb43c", "name": "T-shirt", "planId": "e7c5e019-3ac8-4ba1-9a11-2fcb4a4a598d", "planName": "Winter T-shirts", "quantity": 1, "priceInCents": 3500 }, { "id": "8d7eb04c-eebc-4c51-b0dc-1bf104d3a37e", "name": "Pants", "planId": "49436d63-d345-4303-b4fd-f7da003e1a65", "planName": "Winter Pants", "quantity": 1, "priceInCents": 4000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_5|761832537749495", "utm_medium": "CONJUNTO_5|636393136432792", "utm_content": "ANUNCIO_5|525916699209785", "utm_term": "Facebook_Mobile_Feed" }, "commission": { "totalPriceInCents": 7500, "gatewayFeeInCents": 375, "userCommissionInCents": 7125, "currency": "USD" }, "isTest": false } ``` -------------------------------- ### Estrutura do Objeto Product Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Define a estrutura de dados para representar as informações de um produto na API da Utmify. Inclui campos como ID, nome, ID do plano, nome do plano, quantidade e preço em centavos. ```json { "id": "string", "name": "string", "planId": "string | null", "planName": "string | null", "quantity": "number", "priceInCents": "number" } ``` -------------------------------- ### Registrar Pedido Reembolsado com Cartão de Crédito (API UTMify) Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Registra um pedido que foi reembolsado na plataforma UTMify. Semelhante ao registro de pedido pago, mas com o status 'refunded' e a data de reembolso preenchida. A API utiliza a chave de autenticação fornecida nos cabeçalhos. ```json { "orderId": "b101ea20-72c7-473d-bcc4-416fe4d8f3be", "paymentMethod": "credit_card", "status": "refunded", "createdAt": "2024-07-15 13:30:14", "approvedDate": "2024-07-15 13:30:14", "refundedAt": "2024-07-19 01:44:39", "customer": { "name": "Lucas Pereira Barros", "email": "lucaspbarros@gmail.com", "phone": "21996972147", "document": "24883871428", "country": "US", "ip": "242.53.157.167" }, "products": [ { "id": "ab341a39-52e1-4dda-92c8-ef336f2bb43c", "name": "T-shirt", "planId": "e7c5e019-3ac8-4ba1-9a11-2fcb4a4a598d", "planName": "Winter T-shirts", "quantity": 1, "priceInCents": 3500 }, { "id": "8d7eb04c-eebc-4c51-b0dc-1bf104d3a37e", "name": "Pants", "planId": "49436d63-d345-4303-b4fd-f7da003e1a65", "planName": "Winter Pants", "quantity": 1, "priceInCents": 4000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_5|761832537749495", "utm_medium": "CONJUNTO_5|636393136432792", "utm_content": "ANUNCIO_5|525916699209785", "utm_term": "Facebook_Mobile_Feed" }, "commission": { "totalPriceInCents": 7500, "gatewayFeeInCents": 375, "userCommissionInCents": 7125, "currency": "USD" }, "isTest": false } ``` -------------------------------- ### Create Order (Pix Generated) - API Request Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This snippet demonstrates how to create a new order with the status 'waiting_payment' using the UTMify API. It includes order details, customer information, product specifics, tracking parameters, and commission. The API endpoint is POST /api-credentials/orders. ```HTTP POST https://api.utmify.com.br/api-credentials/orders Headers: ( "x-api-token": "KVRxalfMiBfm8Rm1nP5YxfwYzArNsAQVLeWC" ) Body: ( "orderld": "8e40b27e-0118-4699-8587-e892beedb403", "platform": "GlobalPay", "paymentMethod": "pix", "status": "waiting_payment", "createdAt": "2024-07-26 14:35:13", "approvedDate": null, "refundedAt': null, "customer": ( "Marcos Goncalves Rodrigues", "marcosgonrod(Qhotmail.com", "document": "19936387209", "29672656599", "country": "BR" "ip": "61.145.134.105" ) "products": [ { "id": "63d5ce96-a548-4c7b-a0bc-da8bfa0f9294", "name": "Oleo de Motor", "planid": null, "planName": null, "quantity": 1, "pricelnCents": 8000 rackingParameters": ( "src": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_2(413591587909524", "utm_medium": "CONJUNTO_2|498046723566488", "utm_content": "ANUNCIO_2|504346051220592", "utm_term": "Instagram_Feed" ) ommission": ( "totalPricelnCents": 10000, "gatewayFeelnCents": 400, "userCommissionInCents": 9600 ) "sTest": false } ) ) ``` -------------------------------- ### Estrutura do Objeto Customer Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Define a estrutura de dados para representar as informações do cliente na API da Utmify. Inclui campos obrigatórios e opcionais como nome, email, telefone, documento, país e IP. ```json { "name": "string", "email": "string", "phone": "string | null", "document": "string | null", "country": "string", // ISO 3166-1 alfa-2 "ip": "string" } ``` -------------------------------- ### Estrutura do Objeto TrackingParameters Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Define a estrutura de dados para os parâmetros de rastreamento na API da Utmify. Permite capturar informações de UTM e outras fontes de tráfego. ```json { "src": "string | null", "sck": "string | null", "utm_source": "string | null", "utm_campaign": "string | null", "utm_medium": "string | null", "utm_content": "string | null", "utm_term": "string | null" } ``` -------------------------------- ### Enviar Pedido para API Utmify (POST Request) Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Exemplo de como enviar dados de um pedido para a API da Utmify usando uma requisição POST. Inclui a estrutura do payload com informações do cliente, produto, rastreamento e comissão. ```json { "orderId": "FC72D9AK9", "platform": "GlobalPay", "paymentMethod": "credit_card", "status": "paid", "createdAt": "2024-07-25 15:34:14", "approvedDate": "2024-07-25 15:41:12", "refundedAt": null, "customer": { "name": "Lucas Sampaio", "email": "lusampa2020@gmail.com", "phone": "11991560063", "document": "43887057481", "country": "BR", "ip": "204.97.192.73" }, "products": [ { "id": "FGC137525", "name": "Calca", "planId": "FTS7743C3", "planName": null, "quantity": 1, "priceInCents": 10000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": null, "utm_campaign": null, "utm_medium": null, "utm_content": null, "utm_term": null }, "commission": { "totalPriceInCents": 10000, "gatewayFeeInCents": 500, "userCommissionInCents": 9500 }, "isTest": false } ``` -------------------------------- ### POST /api-credentials/orders - Pix Generated Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This endpoint is used to create a new order record when a Pix payment method is generated. It includes details about the customer, products, tracking parameters, and commission. ```APIDOC ## POST /api-credentials/orders ### Description Creates a new order record for a Pix payment that has been generated but not yet paid. ### Method POST ### Endpoint https://api.utmify.com.br/api-credentials/orders ### Headers - **x-api-token** (string) - Required - The API token for authentication. ### Request Body - **orderId** (string) - Required - Unique identifier for the order. - **platform** (string) - Required - The name of the sales platform. - **paymentMethod** (string) - Required - The method of payment (e.g., "pix"). - **status** (string) - Required - The current status of the order (e.g., "waiting_payment"). - **createdAt** (string) - Required - The date and time the order was created. - **approvedDate** (string/null) - Optional - The date and time the order was approved. - **refundedAt** (string/null) - Optional - The date and time the order was refunded. - **customer** (object) - Required - Information about the customer. - **name** (string) - Required - Customer's full name. - **email** (string) - Required - Customer's email address. - **document** (string) - Required - Customer's document number. - **phone** (string) - Required - Customer's phone number. - **country** (string) - Required - Customer's country code. - **ip** (string) - Required - Customer's IP address. - **products** (array) - Required - A list of products included in the order. - **id** (string) - Required - Unique identifier for the product. - **name** (string) - Required - Name of the product. - **planId** (string/null) - Optional - The plan ID if applicable. - **planName** (string/null) - Optional - The name of the plan if applicable. - **quantity** (integer) - Required - The quantity of the product ordered. - **priceInCents** (integer) - Required - The price of the product in cents. - **trackingParameters** (object) - Optional - Parameters for tracking the order source. - **src** (string/null) - Optional - Source value from the checkout URL. - **sck** (string/null) - Optional - SCK value from the checkout URL. - **utm_source** (string/null) - Optional - UTM source parameter. - **utm_campaign** (string/null) - Optional - UTM campaign parameter. - **utm_medium** (string/null) - Optional - UTM medium parameter. - **utm_content** (string/null) - Optional - UTM content parameter. - **utm_term** (string/null) - Optional - UTM term parameter. - **commission** (object) - Required - Commission details for the order. - **totalPriceInCents** (integer) - Required - Total price of the order in cents. - **gatewayFeeInCents** (integer) - Required - Fee charged by the gateway in cents. - **userCommissionInCents** (integer) - Required - Commission earned by the user in cents. - **currency** (string) - Optional - Currency of the transaction (defaults to BRL if not provided). - **isTest** (boolean) - Required - Indicates if this is a test order. ### Request Example ```json { "orderId": "8e40b27e-0118-4699-8587-e892beedb403", "platform": "GlobalPay", "paymentMethod": "pix", "status": "waiting_payment", "createdAt": "2024-07-26 14:35:13", "approvedDate": null, "refundedAt": null, "customer": { "name": "Marcos Goncalves Rodrigues", "email": "marcosgonrod@hotmail.com", "document": "19936387209", "phone": "29672656599", "country": "BR", "ip": "61.145.134.105" }, "products": [ { "id": "63d5ce96-a548-4c7b-a0bc-da8bfa0f9294", "name": "Oleo de Motor", "planId": null, "planName": null, "quantity": 1, "priceInCents": 8000 } ], "trackingParameters": { "src": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_2|413591587909524", "utm_medium": "CONJUNTO_2|498046723566488", "utm_content": "ANUNCIO_2|504346051220592", "utm_term": "Instagram_Feed" }, "commission": { "totalPriceInCents": 10000, "gatewayFeeInCents": 400, "userCommissionInCents": 9600 }, "isTest": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of order creation. #### Response Example ```json { "message": "Order created successfully." } ``` ``` -------------------------------- ### POST /api-credentials/orders Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Endpoint for sending sales order information to Utmify. This includes details about the order, customer, products, payment method, status, and tracking parameters. ```APIDOC ## POST /api-credentials/orders ### Description This endpoint is used to send sales order information to Utmify. It requires an API token in the headers and a JSON payload containing comprehensive order details. ### Method POST ### Endpoint https://api.utmify.com.br/api-credentials/orders ### Parameters #### Path Parameters None #### Query Parameters None #### Headers - **x-api-token** (string) - Required - API credential generated in the Utmify Dashboard. #### Request Body - **orderId** (string) - Required - Identification of the order on the sales platform. - **platform** (string) - Required - Name of the platform integrating with Utmify. Recommended format: PascalCase. - **paymentMethod** (string) - Required - Payment method used in the transaction. Allowed values: 'credit_card', 'boleto', 'pix', 'paypal', 'free_price'. - **status** (string) - Required - Payment status of the transaction. Allowed values: 'waiting_payment', 'paid', 'refused', 'refunded', 'chargedback'. - **createdAt** (string) - Required - Date the order was created (UTC) in 'YYYY-MM-DD HH:MM:SS' format. - **approvedDate** (string | null) - Optional - Date the order payment was made (UTC) in 'YYYY-MM-DD HH:MM:SS' format. Use null if not yet paid. - **refundedAt** (string | null) - Optional - Date the order was refunded (UTC) in 'YYYY-MM-DD HH:MM:SS' format. Use null if not refunded. - **customer** (object) - Required - Information about the customer who made the purchase. - **products** (array) - Required - Information about the products included in the transaction. - **trackingParameters** (object) - Required - URL parameters extracted from the checkout URL at the time of purchase. - **commission** (object) - Required - Transaction value details. - **isTest** (boolean) - Optional - Defines if the submission is a test. If true, data is validated but not saved. Defaults to false if not provided. ##### Customer Object - **name** (string) - Required - Buyer's name. - **email** (string) - Required - Buyer's email. - **phone** (string | null) - Optional - Buyer's phone number. - **document** (string | null) - Optional - Buyer's CPF or CNPJ. - **country** (string) - Optional - Buyer's country in ISO 3166-1 alpha-2 format. - **ip** (string) - Optional - Buyer's IP address. ##### Product Object - **id** (string) - Required - Product identification. - **name** (string) - Required - Product name. - **planId** (string | null) - Optional - Plan ID if the platform offers multiple plans for the same product. - **planName** (string | null) - Optional - Plan name if the platform offers multiple plans for the same product. - **quantity** (number) - Required - Quantity of the product purchased. - **priceInCents** (number) - Required - Price of the product in cents. ##### TrackingParameters Object - **src** (string | null) - Optional - Source parameter. - **sck** (string | null) - Optional - Sck parameter. - **utm_source** (string | null) - Optional - UTM source parameter. - **utm_campaign** (string | null) - Optional - UTM campaign parameter. - **utm_medium** (string | null) - Optional - UTM medium parameter. - **utm_content** (string | null) - Optional - UTM content parameter. - **utm_term** (string | null) - Optional - UTM term parameter. ##### Commission Object - **totalPriceInCents** (number) - Required - Total transaction price in cents. - **gatewayFeeInCents** (number) - Required - Gateway fee in cents. - **userCommissionInCents** (number) - Required - User commission in cents. - **currency** (string) - Optional - Currency of the transaction. Allowed values: 'BRL', 'USD', 'EUR', 'GBP', 'ARS', 'CAD'. ### Request Example ```json { "orderId": "FC72D9AK9", "platform": "GlobalPay", "paymentMethod": "credit_card", "status": "paid", "createdAt": "2024-07-25 15:34:14", "approvedDate": "2024-07-25 15:41:12", "refundedAt": null, "customer": { "name": "Lucas Sampaio", "email": "lusampa2020@gmail.com", "phone": "11991560063", "document": "43887057481", "country": "BR", "ip": "204.97.192.73" }, "products": [ { "id": "FGC137525", "name": "Calca", "planId": "FTS7743C3", "planName": null, "quantity": 1, "priceInCents": 15000 } ], "trackingParameters": { "src": "utm_source_value", "sck": "utm_campaign_value", "utm_source": "source", "utm_medium": "medium", "utm_campaign": "campaign", "utm_content": "content", "utm_term": "term" }, "commission": { "totalPriceInCents": 15000, "gatewayFeeInCents": 500, "userCommissionInCents": 1000, "currency": "BRL" }, "isTest": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful processing of the order data. #### Response Example ```json { "message": "Order data processed successfully." } ``` #### Error Response (400, 401, 500) - **error** (string) - Description of the error that occurred during processing. #### Error Response Example ```json { "error": "Invalid API token provided." } ``` ``` -------------------------------- ### Estrutura do Objeto Commission Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 Define a estrutura de dados para informações de comissão na API da Utmify. Inclui o preço total, taxa do gateway e comissão do usuário, com suporte a diferentes moedas. ```json { "totalPriceInCents": "number", "gatewayFeeInCents": "number", "userCommissionInCents": "number", "currency": "'BRL' | 'USD' | 'EUR' | 'GBP' | 'ARS' | 'CAD'" } ``` -------------------------------- ### POST /api-credentials/orders - Paid Credit Card Order Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This endpoint is used to record a paid order made via credit card. It includes details about the customer, products, payment method, and tracking parameters. ```APIDOC ## POST /api-credentials/orders ### Description Submits a paid order made via credit card to the Utmify platform. ### Method POST ### Endpoint https://api.utmify.com.br/api-credentials/orders ### Parameters #### Headers - **x-api-token** (string) - Required - The API token for seller authentication. #### Request Body - **orderId** (string) - Required - Unique identifier for the order. - **platform** (string) - Required - The payment platform used (e.g., "GlobalPay"). - **paymentMethod** (string) - Required - The method of payment (e.g., "credit_card"). - **status** (string) - Required - The current status of the order (e.g., "paid"). - **createdAt** (string) - Required - The date and time the order was created. - **approvedDate** (string) - Required - The date and time the order was approved. - **refundedAt** (string | null) - Optional - The date and time the order was refunded, if applicable. - **customer** (object) - Required - Information about the customer. - **name** (string) - Required - Customer's full name. - **email** (string) - Required - Customer's email address. - **phone** (string) - Required - Customer's phone number. - **document** (string) - Required - Customer's document number. - **country** (string) - Required - Customer's country code. - **ip** (string) - Required - Customer's IP address. - **products** (array) - Required - A list of products included in the order. - **id** (string) - Required - Unique identifier for the product. - **name** (string) - Required - Name of the product. - **planId** (string) - Required - Identifier for the product plan. - **planName** (string) - Required - Name of the product plan. - **quantity** (integer) - Required - Quantity of the product ordered. - **priceInCents** (integer) - Required - Price of the product in cents. - **trackingParameters** (object) - Optional - Parameters for tracking the order source. - **src** (string | null) - Optional. - **sck** (string | null) - Optional. - **utm_source** (string) - Optional - UTM source parameter. - **utm_campaign** (string) - Optional - UTM campaign parameter. - **utm_medium** (string) - Optional - UTM medium parameter. - **utm_content** (string) - Optional - UTM content parameter. - **utm_term** (string) - Optional - UTM term parameter. - **commission** (object) - Required - Commission details for the order. - **totalPriceInCents** (integer) - Required - Total price of the order in cents. - **gatewayFeeInCents** (integer) - Required - Gateway fee in cents. - **userCommissionInCents** (integer) - Required - User's commission in cents. - **currency** (string) - Required - Currency of the transaction (e.g., "USD"). - **isTest** (boolean) - Required - Indicates if the transaction is a test. ### Request Example ```json { "orderId": "b101ea20-72c7-473d-bcc4-416fe4d8f3be", "platform": "GlobalPay", "paymentMethod": "credit_card", "status": "paid", "createdAt": "2024-07-15 13:30:14", "approvedDate": "2024-07-15 13:30:14", "refundedAt": null, "customer": { "name": "Lucas Pereira Barros", "email": "lucaspbarros@gmail.com", "phone": "21996972147", "document": "24883871428", "country": "US", "ip": "242.53.157.167" }, "products": [ { "id": "ab341a39-52e1-4dda-92c8-ef336f2bb43c", "name": "T-shirt", "planId": "e7c5e019-3ac8-4ba1-9a11-2fcb4a4a598d", "planName": "Winter T-shirts", "quantity": 1, "priceInCents": 3500 }, { "id": "8d7eb04c-eebc-4c51-b0dc-1bf104d3a37e", "name": "Pants", "planId": "49436d63-d345-4303-b4fd-f7da003e1a65", "planName": "Winter Pants", "quantity": 1, "priceInCents": 4000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_5|761832537749495", "utm_medium": "CONJUNTO_5|636393136432792", "utm_content": "ANUNCIO_5|525916699209785", "utm_term": "Facebook_Mobile_Feed" }, "commission": { "totalPriceInCents": 7500, "gatewayFeeInCents": 375, "userCommissionInCents": 7125, "currency": "USD" }, "isTest": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Order processed successfully." } ``` ``` -------------------------------- ### POST /api-credentials/orders - Refunded Credit Card Order Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This endpoint is used to record a refunded order made via credit card. It includes details about the customer, products, and the refund timestamp. ```APIDOC ## POST /api-credentials/orders ### Description Submits a refunded order made via credit card to the Utmify platform. ### Method POST ### Endpoint https://api.utmify.com.br/api-credentials/orders ### Parameters #### Headers - **x-api-token** (string) - Required - The API token for seller authentication. #### Request Body - **orderId** (string) - Required - Unique identifier for the order. - **platform** (string) - Required - The payment platform used (e.g., "GlobalPay"). - **paymentMethod** (string) - Required - The method of payment (e.g., "credit_card"). - **status** (string) - Required - The current status of the order (e.g., "refunded"). - **createdAt** (string) - Required - The date and time the order was created. - **approvedDate** (string) - Required - The date and time the order was approved. - **refundedAt** (string) - Required - The date and time the order was refunded. - **customer** (object) - Required - Information about the customer. - **name** (string) - Required - Customer's full name. - **email** (string) - Required - Customer's email address. - **phone** (string) - Required - Customer's phone number. - **document** (string) - Required - Customer's document number. - **country** (string) - Required - Customer's country code. - **ip** (string) - Required - Customer's IP address. - **products** (array) - Required - A list of products included in the order. - **id** (string) - Required - Unique identifier for the product. - **name** (string) - Required - Name of the product. - **planId** (string) - Required - Identifier for the product plan. - **planName** (string) - Required - Name of the product plan. - **quantity** (integer) - Required - Quantity of the product ordered. - **priceInCents** (integer) - Required - Price of the product in cents. - **trackingParameters** (object) - Optional - Parameters for tracking the order source. - **src** (string | null) - Optional. - **sck** (string | null) - Optional. - **utm_source** (string) - Optional - UTM source parameter. - **utm_campaign** (string) - Optional - UTM campaign parameter. - **utm_medium** (string) - Optional - UTM medium parameter. - **utm_content** (string) - Optional - UTM content parameter. - **utm_term** (string) - Optional - UTM term parameter. - **commission** (object) - Required - Commission details for the order. - **totalPriceInCents** (integer) - Required - Total price of the order in cents. - **gatewayFeeInCents** (integer) - Required - Gateway fee in cents. - **userCommissionInCents** (integer) - Required - User's commission in cents. - **currency** (string) - Required - Currency of the transaction (e.g., "USD"). - **isTest** (boolean) - Required - Indicates if the transaction is a test. ### Request Example ```json { "orderId": "b101ea20-72c7-473d-bcc4-416fe4d8f3be", "paymentMethod": "credit card", "status": "refunded", "createdAt": "2024-07-15 13:30:14", "approvedDate": "2024-07-15 13:30:14", "refundedAt": "2024-07-19 01:44:39", "customer": { "name": "Lucas Pereira Barros", "email": "lucaspbarros@gmail.com", "phone": "21996972147", "document": "24883871428", "country": "US", "ip": "242.53.157.167" }, "products": [ { "id": "ab341a39-52e1-4dda-92c8-ef336f2bb43c", "name": "T-shirt", "planId": "e7c5e019-3ac8-4ba1-9a11-2fcb4a4a598d", "planName": "Winter T-shirts", "quantity": 1, "priceInCents": 3500 }, { "id": "8d7eb04c-eebc-4c51-b0dc-1bf104d3a37e", "name": "Pants", "planId": "49436d63-d345-4303-b4fd-f7da003e1a65", "planName": "Winter Pants", "quantity": 1, "priceInCents": 4000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_5|761832537749495", "utm_medium": "CONJUNTO_5|636393136432792", "utm_content": "ANUNCIO_5|525916699209785", "utm_term": "Facebook_Mobile_Feed" }, "commission": { "totalPriceInCents": 7500, "gatewayFeeInCents": 375, "userCommissionInCents": 7125, "currency": "USD" }, "isTest": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Order refund processed successfully." } ``` ``` -------------------------------- ### POST /api-credentials/orders - Pix Paid Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This endpoint is used to update an existing order record when a Pix payment has been successfully paid. It updates the status and approved date. ```APIDOC ## POST /api-credentials/orders ### Description Updates an existing order record to reflect that the Pix payment has been successfully paid. This includes setting the status to 'paid' and providing the approval date. ### Method POST ### Endpoint https://api.utmify.com.br/api-credentials/orders ### Headers - **x-api-token** (string) - Required - The API token for authentication. ### Request Body - **orderId** (string) - Required - Unique identifier for the order. - **platform** (string) - Required - The name of the sales platform. - **paymentMethod** (string) - Required - The method of payment (e.g., "pix"). - **status** (string) - Required - The current status of the order (e.g., "paid"). - **createdAt** (string) - Required - The date and time the order was created. - **approvedDate** (string/null) - Required - The date and time the order was approved. - **refundedAt** (string/null) - Optional - The date and time the order was refunded. - **customer** (object) - Required - Information about the customer. - **name** (string) - Required - Customer's full name. - **email** (string) - Required - Customer's email address. - **document** (string) - Required - Customer's document number. - **phone** (string) - Required - Customer's phone number. - **country** (string) - Required - Customer's country code. - **ip** (string) - Required - Customer's IP address. - **products** (array) - Required - A list of products included in the order. - **id** (string) - Required - Unique identifier for the product. - **name** (string) - Required - Name of the product. - **planId** (string/null) - Optional - The plan ID if applicable. - **planName** (string/null) - Optional - The name of the plan if applicable. - **quantity** (integer) - Required - The quantity of the product ordered. - **priceInCents** (integer) - Required - The price of the product in cents. - **trackingParameters** (object) - Optional - Parameters for tracking the order source. - **src** (string/null) - Optional - Source value from the checkout URL. - **sck** (string/null) - Optional - SCK value from the checkout URL. - **utm_source** (string/null) - Optional - UTM source parameter. - **utm_campaign** (string/null) - Optional - UTM campaign parameter. - **utm_medium** (string/null) - Optional - UTM medium parameter. - **utm_content** (string/null) - Optional - UTM content parameter. - **utm_term** (string/null) - Optional - UTM term parameter. - **commission** (object) - Required - Commission details for the order. - **totalPriceInCents** (integer) - Required - Total price of the order in cents. - **gatewayFeeInCents** (integer) - Required - Fee charged by the gateway in cents. - **userCommissionInCents** (integer) - Required - Commission earned by the user in cents. - **currency** (string) - Optional - Currency of the transaction (defaults to BRL if not provided). - **isTest** (boolean) - Required - Indicates if this is a test order. ### Request Example ```json { "orderId": "8e40b27e-0118-4699-8587-e892beedb403", "platform": "GlobalPay", "paymentMethod": "pix", "status": "paid", "createdAt": "2024-07-26 14:35:13", "approvedDate": "2024-07-26 14:43:37", "refundedAt": null, "customer": { "name": "Marcos Goncalves Rodrigues", "email": "marcosgonrod@hotmail.com", "document": "19936387209", "phone": "29672656599", "country": "BR", "ip": "61.145.134.105" }, "products": [ { "id": "63d5ce96-a548-4c7b-a0bc-da8bfa0f9294", "name": "Oleo de Motor", "planId": null, "planName": null, "quantity": 1, "priceInCents": 8000 } ], "trackingParameters": { "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_2|413591587909524", "utm_medium": "CONJUNTO_2|498046723566488", "utm_content": "ANUNCIO_2|504346051220592", "utm_term": "Instagram_Feed" }, "commission": { "totalPriceInCents": 10000, "gatewayFeeInCents": 400, "userCommissionInCents": 9600 }, "isTest": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of order update. #### Response Example ```json { "message": "Order updated successfully." } ``` ``` -------------------------------- ### Update Order (Pix Paid) - API Request Source: https://api.utmify.com.br/api-credentials/orders/Lurizin/e54a19e031f25c98c8491f2071b25280/raw/79ce9cd548bb6160ce50e4d2dadf2bb891d81a97/gistfile1 This snippet shows how to update an existing order to reflect its payment status as 'paid' using the UTMify API. It includes the payment confirmation timestamp and other relevant order details. The API endpoint is POST /api-credentials/orders. ```HTTP POST https://api.utmify.com.br/api-credentials/orders Headers: ( "x-api-token": "KVRxalfMiBfm8Rm1nP5YxfwYzArNsAQVLeWC" ) Body: ( "orderld": "8e40b27e-0118-4699-8587-e892beedb403", "platform": "GlobalPay", "paymentMethod": "pix", "status": "paid", "createdAt": "2024-07-26 14:35:13", "approvedDate": "2024-07-26 14:43:37", "refundedAt': null, "customer": ( "Marcos Goncalves Rodrigues", "marcosgonrod@hotmail.com", "document": "19936387209", "29672656599", "country": "BR", "ip": "61.145.134.105" ) "products": [ { "id": "63d5ce96-a548-4c7b-a0bc-da8bfa0f9294", "name": "Oleo de Motor", "planid": null, "planName": null, "quantity": 1, "pricelnCents": 8000 rackingParameters": ( "src": null, "sck": null, "utm_source": "FB", "utm_campaign": "CAMPANHA_2(413591587909524", ium": "CONJUNTO_2|498046723566488", "ANUNCIO_2|504346051220592" ) } ) ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.