Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c22aa3e
feat(docs): add local php snippets, updated docs
adrianboros Nov 25, 2025
40e3be7
feat(docs): small lint fix
adrianboros Nov 25, 2025
926d1cb
feat(docs): small updates
adrianboros Nov 25, 2025
b4766bf
feat(docs): guides php snippets
adrianboros Nov 26, 2025
156ae4b
Merge branch 'main' into 669-add-local-php-snippets
adrianboros Dec 2, 2025
2dcef2c
feat(docs): guides php snippets prettier fix
adrianboros Dec 2, 2025
1a7da48
Update docs/src/content/docs/guides/accept-otp-online-purchase.mdx
adrianboros Dec 6, 2025
5305f53
Update docs/src/content/docs/guides/onetime-remittance-fixed-debit.mdx
adrianboros Dec 6, 2025
7d2e415
Update docs/src/content/docs/guides/onetime-remittance-fixed-debit.mdx
adrianboros Dec 6, 2025
a10c1b2
Merge branch 'main' into 669-add-local-php-snippets
adrianboros Dec 7, 2025
2e49be0
feat(docs): format docs
adrianboros Dec 7, 2025
88b0475
Merge branch 'main' into 669-add-local-php-snippets
adrianboros Jan 12, 2026
f7bff45
feat(docs): add inline php snippets instead of ChunkedSnippet
adrianboros Jan 14, 2026
266c690
feat(docs): remove php snippets used by ChunkedSnippet
adrianboros Jan 14, 2026
8a62ab2
feat(docs): guides fix snippets order and add missing snippets
adrianboros Jan 15, 2026
c2c177d
feat(docs): small formatting issue and add missing go snippets (from …
adrianboros Jan 15, 2026
097aa50
feat(docs): add php snippets to es guides and fix platform/merchant w…
adrianboros Jan 15, 2026
a3ccadb
feat(docs): fix tabItem label for php
adrianboros Jan 15, 2026
b6ac13c
feat(docs): fix format
adrianboros Jan 15, 2026
a2079af
feat(docs): fix php snippets initial indentation and small fixes
adrianboros Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions docs/src/content/docs/guides/accept-otp-online-purchase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ Call the <Badge text="GET" variant="note" /> [Get Wallet Address API](/apis/wall
```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$customerWalletAddress = $client->walletAddress()->get([
'url' => 'https://cloudninebank.example.com/customer'
]);
$retailerWalletAddress = $client->walletAddress()->get([
'url' => 'https://happylifebank.example.com/retailer'
]);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -147,6 +157,25 @@ let retailer_incoming_payment_grant = client

```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$retailerIncomingPaymentGrant = $client->grant()->request(
[
'url' => $retailerWalletAddress->authServer
],
[
'access_token' => [
'access' => [
[
'type' => 'incoming-payment',
'actions' => ['create']
]
]
]
]
);
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -229,6 +258,24 @@ Some(&retailer_incoming_payment_grant.access_token.value),

```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$retailerIncomingPayment = $client->incomingPayment()->create(
[
'url' => $retailerWalletAddress->resourceServer,
'accessToken' => $retailerIncomingPaymentGrant->access_token->value
],
[
'walletAddress' => $retailerWalletAddress->id,
'incomingAmount' => [
'value' => '140000',
'assetCode' => 'MXN',
'assetScale' => 2
]
]
);
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -308,6 +355,25 @@ let customer_quote_grant = client

```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$customerQuoteGrant = $client->grant()->request(
[
'url' => $customerWalletAddress->authServer
],
[
'access_token' => [
'access' => [
[
'type' => 'quote',
'actions' => ['create']
]
]
]
]
);
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -388,6 +454,21 @@ Some(&customer_quote_grant.access_token.value),

```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$customerQuote = $client->quote()->create(
[
'url' => $customerWalletAddress->resourceServer,
'accessToken' => $customerQuoteGrant->access_token->value
],
[
'method' => 'ilp',
'walletAddress' => $customerWalletAddress->id,
'receiver' => $retailerIncomingPayment->id
]
);
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -503,6 +584,41 @@ let pending_customer_outgoing_payment_grant = client
```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$pendingCustomerOutgoingPaymentGrant = $client->grant()->request(
[
'url' => $customerWalletAddress->authServer
],
[
'access_token' => [
'access' => [
[
'identifier' => $customerWalletAddress->id,
'type' => 'outgoing-payment',
'actions' => ['create'],
'limits' => [
'debitAmount' => [
'assetCode' => 'MXN',
'assetScale' => 2,
'value' => '140000'
]
]
]
]
],
'interact' => [
'start' => ['redirect'],
'finish' => [
'method' => 'redirect',
'uri' => 'https://paymentplatform.example/finish/{...}', // where to redirect the customer after they've completed the interaction
'nonce' => 'NONCE'
]
]
]
);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -587,6 +703,19 @@ Some(&continue_field.access_token.value),

```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$customerOutgoingPaymentGrant = $client->grant()->continue(
[
'url' => $pendingCustomerOutgoingPaymentGrant->continue->uri,
'accessToken' => $pendingCustomerOutgoingPaymentGrant->continue->access_token->value
],
[
'interact_ref' => $interactRef
]
);
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -664,6 +793,20 @@ let customer_outgoing_payment_to_retailer = client
```

</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$customerOutgoingPayment = $client->outgoingPayment()->create(
[
'url' => $customerWalletAddress->resourceServer,
'accessToken' => $customerOutgoingPaymentGrant->access_token->value
],
[
'walletAddress' => $customerWalletAddress->id,
'quoteId' => $customerQuote->id
]
);
```
</TabItem>
</Tabs>

If the request fails because of an expired quote, [request a new quote](#5-request-the-creation-of-a-quote-resource) and try again.
Expand Down
136 changes: 136 additions & 0 deletions docs/src/content/docs/guides/onetime-remittance-fixed-debit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ Call the <Badge text="GET" variant="note" /> [Get Wallet Address API](/apis/wall
let recipient_wallet_address = client.wallet_address().get("https://happylifebank.example.com/recipient").await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$senderWalletAddress = $client->walletAddress()->get([
'url' => 'https://cloudninebank.example.com/sender'
]);
$recipientWalletAddress = $client->walletAddress()->get([
'url' => 'https://happylifebank.example.com/recipient'
]);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -156,6 +166,22 @@ This call obtains an access token that allows your app to request that an incomi
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$recipientIncomingPaymentGrant = $client->grant()->request([
'url' => $recipientWalletAddress->authServer
], [
'access_token' => [
'access' => [
[
'type' => 'incoming-payment',
'actions' => ['create']
]
]
]
]);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -224,6 +250,16 @@ This call requests an incoming payment resource be created on the recipient's wa
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$recipientIncomingPayment = $client->incomingPayment()->create([
'url' => $recipientWalletAddress->resourceServer,
'accessToken' => $recipientIncomingPaymentGrant->access_token->value
], [
'walletAddress' => $recipientWalletAddress->id
]);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -292,6 +328,24 @@ This call obtains an access token that allows your app to request that a quote r
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$senderQuoteGrant = $client->grant()->request(
[
'url' => $senderWalletAddress->authServer
],
[
'access_token' => [
'access' => [
[
'type' => 'quote',
'actions' => ['create']
]
]
]
]);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -373,6 +427,26 @@ The `debitAmount` specifies that the sender will pay exactly $100 USD, and the r
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$senderQuote = $client->quote()->create(
[
'url' => $senderWalletAddress->resourceServer,
'accessToken' => $senderQuoteGrant->access_token->value
],
[
'method' => 'ilp',
'walletAddress' => $senderWalletAddress->id,
'receiver' => $recipientIncomingPayment->id,
'debitAmount' => [
'value' => '10000',
'assetCode' => 'USD',
'assetScale' => 2
]
]
);
```
</TabItem>
</Tabs>

The response returns a `receiveAmount`, a `debitAmount`, and other required information.
Expand Down Expand Up @@ -505,6 +579,41 @@ let pending_sender_outgoing_payment_grant = client

````
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$pendingSenderOutgoingPaymentGrant = $client->grant()->request(
[
'url' => $senderWalletAddress->authServer
],
[
'access_token' => [
'access' => [
[
'identifier' => $senderWalletAddress->id,
'type' => 'outgoing-payment',
'actions' => ['create'],
'limits' => [
'debitAmount' => [
'assetCode' => 'USD',
'assetScale' => 2,
'value' => '10000'
]
]
]
]
],
'interact' => [
'start' => ['redirect'],
'finish' => [
'method' => 'redirect',
'uri' => 'https://myapp.example.com/finish/{...}', // where to redirect your user after they've completed the interaction
'nonce' => 'NONCE'
]
]
]
);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -583,6 +692,19 @@ Include the `interact_ref` returned in the redirect URI's query parameters.
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$senderOutgoingPaymentGrant = $client->grant()->continue(
[
'url' => $pendingSenderOutgoingPaymentGrant->continue->uri,
'accessToken' => $pendingSenderOutgoingPaymentGrant->continue->access_token->value
],
[
'interact_ref' => $interactRef
]
);
```
</TabItem>
</Tabs>

<details>
Expand Down Expand Up @@ -654,6 +776,20 @@ Use the access token returned in Step 9 to call the <Badge text="POST" variant="
.await?;
```
</TabItem>
<TabItem label="PHP" icon='seti:php'>
```php wrap
$senderOutgoingPayment = $client->outgoingPayment()->create(
[
'url' => $senderWalletAddress->resourceServer,
'accessToken' => $senderOutgoingPaymentGrant->access_token->value
],
[
'walletAddress' => $senderWalletAddress->id,
'quoteId' => $senderQuote->id
]
);
```
</TabItem>
</Tabs>

If the request fails because of an expired quote, [request a new quote](#5-request-the-creation-of-a-quote-resource) and try again.
Expand Down
Loading