### Example Generated Payload Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 This is an example of a generated payload for an invoice checkout. It includes essential details like the store handle and items with their quantity, price, and description. ```json { "handle": "colakids", "items": [ { "quantity": 1, "price": 1000, "description": "Produto de Exemplo" } ] } ``` -------------------------------- ### Payment Status Check Response Example Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 This is an example of the response you might receive when checking the payment status. It includes a 'success' flag, a 'paid' flag indicating if the payment was completed, the original 'amount', the 'paid_amount', and the 'capture_method'. ```JSON { "success": true, "paid": true, "amount": 1500, "paid_amount": 1510, "installments": 1, "capture_method": "pix" } ``` -------------------------------- ### Webhook Payload Example for Approved Payment Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 When a payment is approved, InfinitePay sends a webhook notification to your configured 'webhook_url'. This payload contains details about the transaction, including invoice slug, amounts, capture method, and items purchased. Respond with 200 OK to acknowledge receipt. ```JSON { "invoice_slug": "abc123", "amount": 1000, "paid_amount": 1010, "installments": 1, "capture_method": "credit_card", "transaction_nsu": "UUID", "order_nsu": "UUID-do-pedido", "receipt_url": "https://comprovante.com/123", "items": [ { "quantity": 1, "price": 1000, "description": "Produto de Exemplo" } ] } ``` -------------------------------- ### Generate Payment Link using POST Request Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 Send a POST request to this endpoint to generate a payment link. The request body requires your InfiniteTag ('handle') and an array of items being purchased. Prices should be in cents. An optional 'order_nsu' can be included for tracking. ```HTTP POST https://api.infinitepay.io/invoices/public/checkout/links { "handle": "seu-handle", "itens": [ { "quantity": 1, "price": 123, "description": "exemplo de descrição" } ], "order_nsu": "order-nsu-123", "redirect_url": "https://seusite.com/pagamento-concluido", "webhook_url": "https://seusite.com/webhook-infinitepay" } ``` -------------------------------- ### Create Payment Link Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 Generates a payment link for a customer's order. This is done by sending a POST request with the order details to the specified endpoint. ```APIDOC ## POST /invoices/public/checkout/links ### Description Creates a payment link for an order, allowing customers to complete their purchase. ### Method POST ### Endpoint https://api.infinitepay.io/invoices/public/checkout/links ### Parameters #### Request Body - **handle** (string) - Required - Your InfiniteTag (username in the InfinitePay App) without the leading '$'. - **itens** (array) - Required - A list of objects representing the products or services being purchased. Each object must contain: - **quantity** (integer) - Required - The quantity of the item. - **price** (integer) - Required - The price of the item in cents (e.g., R$ 10.00 = 1000). - **description** (string) - Required - A description of the item. - **order_nsu** (string) - Optional - An identifier to track the checkout link in your system. If not provided, InfinitePay generates a random value. - **redirect_url** (string) - Optional - A URL to redirect the user to after payment completion (success page). - **webhook_url** (string) - Optional - A URL to receive real-time payment status updates via webhook. ### Request Example ```json { "handle": "colakids", "itens": [ { "quantity": 1, "price": 1000, "description": "Produto de Exemplo" } ], "order_nsu": "order-nsu-123", "redirect_url": "https://seusite.com/pagamento-concluido", "webhook_url": "https://seusite.com/webhook-infinitepay" } ``` ### Response #### Success Response (200) - **link** (string) - The generated payment link. - **slug** (string) - The unique identifier for the invoice. #### Response Example ```json { "link": "https://checkout.infinitepay.io/pay/abcdef123", "slug": "abcdef123" } ``` ``` -------------------------------- ### Check Payment Status using POST Request Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 This endpoint allows you to check the status of a payment. You need to provide your 'handle', the 'order_nsu', and the 'transaction_nsu' or 'slug' received from the payment process. The response indicates if the payment was successful and paid. ```HTTP POST https://api.infinitepay.io/invoices/public/checkout/payment_check { "handle": "sua_infinite_tag", "order_nsu": "123456", "transaction_nsu": "UUID-que-recebeu", "slug": "codigo-da-fatura" } ``` -------------------------------- ### Include Customer Data in Checkout Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 Optionally include customer details such as name, email, and phone number to pre-fill checkout information, streamlining the payment process. This data is sent within the 'customer' object. ```json { "customer": { "name": "João Silva", "email": "joao@email.com", "phone_number": "+5511999887766" } } ``` -------------------------------- ### API Response for Checkout URL Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 The API response provides a 'checkout_url' which is the direct link to the InfinitePay checkout page. This URL can be used to redirect the customer to complete their payment. ```json { "checkout_url": "https://checkout.infinitepay.io/colakids/1RxANX7tdF" } ``` -------------------------------- ### Create Invoice Checkout Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 This endpoint allows you to generate a checkout URL for an invoice. You can optionally include customer and delivery address information to pre-fill the checkout form. ```APIDOC ## POST /websites/api_infinitepay_io_invoices_public_checkout ### Description Generates a public checkout URL for an invoice. Optionally accepts customer and delivery address details to pre-fill the checkout form. ### Method POST ### Endpoint /websites/api_infinitepay_io_invoices_public_checkout ### Parameters #### Request Body - **handle** (string) - Required - The handle for the merchant. - **items** (array) - Required - A list of items included in the invoice. - **quantity** (integer) - Required - The quantity of the item. - **price** (integer) - Required - The price of the item in cents. - **description** (string) - Required - The description of the item. - **customer** (object) - Optional - Customer information. - **name** (string) - Optional - The customer's full name. - **email** (string) - Optional - The customer's email address. - **phone_number** (string) - Optional - The customer's phone number. - **address** (object) - Optional - Delivery address information. - **cep** (string) - Optional - The postal code. - **street** (string) - Optional - The street name. - **neighborhood** (string) - Optional - The neighborhood. - **number** (string) - Optional - The street number. - **complement** (string) - Optional - Additional address details (e.g., apartment number). ### Request Example ```json { "handle": "colakids", "items": [ { "quantity": 1, "price": 1000, "description": "Produto de Exemplo" } ], "customer": { "name": "João Silva", "email": "joao@email.com", "phone_number": "+5511999887766" }, "address": { "cep": "12345678", "street": "Rua das Flores", "neighborhood": "Centro", "number": "123", "complement": "Apto 45" } } ``` ### Response #### Success Response (200) - **checkout_url** (string) - The URL for the public checkout page. #### Response Example ```json { "checkout_url": "https://checkout.infinitepay.io/colakids/1RxANX7tdF" } ``` ``` -------------------------------- ### Include Delivery Address in Checkout Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 If your product requires delivery, you can include the shipping address within the 'address' object. This ensures that delivery details are captured during the checkout process. ```json { "address": { "cep": "12345678", "street": "Rua das Flores", "neighborhood": "Centro", "number": "123", "complement": "Apto 45" } } ``` -------------------------------- ### Check Payment Status Source: https://api.infinitepay.io/invoices/public/checkout/Lurizin/361b6f2f4da28f7b25bbcbc5dc73863c/raw/6e594a1efc14dc16a237f2ff3f1f06241ba8b265/gistfile1 Checks the status of a payment using the order details and transaction information. This is useful for verifying if a payment has been successfully processed. ```APIDOC ## POST /invoices/public/checkout/payment_check ### Description Verifies the status of a payment using its associated details. ### Method POST ### Endpoint https://api.infinitepay.io/invoices/public/checkout/payment_check ### Parameters #### Request Body - **handle** (string) - Required - Your InfiniteTag (username in the InfinitePay App) without the leading '$'. - **order_nsu** (string) - Required - The order number from your system. - **transaction_nsu** (string) - Required - The unique transaction identifier received. - **slug** (string) - Required - The invoice code from InfinitePay. ### Request Example ```json { "handle": "sua_infinite_tag", "order_nsu": "123456", "transaction_nsu": "UUID-que-recebeu", "slug": "codigo-da-fatura" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **paid** (boolean) - Indicates if the payment has been made. - **amount** (integer) - The original amount of the payment in cents. - **paid_amount** (integer) - The actual amount paid in cents. - **installments** (integer) - The number of installments. - **capture_method** (string) - The method used for payment (e.g., "credit_card", "pix"). #### Response Example ```json { "success": true, "paid": true, "amount": 1500, "paid_amount": 1510, "installments": 1, "capture_method": "pix" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.