Skip to content

Commit

Permalink
feat(open-payments): unauthed incoming payment get
Browse files Browse the repository at this point in the history
  • Loading branch information
BlairCurrey committed Sep 21, 2023
1 parent 5e40509 commit dad47ca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
21 changes: 17 additions & 4 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,9 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/incoming-payment-with-connection'
anyOf:
- $ref: '#/components/schemas/incoming-payment-with-connection'
- $ref: '#/components/schemas/public-incoming-payment'
examples:
Incoming Payment for $25 with $12.34 received so far:
value:
Expand Down Expand Up @@ -684,9 +686,6 @@ paths:
'404':
description: Incoming Payment Not Found
description: A client can fetch the latest state of an incoming payment to determine the amount received into the payment pointer.
parameters:
- $ref: '#/components/parameters/signature-input'
- $ref: '#/components/parameters/signature'
parameters:
- $ref: '#/components/parameters/id'
'/incoming-payments/{id}/complete':
Expand Down Expand Up @@ -1062,6 +1061,20 @@ components:
description: Endpoint that returns unique STREAM connection credentials to establish a STREAM connection to the underlying account.
readOnly: true
unevaluatedProperties: false
public-incoming-payment:
title: Public Incoming Payment
description: An **incoming payment** resource with public details.
type: object
examples:
- receivedAmount:
value: '0'
assetCode: USD
assetScale: 2
properties:
receiveAmount:
$ref: ./schemas.yaml#/components/schemas/amount
unresolvedProperites: false

outgoing-payment:
title: Outgoing Payment
description: 'An **outgoing payment** resource represents a payment that will be, is currently being, or has previously been, sent from the payment pointer.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ export interface components {
*/
ilpStreamConnection?: string;
};
/**
* Public Incoming Payment
* @description An **incoming payment** resource with public details.
*/
"public-incoming-payment": {
receiveAmount?: external["schemas.yaml"]["components"]["schemas"]["amount"];
};
/**
* Outgoing Payment
* @description An **outgoing payment** resource represents a payment that will be, is currently being, or has previously been, sent from the payment pointer.
Expand Down Expand Up @@ -611,18 +618,15 @@ export interface operations {
/** Sub-resource identifier */
id: components["parameters"]["id"];
};
header: {
/** The Signature-Input field is a Dictionary structured field containing the metadata for one or more message signatures generated from components within the HTTP message. Each member describes a single message signature. The member's key is the label that uniquely identifies the message signature within the context of the HTTP message. The member's value is the serialization of the covered components Inner List plus all signature metadata parameters identified by the label. The following components MUST be included: - "@method" - "@target-uri" - "authorization". When the message contains a request body, the covered components MUST also include the following: - "content-digest" The keyid parameter of the signature MUST be set to the kid value of the JWK. See [ietf-httpbis-message-signatures](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures#section-4.1) for more details. */
"Signature-Input": components["parameters"]["signature-input"];
/** The signature generated based on the Signature-Input, using the signing algorithm specified in the "alg" field of the JWK. */
Signature: components["parameters"]["signature"];
};
};
responses: {
/** Incoming Payment Found */
200: {
content: {
"application/json": components["schemas"]["incoming-payment-with-connection"];
"application/json": Partial<
components["schemas"]["incoming-payment-with-connection"]
> &
Partial<components["schemas"]["public-incoming-payment"]>;
};
};
401: components["responses"]["401"];
Expand Down

0 comments on commit dad47ca

Please sign in to comment.