Skip to content

Commit 87a704f

Browse files
committed
feat(client): align php client with contracts v0.6.0
1 parent f9139b0 commit 87a704f

16 files changed

Lines changed: 378 additions & 300 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.6.0] - 2026-03-03
9+
10+
### Added
11+
- Added request listing support in `RequestsApi`:
12+
- `GET /v2/request` via `RequestsApi::list()`
13+
- Added `SecurePaymentsApi` domain support for:
14+
- `GET /v2/secure-payments` via `SecurePaymentsApi::findByRequestId()`
15+
- `POST /v2/secure-payments` via `SecurePaymentsApi::create()`
16+
- `GET /v2/secure-payments/{token}` via `SecurePaymentsApi::getByToken()`
17+
18+
### Changed
19+
- Synced bundled OpenAPI/contracts assets to `@marcohefti/request-network-api-contracts@0.6.0`.
20+
- Regenerated OpenAPI operation + schema manifest artifacts from the synced contracts.
21+
22+
### Removed
23+
- Removed obsolete `PayeeDestinationApi` domain and related tests because `v0.6.0` contracts no longer include payee-destination endpoints.
24+
25+
### Documentation
26+
- Updated README API coverage summary to include secure payments and request listing.
27+
828
## [0.5.4] - 2026-02-20
929

1030
### Added
@@ -105,6 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
105125

106126
## Version History
107127

128+
- **0.6.x** - Contracts v0.6 alignment (secure payments + request listing, payee-destination removed)
108129
- **0.5.x** - Initial public release with full feature parity to TypeScript client
109130
- **0.x** - Pre-release versions, may contain breaking changes between minor versions
110131
- **1.0.0** - Planned stable release following strict SemVer

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Instead of manually building HTTP requests and handling errors, this client prov
7070

7171
## What this client covers
7272

73-
- PHPfirst `RequestClient` with facades for requests, payouts, payments, payer/compliance (v1+v2),
74-
payee destination, client IDs, currencies (v1+v2), and legacy pay.
73+
- PHP-first `RequestClient` with facades for requests (including request listing), payouts, payments,
74+
secure payments, payer/compliance (v1+v2), client IDs, currencies (v1+v2), and legacy pay.
7575
- Shared HTTP pipeline with retry, logging, and runtime validation driven by the synced OpenAPI spec.
7676
- Webhook utilities: signature verifier, typed event objects, parser, dispatcher, PSR‑15 middleware, and
7777
testing helpers that mirror the TypeScript webhook module.

