{
  "info": {
    "name": "Payload Stripe Plugin",
    "_exporter_id": "4309346",
    "_postman_id": "130686e1-ddd9-40f1-b031-68ec1a6413ee",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Get All Subscriptions",
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n    \"stripeMethod\": \"subscriptions.list\",\n    \"stripeArgs\": {\n        \"customer\": \"cus_MGgt3Tuj3D66f2\"\n    }\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "stripe", "rest"],
          "port": "3000",
          "raw": "localhost:3000/api/stripe/rest"
        }
      },
      "response": []
    },
    {
      "name": "Get All Products",
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n    \"stripeMethod\": \"products.list\",\n    \"stripeArgs\": [{\n        \"limit\": 100\n    }]\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "stripe", "rest"],
          "port": "3000",
          "raw": "localhost:3000/api/stripe/rest"
        }
      },
      "response": []
    },
    {
      "name": "Get Product",
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n    \"stripeMethod\": \"subscriptions.list\",\n    \"stripeArgs\": {\n        \"customer\": \"cus_MGgt3Tuj3D66f2\"\n    }\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "GET",
        "url": {
          "host": ["localhost"],
          "path": ["api", "products", "6344664c003348299a226249"],
          "port": "3000",
          "raw": "localhost:3000/api/products/6344664c003348299a226249"
        }
      },
      "response": []
    },
    {
      "name": "Update Product",
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n   \"name\": \"Reactions\",\n    \"price\": {\n        \"stripePriceID\": \"price_1LXXU9H77M76aDnomGU5iIZu\"\n    },\n    \"stripeID\": \"prod_MG3bPl2yQGQK4x\",\n    \"skipSync\": true\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "PATCH",
        "url": {
          "host": ["localhost"],
          "path": ["api", "products", "6344664c003348299a226249"],
          "port": "3000",
          "raw": "localhost:3000/api/products/6344664c003348299a226249"
        }
      },
      "response": []
    },
    {
      "name": "Create Product",
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n   \"name\": \"Test\",\n    \"price\": {\n        \"stripePriceID\": \"price_1LXXU9H77M76aDnomGU5iIZu\"\n    },\n    \"stripeID\": \"prod_MG3bPl2yQGQK4x\",\n    \"skipSync\": true\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "products"],
          "port": "3000",
          "raw": "localhost:3000/api/products"
        }
      },
      "response": []
    },
    {
      "name": "Create Stripe Customer",
      "request": {
        "body": {
          "mode": "raw",
          "raw": "{\n    \"stripeMethod\": \"customers.create\",\n    \"stripeArgs\": {\n        \"email\": \"cta@hulu.com\",\n        \"name\": \"Hulu\"\n    }\n}"
        },
        "header": [
          {
            "key": "Content-Type",
            "type": "text",
            "value": "application/json"
          },
          {
            "key": "Authorization",
            "type": "text",
            "value": "JWT {{PAYLOAD_API_TOKEN}}"
          }
        ],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "stripe", "rest"],
          "port": "3000",
          "raw": "localhost:3000/api/stripe/rest"
        }
      },
      "response": []
    },
    {
      "name": "Login",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "let jsonData = pm.response.json();",
              "pm.environment.set(\"PAYLOAD_API_TOKEN\", jsonData.token);"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "body": {
          "mode": "raw",
          "options": {
            "raw": {
              "language": "json"
            }
          },
          "raw": "{\n\t\"email\": \"jacob@trbl.design\",\n\t\"password\": \"test\"\n}"
        },
        "description": "\t",
        "header": [
          {
            "disabled": true,
            "key": "Authorization",
            "value": ""
          }
        ],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "users", "login"],
          "port": "3000",
          "raw": "localhost:3000/api/users/login"
        }
      },
      "response": []
    },
    {
      "name": "Refresh Token",
      "protocolProfileBehavior": {
        "disabledSystemHeaders": {}
      },
      "request": {
        "body": {
          "mode": "raw",
          "options": {
            "raw": {
              "language": "json"
            }
          },
          "raw": "{\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImphY29ic2ZsZXRjaEBnbWFpbC5jb20iLCJpZCI6IjYwODJlZjUxMzg5ZmM2MmYzNWI2MmM2ZiIsImNvbGxlY3Rpb24iOiJ1c2VycyIsImZpcnN0TmFtZSI6IkphY29iIiwibGFzdE5hbWUiOiJGbGV0Y2hlciIsIm9yZ2FuaXphdGlvbiI6IjYwN2RiNGNmYjYzMGIyNWI5YzkzNmMzNSIsImlhdCI6MTYzMTExMDk3NSwiZXhwIjoxNjMyOTI1Mzc1fQ.OL9l8jFNaCZCU-ZDQpH-EJauaRM-5JT4_Y3J_-aC-aY\"\n}"
        },
        "header": [],
        "method": "POST",
        "url": {
          "host": ["localhost"],
          "path": ["api", "users", "refresh-token"],
          "port": "3000",
          "raw": "localhost:3000/api/users/refresh-token"
        }
      },
      "response": []
    },
    {
      "name": "Me",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "let jsonData = pm.response.json();",
              "pm.environment.set(\"PAYLOAD_API_TOKEN\", jsonData.token);"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      },
      "request": {
        "body": {
          "mode": "raw",
          "raw": ""
        },
        "description": "\t",
        "header": [
          {
            "disabled": true,
            "key": "Authorization",
            "value": ""
          }
        ],
        "method": "GET",
        "url": {
          "host": ["localhost"],
          "path": ["api", "users", "me"],
          "port": "3000",
          "query": [
            {
              "key": "depth",
              "value": "1"
            }
          ],
          "raw": "localhost:3000/api/users/me?depth=1"
        }
      },
      "response": []
    }
  ]
}
