> For the complete documentation index, see [llms.txt](https://mogami.gitbook.io/mogami/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mogami.gitbook.io/mogami/release-process.md).

# Release process

### Update releases in pom and check tests are passing.

* x402-commons
  * Intellij  / analyse / inspect code
  * Check TODO list
  * `just run_tests`
  * `just run_install`
* x402-java-client
  * Intellij  / analyse / inspect code
  * Check TODO list
  * Change `mogami.commons.version` to latest snapshot.
  * `just run_tests`
  * `just run_install`
* x402-spring-boot-starter
  * Intellij  / analyse / inspect code
  * Check TODO list
  * Change `mogami.commons.version` to latest snapshot.
  * Change `mogami.java-client.version` to latest snapshot.
  * `just run_tests`
  * `just run_install`
* x402-facilitator
  * Intellij  / analyse / inspect code
  * Check TODO list
  * Change `mogami.commons.version` to latest snapshot.
  * Change `mogami.java-client.version` to latest snapshot.
  * `just run_tests`
  * `just build_docker_image`
* x402-example-server
  * Intellij  / analyse / inspect code
  * Check TODO list
  * Change `mogami.spring-boot-starter.version` to latest snapshot.
  * Change `mogami.java-client.version` to latest snapshot.

### Run a payment with a local facilitator on Base Sepolia.

Start a local docker facilitator:

```bash
docker run 	-e PORT=4020 \
		-p 4020:8080 \
		mogamitech/facilitator:latest
```

Get the example projet and run the tests with:

```bash
just run_tests_local_facilitator
```

You can check the balance of our two test addresses here:\
\- [0xf6b42050A71Ca13f842eDa53C7d31B7C1BD94F6E](https://sepolia.basescan.org/address/0xf6b42050A71Ca13f842eDa53C7d31B7C1BD94F6E#tokentxns) (payer)\
\- [0x375605671ddA2d461E333Cfa51F5b53763E8C585](https://sepolia.basescan.org/address/0x375605671ddA2d461E333Cfa51F5b53763E8C585#tokentxns) (provider)

You can check the payment on the facilitator debug console : <http://localhost:4020>.

### Run a payment with a local facilitator on Base Mainnet.

Start a local docker facilitator:&#x20;

```bash
docker run 	-e PORT=4020 \
		-e X402_FACILITATOR_PRIVATE_KEY=FACILITATOR_PRIVATE_KEY \
		-p 4020:8080 \
		mogamitech/facilitator:latest
```

Open a terminal and set the sender private key with this command:

```bash
export TIP_PRIVATE_KEY=SENDER_PRIVATE_KEY
```

The presence of `TIP_PRIVATE_KEY`  will force the example application to call the `/tip` api and pay for it.\
In the example project, just run the application with:&#x20;

<pre class="language-bash"><code class="lang-bash"><strong>just run_application_local_facilitator
</strong></code></pre>

You can check the balance of our two test addresses here:\
\- [0x375605671ddA2d461E333Cfa51F5b53763E8C585](https://basescan.org/address/0x375605671ddA2d461E333Cfa51F5b53763E8C585#tokentxns) (payer)\
\- [0x2306e12F56e45E698bFAfa9c5E7D4e77cDEb4d06](https://basescan.org/address/0x2306e12F56e45E698bFAfa9c5E7D4e77cDEb4d06#tokentxns) (provider)

You can check the payment on the facilitator debug console : <http://localhost:4020>.

### Release and update projects in that order

For each project use the two commands:

```bash
just start_release
```

and

```bash
just finish_release
```

* Start with [x402-commons](https://github.com/mogami-tech/x402-commons)
* Wait for [release to appear on Maven Central](https://central.sonatype.com/search?q=mogami)
* Change mogami library version and release [x402-java-client](https://github.com/mogami-tech/x402-java-client)
* Wait for [release to appear on Maven Central](https://central.sonatype.com/search?q=mogami)
* Make a release of [x402-facilitator](https://github.com/mogami-tech/x402-facilitator) and wait until it's deployed. Once deploy, check the launch logs to check if the configuration is correct.
* Change mogami library version and release [x402-spring-boot-starter](https://github.com/mogami-tech/x402-spring-boot-starter)
* Wait for [release to appear on Maven Central](https://central.sonatype.com/search?q=mogami)
* Update releases in projet [x402-examples](https://github.com/mogami-tech/x402-examples) and push.

### Run a payment with hosted facilitator on Base Sepolia.

**Warning**: Stop the local facilitator and remove the `TIP_PRIVATE_KEY` env variable.

Run the example using hosted facilitator:

```bash
just run_tests
```

You can check the balance of our two test addresses here:\
\- [0xf6b42050A71Ca13f842eDa53C7d31B7C1BD94F6E](https://sepolia.basescan.org/address/0xf6b42050A71Ca13f842eDa53C7d31B7C1BD94F6E#tokentxns) (payer)\
\- [0x375605671ddA2d461E333Cfa51F5b53763E8C585](https://sepolia.basescan.org/address/0x375605671ddA2d461E333Cfa51F5b53763E8C585#tokentxns) (provider)

### Run a payment with hosted facilitator on Base Mainnet.

Open a terminal, set the sender private key and the target URL with this command:

```bash
EXPORT TIP_PRIVATE_KEY=SENDER_PRIVATE_KEY
EXPORT TIP_URL=https://playground.mogami.tech/tip
```

And then, run:

```bash
just run_application
```

You can check the balance of our two test addresses here:

* [0x375605671ddA2d461E333Cfa51F5b53763E8C585](https://basescan.org/address/0x375605671ddA2d461E333Cfa51F5b53763E8C585#tokentxns)
* [0x2306e12F56e45E698bFAfa9c5E7D4e77cDEb4d06](https://basescan.org/address/0x2306e12F56e45E698bFAfa9c5E7D4e77cDEb4d06#tokentxns)

You can now release [x402-examples](https://github.com/mogami-tech/x402-examples).

### Documentation.

You can now update the documentation, *especially project versions*.
