Skip to content

Commit 7d197f3

Browse files
authored
feat(webhook): provide grant id in outgoing payment events (#3335)
1 parent 3d40648 commit 7d197f3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/backend/src/open_payments/payment/outgoing/model.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ export class OutgoingPayment
187187
if (this.peerId) {
188188
data.peerId = this.peerId
189189
}
190+
191+
if (this.grantId) {
192+
data.grantId = this.grantId
193+
}
190194
return data
191195
}
192196

@@ -274,6 +278,7 @@ export type PaymentData = Omit<OutgoingPaymentResponse, 'failed'> & {
274278
stateAttempts: number
275279
balance: string
276280
peerId?: string
281+
grantId?: string
277282
}
278283

279284
export const isOutgoingPaymentEventType = (

packages/backend/src/openapi/specs/webhooks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ components:
250250
peerId:
251251
type: string
252252
format: uuid
253+
grantId:
254+
type: string
255+
format: uuid
253256
additionalProperties: false
254257
walletAddressNotFound:
255258
required:

0 commit comments

Comments
 (0)