Skip to content

Commit c66444f

Browse files
author
Jon M
committed
fix: formatting on mdx docs
1 parent 666f83b commit c66444f

2 files changed

Lines changed: 47 additions & 43 deletions

File tree

src/content/docs/developers/about-receiving.mdx

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -106,50 +106,54 @@ The examples below are simplified representations of the Open Payments API calls
106106
</Disclosure>
107107

108108
4. The agent issues a <LinkOut href="https://openpayments.dev/apis/auth-server/operations/post-request/"><Badge text="POST" variant="success" size="small" /></LinkOut> request to your wallet provider's `authServer` URL. The request contains the access permissions the agent is requesting.
109+
109110
<Disclosure toggleText="Example request" client:load>
110111

111-
```http
112-
POST /auth/ HTTP/1.1
113-
Accept: application/json
114-
Content-Type: application/json
115-
Host: wallet.example
116-
{
117-
"access_token": {
112+
```http
113+
POST /auth/ HTTP/1.1
114+
Accept: application/json
115+
Content-Type: application/json
116+
Host: wallet.example
117+
{
118+
"access_token": {
119+
"access": [
120+
{
121+
"type": "incoming-payment",
122+
"actions": ["create", "read"],
123+
"identifier": "https://wallet.example/alice"
124+
}
125+
]
126+
},
127+
"client": "https://cloudninewallet.example/visitor"
128+
}
129+
```
130+
131+
:::note
132+
The `client` in the request above is your visitor's wallet address. This URL is only used by the agent and the wallets, and isn't available to the website.
133+
:::
134+
135+
</Disclosure>
136+
5. The response to the agent contains an access token that the agent needs to make its next request.
137+
138+
<Disclosure toggleText="Example response" client:load>
139+
140+
```http wrap
141+
{
142+
"access_token": {
143+
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
144+
"manage": "https://wallet.example/auth/token/dd17a202-9982-4ed9-ae31-564947fb6379",
118145
"access": [
119146
{
120147
"type": "incoming-payment",
121148
"actions": ["create", "read"],
122149
"identifier": "https://wallet.example/alice"
123150
}
124151
]
125-
},
126-
"client": "https://cloudninewallet.example/visitor"
127-
}
128-
```
129-
130-
:::note
131-
The `client` in the request above is your visitor's wallet address. This URL is only used by the agent and the wallets, and isn't available to the website.
132-
:::
133-
134-
</Disclosure>
135-
5. The response to the agent contains an access token that the agent needs to make its next request.
136-
<Disclosure toggleText="Example response" client:load>
137-
```http wrap
138-
{
139-
"access_token": {
140-
"value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
141-
"manage": "https://wallet.example/auth/token/dd17a202-9982-4ed9-ae31-564947fb6379",
142-
"access": [
143-
{
144-
"type": "incoming-payment",
145-
"actions": ["create", "read"],
146-
"identifier": "https://wallet.example/alice"
147152
}
148-
]
149153
}
150-
}
151-
```
152-
</Disclosure>
154+
```
155+
156+
</Disclosure>
153157
6. The agent issues a <LinkOut href="https://openpayments.dev/apis/resource-server/operations/create-incoming-payment/"><Badge text="POST" variant="success" size="small" /></LinkOut> request to your wallet provider's `resourceServer` URL. The purpose of this call is to request the information needed by your visitor's wallet provider so their provider correctly addresses the payment to you.
154158
<Disclosure toggleText='Example request' client:load>
155159
```http wrap POST /alice/incoming-payments HTTP/1.1 Accept:

src/content/docs/developers/get-started.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ If you have a payment pointer, visit <LinkOut href='https://paymentpointers.org/
4343
```
4444

4545
2. Add the `<link>` to the `<head>` section of your page.
46-
````html title="Example" wrap
47-
<html>
48-
<head>
49-
<title>My Site</title>
50-
<link rel="monetization" href="https://wallet.example.com/alice">
51-
</head>
52-
</html>
53-
```
54-
</Steps>
55-
````
46+
```html title="Example" wrap
47+
<html>
48+
<head>
49+
<title>My Site</title>
50+
<link rel="monetization" href="https://wallet.example.com/alice">
51+
</head>
52+
</html>
53+
```
54+
55+
</Steps>
5656

5757
Congratulations! Your page is now web monetized. Add the `<link>` to any page of your site you want to monetize.
5858

0 commit comments

Comments
 (0)