Skip to content

Commit cd5677d

Browse files
committed
Add user info request webhook, make bank account info optional during user creation
1 parent 187bed3 commit cd5677d

File tree

7 files changed

+50
-18
lines changed

7 files changed

+50
-18
lines changed

docusaurus-docs/docs/receiving-payments.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The process consists of five main steps:
4343
1. **Platform configuration** (one-time setup) to set your UMA domain and required counterparty fields
4444
2. **Register users** with their bank account information so they can receive payments
4545
3. **Set up webhook endpoints** to receive notifications about incoming payments
46-
4. **Receive and approve/reject incoming payments** via webhooks
46+
4. **Provide user information and approve/reject incoming payments** via webhooks
4747
5. **Receive completion notification** when the payment completes
4848

4949
## Step 1: Platform configuration (one-time setup)
@@ -122,12 +122,13 @@ When someone initiates a payment to one of your users' UMA addresses, you'll rec
122122
},
123123
"reconciliationInstructions": {
124124
"reference": "REF-123456789"
125-
},
126-
"requestedReceiverUserInfoFields": [
127-
{ "name": "NATIONALITY", "mandatory": true },
128-
{ "name": "FULL_NAME", "mandatory": true }
129-
]
125+
}
130126
},
127+
"requestedReceiverUserInfoFields": [
128+
{ "name": "NATIONALITY", "mandatory": true },
129+
{ "name": "FULL_NAME", "mandatory": true }
130+
],
131+
"requiresBankAccountInfo": true,
131132
"timestamp": "2023-08-15T14:32:00Z",
132133
"webhookId": "Webhook:019542f5-b3e7-1d02-0000-000000000007",
133134
"type": "INCOMING_PAYMENT"
@@ -142,8 +143,8 @@ You have two options for approving or rejecting the payment:
142143

143144
To approve the payment synchronously, respond with a `200 OK` status:
144145

145-
- If the `requestedReceiverUserInfoFields` array was present in the webhook request and contained mandatory fields, your `200 OK` response **must** include a JSON body containing a `receiverUserInfo` object. This object should contain the key-value pairs for the information fields that were requested.
146-
- If `requestedReceiverUserInfoFields` was not present, was empty, or contained only non-mandatory fields for which you have no information, your `200 OK` response can have an empty body.
146+
- If the `requestedReceiverUserInfoFields` array was present in the webhook request and contained mandatory fields, your `200 OK` response **must** include a JSON body containing a `receiverUserInfo` object. This object should contain the key-value pairs for the information fields that were requested. If `requiresBankAccountInfo` was `true` in the webhook request, your response must also include your user's `bankAccountInfo`.
147+
- If `requestedReceiverUserInfoFields` was not present, was empty, or contained only non-mandatory fields for which you have no information and `requiresBankAccountInfo` was false, your `200 OK` response can have an empty body.
147148

148149
Example `200 OK` response body when information was requested and provided:
149150

@@ -152,6 +153,10 @@ Example `200 OK` response body when information was requested and provided:
152153
"receiverUserInfo": {
153154
"NATIONALITY": "US",
154155
"FULL_NAME": "John Receiver"
156+
},
157+
"bankAccountInfo": {
158+
"vpa": "receiver@psp",
159+
"accountType": "UPI"
155160
}
156161
}
157162
```
@@ -190,6 +195,10 @@ Request body (if information was requested):
190195
"receiverUserInfo": {
191196
"NATIONALITY": "US",
192197
"FULL_NAME": "John Receiver"
198+
},
199+
"bankAccountInfo": {
200+
"vpa": "receiver@psp",
201+
"accountType": "UPI"
193202
}
194203
}
195204
```