generated/OpenApi/Operations.php

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,23 @@ final class Operations
276276
429
277277
]
278278
],
279+
'RequestControllerV2_listRequests_v2' => [
280+
'method' => 'GET',
281+
'path' => '/v2/request',
282+
'tags' => [
283+
'Request',
284+
'V2/Request'
285+
],
286+
'summary' => 'List requests',
287+
'hasJsonRequest' => false,
288+
'successStatuses' => [
289+
200
290+
],
291+
'errorStatuses' => [
292+
400,
293+
429
294+
]
295+
],
279296
'RequestControllerV2_createRequest_v2' => [
280297
'method' => 'POST',
281298
'path' => '/v2/request',
@@ -290,7 +307,7 @@ final class Operations
290307
],
291308
'errorStatuses' => [
292309
400,
293-
404,
310+
403,
294311
429
295312
]
296313
],
@@ -689,43 +706,29 @@ final class Operations
689706
429
690707
]
691708
],
692-
'PayeeDestinationController_getSigningData_v2' => [
693-
'method' => 'GET',
694-
'path' => '/v2/payee-destination/signing-data',
695-
'tags' => [
696-
'V2/Payee Destination'
697-
],
698-
'summary' => 'Get EIP-712 signing data with nonce',
699-
'hasJsonRequest' => false,
700-
'successStatuses' => [
701-
200
702-
],
703-
'errorStatuses' => [
704-
429
705-
]
706-
],
707-
'PayeeDestinationController_getActivePayeeDestination_v2' => [
709+
'SecurePaymentController_findSecurePayment_v2' => [
708710
'method' => 'GET',
709-
'path' => '/v2/payee-destination',
711+
'path' => '/v2/secure-payments',
710712
'tags' => [
711-
'V2/Payee Destination'
713+
'V2/Secure Payment'
712714
],
713-
'summary' => 'Get active payee destination for wallet',
715+
'summary' => 'Find secure payment by request ID',
714716
'hasJsonRequest' => false,
715717
'successStatuses' => [
716718
200
717719
],
718720
'errorStatuses' => [
721+
404,
719722
429
720723
]
721724
],
722-
'PayeeDestinationController_createPayeeDestination_v2' => [
725+
'SecurePaymentController_createSecurePayment_v2' => [
723726
'method' => 'POST',
724-
'path' => '/v2/payee-destination',
727+
'path' => '/v2/secure-payments',
725728
'tags' => [
726-
'V2/Payee Destination'
729+
'V2/Secure Payment'
727730
],
728-
'summary' => 'Create payee destination',
731+
'summary' => 'Create a secure payment entry',
729732
'hasJsonRequest' => true,
730733
'successStatuses' => [
731734
201
@@ -734,35 +737,21 @@ final class Operations
734737
429
735738
]
736739
],
737-
'PayeeDestinationController_getPayeeDestination_v2' => [
740+
'SecurePaymentController_getSecurePaymentByToken_v2' => [
738741
'method' => 'GET',
739-
'path' => '/v2/payee-destination/{destinationId}',
742+
'path' => '/v2/secure-payments/{token}',
740743
'tags' => [
741-
'V2/Payee Destination'
744+
'V2/Secure Payment'
742745
],
743-
'summary' => 'Get payee destination by ID',
746+
'summary' => 'Get secure payment data by token',
744747
'hasJsonRequest' => false,
745748
'successStatuses' => [
746749
200
747750
],
748751
'errorStatuses' => [
752+
403,
749753
404,
750-
429
751-
]
752-
],
753-
'PayeeDestinationController_deactivatePayeeDestination_v2' => [
754-
'method' => 'DELETE',
755-
'path' => '/v2/payee-destination/{destinationId}',
756-
'tags' => [
757-
'V2/Payee Destination'
758-
],
759-
'summary' => 'Deactivate payee destination',
760-
'hasJsonRequest' => true,
761-
'successStatuses' => [
762-
200
763-
],
764-
'errorStatuses' => [
765-
400,
754+
409,
766755
429
767756
]
768757
]

generated/Validation/Schemas/index.json

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generatedAt": "2026-02-20T18:48:24.099Z",
2+
"generatedAt": "2026-03-03T11:21:34.027Z",
33
"specPath": "specs/openapi/request-network-openapi.json",
44
"entries": [
55
{
@@ -54,22 +54,6 @@
5454
},
5555
"pointer": "/paths/~1v2~1client-ids~1{id}/put/responses/200/content/application~1json/schema"
5656
},
57-
{
58-
"key": {
59-
"operationId": "PayeeDestinationController_createPayeeDestination_v2",
60-
"kind": "request",
61-
"variant": "application/json"
62-
},
63-
"pointer": "/paths/~1v2~1payee-destination/post/requestBody/content/application~1json/schema"
64-
},
65-
{
66-
"key": {
67-
"operationId": "PayeeDestinationController_deactivatePayeeDestination_v2",
68-
"kind": "request",
69-
"variant": "application/json"
70-
},
71-
"pointer": "/paths/~1v2~1payee-destination~1{destinationId}/delete/requestBody/content/application~1json/schema"
72-
},
7357
{
7458
"key": {
7559
"operationId": "PayerV1Controller_createPaymentDetails_v1",
@@ -542,6 +526,15 @@
542526
},
543527
"pointer": "/paths/~1v2~1request~1{requestId}/get/responses/200/content/application~1json/schema"
544528
},
529+
{
530+
"key": {
531+
"operationId": "RequestControllerV2_listRequests_v2",
532+
"kind": "response",
533+
"variant": "application/json",
534+
"status": 200
535+
},
536+
"pointer": "/paths/~1v2~1request/get/responses/200/content/application~1json/schema"
537+
},
545538
{
546539
"key": {
547540
"operationId": "RequestControllerV2_sendPaymentIntent_v2",
@@ -557,6 +550,41 @@
557550
"variant": "application/json"
558551
},
559552
"pointer": "/paths/~1v2~1request~1{requestId}/patch/requestBody/content/application~1json/schema"
553+
},
554+
{
555+
"key": {
556+
"operationId": "SecurePaymentController_createSecurePayment_v2",
557+
"kind": "request",
558+
"variant": "application/json"
559+
},
560+
"pointer": "/paths/~1v2~1secure-payments/post/requestBody/content/application~1json/schema"
561+
},
562+
{
563+
"key": {
564+
"operationId": "SecurePaymentController_createSecurePayment_v2",
565+
"kind": "response",
566+
"variant": "application/json",
567+
"status": 201
568+
},
569+
"pointer": "/paths/~1v2~1secure-payments/post/responses/201/content/application~1json/schema"
570+
},
571+
{
572+
"key": {
573+
"operationId": "SecurePaymentController_findSecurePayment_v2",
574+
"kind": "response",
575+
"variant": "application/json",
576+
"status": 200
577+
},
578+
"pointer": "/paths/~1v2~1secure-payments/get/responses/200/content/application~1json/schema"
579+
},
580+
{
581+
"key": {
582+
"operationId": "SecurePaymentController_getSecurePaymentByToken_v2",
583+
"kind": "response",
584+
"variant": "application/json",
585+
"status": 200
586+
},
587+
"pointer": "/paths/~1v2~1secure-payments~1{token}/get/responses/200/content/application~1json/schema"
560588
}
561589
]
562590
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"license": "MIT",
1717
"type": "commonjs",
1818
"devDependencies": {
19-
"@marcohefti/request-network-api-contracts": "^0.5.0"
19+
"@marcohefti/request-network-api-contracts": "^0.6.0"
2020
}
2121
}

specs/meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"generatedAt": "2026-02-20T18:47:31.512Z",
2+
"generatedAt": "2026-03-03T11:21:33.788Z",
33
"files": {
4-
"openapi/request-network-openapi.json": "ffffcd0d757ef1158c642f8e738aee0e9d6cf3cae6545ad2e5b26ea870a19b50",
5-
"openapi/request-network-openapi.meta.json": "de6d0b13e829cacc95c0952f50603aad769500737d1eddf0659bd99cab27c1f0",
4+
"openapi/request-network-openapi.json": "badd3879103274935e52aa6a277c741c6ad22e801e38c1ee7f4e6b4b820544b5",
5+
"openapi/request-network-openapi.meta.json": "73c3f8bc7e57073361f20f79aa11d26a472619be49b9439a7190f8f448a44a35",
66
"webhooks/request-network-webhooks.json": "9438ad001651a8459a202d37e873516e05ffe6aeb29efead68bb58b948a5c494",
77
"fixtures/webhooks/compliance-approved.json": "2a4a0d4acd7bb568c291aea43f669aecc717a23fd39b6c49e5a8934bfc1ef36c",
88
"fixtures/webhooks/compliance-pending.json": "194c15cd4f4f67cf70d3f3a6ccb5eacc767bdfc43fd88f1d534f102f4568ca1e",

specs/openapi/request-network-openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"url": "https://api.request.network/open-api/openapi.json",
3-
"fetchedAt": "2026-02-20T18:46:04.642Z",
3+
"fetchedAt": "2026-03-03T11:14:08.930Z",
44
"etag": null,
55
"lastModified": null
66
}

0 commit comments

Comments
 (0)