{
  "name": "Mercado Pago - Criar Plano",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger-plan",
      "name": "Quando clicar em 'Testar'",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "resource": "plans",
        "operation": "create",
        "reason": "Plano Mensal Premium",
        "amount": 99.99,
        "frequency": 1,
        "frequencyType": "months"
      },
      "id": "mercado-pago-plan",
      "name": "Mercado Pago Plano",
      "type": "n8n-nodes-mercadopago-flow.mercadoPago",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "credentials": {
        "mercadoPagoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "plan-id",
              "name": "planId",
              "value": "={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "status",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            },
            {
              "id": "reason",
              "name": "reason",
              "value": "={{ $json.description }}",
              "type": "string"
            },
            {
              "id": "amount",
              "name": "amount",
              "value": "={{ $json.amount }}",
              "type": "number"
            },
            {
              "id": "frequency",
              "name": "frequency",
              "value": "={{ $json.raw.auto_recurring.frequency }}",
              "type": "number"
            },
            {
              "id": "frequency-type",
              "name": "frequencyType",
              "value": "={{ $json.raw.auto_recurring.frequency_type }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "format-response",
      "name": "Formatar Resposta",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Quando clicar em 'Testar'": {
      "main": [
        [
          {
            "node": "Mercado Pago Plano",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mercado Pago Plano": {
      "main": [
        [
          {
            "node": "Formatar Resposta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2024-12-30T00:00:00.000Z",
  "versionId": "1"
}