openapi.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,7 @@ webhooks:
23592359
Webhook received successfully.
23602360
For PENDING transactions, this indicates approval to proceed with the payment.
23612361
If `requestedReceiverUserInfoFields` were present in the webhook request, the corresponding fields for the recipient must be included in this response in the `receiverUserInfo` object.
2362+
If `requiresBankAccountInfo` is true, the platform must include the bank account information in the webhook response in the `bankAccountInfo` object.
23622363
content:
23632364
application/json:
23642365
schema:
@@ -2787,8 +2788,6 @@ components:
27872788
allOf:
27882789
- $ref: '#/components/schemas/User'
27892790
- type: object
2790-
required:
2791-
- bankAccountInfo
27922791
properties:
27932792
fullName:
27942793
type: string
@@ -3527,6 +3526,10 @@ components:
35273526
type: string
35283527
description: UMA domain for this platform
35293528
example: platform.uma.domain
3529+
proxyUmaaasSubdomain:
3530+
type: string
3531+
description: The subdomain that incoming requests will be proxied to
3532+
example: platform
35303533
webhookEndpoint:
35313534
type: string
35323535
description: URL where webhook notifications will be sent
@@ -4335,7 +4338,11 @@ components:
43354338
type: array
43364339
items:
43374340
$ref: '#/components/schemas/CounterpartyFieldDefinition'
4338-
description: Information required by the sender's VASP about the recipient. Platform must provide these in the 200 OK response if approving. Note that this only includes fields which UMAaaS does not already have from initial user registration.
4341+
description: Information required by the sender's VASP or the banking provider about the recipient. Platform must provide these in the 200 OK response if approving. Note that this only includes fields which UMAaaS does not already have from initial user registration.
4342+
requiresBankAccountInfo:
4343+
type: boolean
4344+
description: Whether the platform needs to provide the bank account information in the webhook response. Note that this is only applicable if bank account information was not provided during initial user registration.
4345+
example: true
43394346
BaseWebhook:
43404347
type: object
43414348
required:
@@ -4429,6 +4436,9 @@ components:
44294436
type: object
44304437
additionalProperties: true
44314438
description: Information about the recipient, provided by the platform if requested in the webhook via `requestedReceiverUserInfoFields` and the payment is approved.
4439+
bankAccountInfo:
4440+
$ref: '#/components/schemas/UserBankAccountInfo'
4441+
description: Bank account information, provided by the platform if `requiresBankAccountInfo` is true.
44324442
IncomingPaymentWebhookForbiddenResponse:
44334443
allOf:
44344444
- $ref: '#/components/schemas/Error'

openapi/components/schemas/transactions/IncomingTransaction.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ allOf:
99
description: Amount received in the recipient's currency
1010
reconciliationInstructions:
1111
$ref: ../common/ReconciliationInstructions.yaml
12-
description: Included for all transactions except those with "CREATED" status
12+
description: Present when available; this varies by region and banking provider and may not be included until "COMPLETED" status
1313
rateDetails:
1414
$ref: ./IncomingRateDetails.yaml
1515
description: Details about the rate and fees for the transaction.

openapi/components/schemas/users/IndividualUser.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
allOf:
22
- $ref: ./User.yaml
33
- type: object
4-
required:
5-
- bankAccountInfo
64
properties:
75
fullName:
86
type: string

openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ allOf:
1515
items:
1616
$ref: ../common/CounterpartyFieldDefinition.yaml
1717
description: >-
18-
Information required by the sender's VASP about the recipient.
19-
Platform must provide these in the 200 OK response if approving.
20-
Note that this only includes fields which UMAaaS does not
21-
already have from initial user registration.
18+
Information required by the sender's VASP or the banking provider
19+
about the recipient. Platform must provide these in the 200 OK
20+
response if approving. Note that this only includes fields which
21+
UMAaaS does not already have from initial user registration.
22+
requiresBankAccountInfo:
23+
type: boolean
24+
description: >-
25+
Whether the platform needs to provide the bank account information
26+
in the webhook response. Note that this is only applicable if bank
27+
account information was not provided during initial user registration.
28+
example: true

openapi/components/schemas/webhooks/IncomingPaymentWebhookResponse.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ properties:
77
Information about the recipient, provided by the platform if
88
requested in the webhook via `requestedReceiverUserInfoFields`
99
and the payment is approved.
10+
bankAccountInfo:
11+
$ref: '../users/UserBankAccountInfo.yaml'
12+
description: >-
13+
Bank account information, provided by the platform if
14+
`requiresBankAccountInfo` is true.

openapi/webhooks/incoming-payment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ post:
136136
If `requestedReceiverUserInfoFields` were present in the webhook
137137
request, the corresponding fields for the recipient must be included in
138138
this response in the `receiverUserInfo` object.
139+
140+
If `requiresBankAccountInfo` is true, the platform must include the bank
141+
account information in the webhook response in the `bankAccountInfo` object.
139142
content:
140143
application/json:
141144
schema:

0 commit comments

Comments
 (0)