# Codespaces (/api/rest/codespaces)



A codespace is a cloud-based development environment. You can collaborate, build, and test code in a codespace.

With the PayPal GitHub Codespace, you can:

* Get started quickly with a checkout application.
* Run sample applications with your PayPal app's client ID and secret.
* Launch PayPal integrations in a developer container with all dependencies installed.
* Bypass setting up and configuring your local development environment.
* Modify sample code and test changes.

See [GitHub Codespaces documentation](https://docs.github.com/en/codespaces/overview) for more information on codespaces.

## Create codespace [#create-codespace]

1. Select the following button:

 

2. Codespaces sets up your development environment, installs required software, and starts the server automatically. Enable pop-ups for codespaces to open the server in a new tab.

3. Configure your codespace to your development environment. To run your own sample application in a codespace, paste your app's client ID in `CLIENT_ID` and secret in `APP_SECRET`. Complete the steps in [Get started with PayPal APIs](/api/rest/) to get your app's client ID and secret from the Developer Dashboard.

## Edit application [#edit-application]

1. In your codespace tab, use the Explorer to make changes to your javascript or HTML files.

2. In your application tab, refresh to see your changes. If you closed the application tab:
   1. Select the **Ports** tab in Visual Studio Code.
   2. Hover over the **Local Address** value for the running port.
   3. Select the sphere icon to open in your browser.

## Commit and push changes [#commit-and-push-changes]

Now that you've made changes, you can use the integrated terminal or the source view to publish your work to a new repository.

1. Select **Source Control**.

![Source Control](https://www.paypalobjects.com/devdoc/codespaces/image1.png)

2. To stage your changes, select &#x2A;*+** next to the files you want to stage.

![Stage changes](https://www.paypalobjects.com/devdoc/codespaces/image2.png)

3. Enter a commit message describing your changes and select **Commit**.

![Commit](https://www.paypalobjects.com/devdoc/codespaces/image3.png)

4. Click **Publish Branch**.

![Publish Branch](https://www.paypalobjects.com/devdoc/codespaces/image4.png)

5. In the **Repository Name** dropdown, enter a name for your repository. Select where to publish the repository. The repository owner is the GitHub account used to create the codespace.

![Repository Name](https://www.paypalobjects.com/devdoc/codespaces/image5.png)

6. Select **Open on GitHub** to see the new repository on [GitHub.com](http://github.com). Check that the changes you made show up in the repository.

![Open on GitHub](https://www.paypalobjects.com/devdoc/codespaces/image6.png)
