{
  "name": "Telegram payment, invoicing and refund workflow for Stars",
  "nodes": [
    {
      "id": "67e99fc6-8d94-4e73-b685-db2c258b6365",
      "name": "Refund",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -600,
        1000
      ]
    },
    {
      "id": "4795c06a-3a2e-4b5b-949d-55529236f118",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1080,
        920
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "902149bf-3670-41bb-8bd4-77c53a0b6ad8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "72c25a30-b9c6-49b8-a82a-40a521d3ea3b",
      "name": "Send Invoice",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -860,
        -300
      ]
    },
    {
      "id": "06012fca-c8c7-4ded-9939-f532c57e2e6b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3180,
        -427.31933473234784
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "868ba30f-0467-4b7e-89a4-eab429434c4e",
      "name": "Invoice Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1100,
        -300
      ]
    },
    {
      "id": "7992476e-277e-402e-bb0a-6ebe2ddbd7bc",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -3320,
        60
      ]
    },
    {
      "id": "e38bfa0d-f4ff-4801-a439-09ec237b7e5c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3600,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "e5443ca6-d5c9-4b3d-9430-8ecfed13eb43",
      "name": "Make a Refund",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1260,
        1000
      ]
    },
    {
      "id": "ce896243-676d-467c-a768-374b49c6aa4d",
      "name": "Bot API token (for refund)",
      "type": "n8n-nodes-base.set",
      "position": [
        -1020,
        1000
      ]
    },
    {
      "id": "7d87ee0e-1c98-4ff6-9c69-4b1dcd6f3fe9",
      "name": "Refund Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -880,
        1000
      ]
    },
    {
      "id": "ce561169-646d-41a9-ad52-c7fe88629ee2",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1334.999508978541,
        727.5010361342743
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cc63b56b-c5be-444a-82e0-9144e099a46d",
      "name": "Chat ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -2620,
        60
      ]
    },
    {
      "id": "d7a3681c-8362-4f82-b40d-b034de2456e3",
      "name": "Bot API token",
      "type": "n8n-nodes-base.set",
      "position": [
        -2300,
        60
      ]
    },
    {
      "id": "09e7cda2-b087-4cb8-b7e8-6a659fb477e0",
      "name": "Approove / Pre-Checkout Update",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1240,
        -20
      ]
    },
    {
      "id": "70b8d0ff-222a-40f1-acd7-4cf70a30721b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2340,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8c0f3ba9-27c0-44c9-9219-6c4e300badeb",
      "name": "Write Tlegram Payment Charge ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1240,
        336
      ]
    },
    {
      "id": "7a5b03e9-8114-42e2-9653-e35041e72b5c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1340,
        220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3306c93f-2e02-4130-98aa-503bd2dfde3e",
      "name": "Trigger Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -2740,
        60
      ]
    },
    {
      "id": "ae449a79-4891-44c8-8abe-83b065f20d29",
      "name": "Success Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -460,
        340
      ]
    },
    {
      "id": "b37176b5-1f60-4cb7-b91b-3d20fd71574e",
      "name": "Add your logic here",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -820,
        340
      ]
    },
    {
      "id": "47dff255-74a3-4d30-9807-a861fc342ce4",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7b8b9951-8a8f-4bca-b0aa-e3a8be3c51be",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9456fde0-107f-4fce-9d58-bbfe819e64db",
      "name": "Event swticher",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1540,
        60
      ]
    },
    {
      "id": "9933b909-6a1e-4d82-9da8-b9db7fe76b06",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2100,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "25e5ef7a-2831-4397-b84a-5013a1912665",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6127ab7b-069b-4b01-b486-c5f121f3cb59",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1635.6646603031018,
        -400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2e0e7644-c0f0-4399-8a01-f5d5f89578f1",
      "name": "Add your logic",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1540,
        -300
      ]
    },
    {
      "id": "17bff392-1c6f-4bb2-8f69-c5116f5382e4",
      "name": "Add your Refund logic here",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1520,
        1000
      ]
    },
    {
      "id": "d360a946-2748-4067-b330-126432c6565c",
      "name": "Data for Invoice",
      "type": "n8n-nodes-base.set",
      "position": [
        -3320,
        580
      ]
    },
    {
      "id": "35c8dd47-d7b7-4d7e-90df-67d843f6e09d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3600,
        320
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6b2870e4-f2f6-43ce-8af6-f9393167d29f",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -3540,
        580
      ]
    },
    {
      "id": "ca4be620-ae42-49f1-97a4-903ea066fc69",
      "name": "Start Payment Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -3140,
        580
      ]
    },
    {
      "id": "5a7d6bda-3881-4c6b-964e-eb4039e70228",
      "name": "Actions",
      "type": "n8n-nodes-base.switch",
      "position": [
        -2020,
        60
      ]
    }
  ],
  "connections": {
    "Actions": {
      "main": [
        [
          {
            "node": "Add your logic",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Event swticher",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add your Refund logic here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat ID": {
      "main": [
        [
          {
            "node": "Bot API token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Refund Data": {
      "main": [
        [
          {
            "node": "Refund",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invoice Data": {
      "main": [
        [
          {
            "node": "Send Invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Data": {
      "main": [
        [
          {
            "node": "Chat ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bot API token": {
      "main": [
        [
          {
            "node": "Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Make a Refund": {
      "main": [
        [
          {
            "node": "Bot API token (for refund)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add your logic": {
      "main": [
        [
          {
            "node": "Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Event swticher": {
      "main": [
        [
          {
            "node": "Approove / Pre-Checkout Update",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Write Tlegram Payment Charge ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data for Invoice": {
      "main": [
        [
          {
            "node": "Start Payment Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Data for Invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add your logic here": {
      "main": [
        [
          {
            "node": "Success Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Trigger Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bot API token (for refund)": {
      "main": [
        [
          {
            "node": "Refund Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Tlegram Payment Charge ID": {
      "main": [
        [
          {
            "node": "Add your logic here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}