floogos
    All templates
    New

    SUNAT invoice or receipt (Peru) sent by email

    Issue SUNAT electronic invoices and receipts from a webhook, get the acceptance receipt and email the document to the customer.

    Everything is created inactive in a new folder of your account. Nothing runs until you activate it, and you can undo it for 24 hours.

    Workflow diagram: SUNAT invoice or receipt (Peru) sent by email

    What it does

    Every order reaching the webhook is issued as an electronic payment voucher (invoice 01 or receipt 03): the workflow builds the UBL XML, signs it with your digital certificate, sends it to SUNAT, reads the acceptance receipt and builds the printable version with its QR code. The customer gets it by email.

    What you need: a SUNAT credential (RUC, SOL user and .p12 certificate; start in the beta environment) and an SMTP account.

    How to use it: install the template, connect the credentials and send the voucher as JSON to the webhook.

    How to set it up

    1. 1

      Connect the sunat credential

      This template uses sunat in: Emitir en SUNAT, Generar representación. Create or pick the credential and assign it in those nodes.

    2. 2

      Connect the smtp credential

      This template uses smtp in: Enviar al cliente. Create or pick the credential and assign it in those nodes.

    3. 3

      Copy the webhook URL (Recibir comprobante)

      A new URL is generated on install. Paste it into the external system that must call this workflow.

    4. 4

      Start in the beta environment

      Create the SUNAT credential in beta mode and check the returned status is accepted before going to production.

    5. 5

      Send a test voucher

      Send a POST with {"tipo":"01","serie":"F001","numero":1,"email":"customer@example.com","emisor":{"ruc":"20000000001"},"receptor":{"tipoDoc":"6","numDoc":"20123456789","nombre":"Customer SAC"},"items":[{"descripcion":"Service","cantidad":1,"valorUnitario":100}]} using your issuer data.

    6. 6

      Activate the workflow

      Workflows are installed inactive. Once everything is set, activate it.

    Try it in under 5 minutes

    Create the template in your account, connect your credentials and activate it when you are ready.

    Use this template