nomba-python 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nomba/data/nomba_openapi.json +349 -54
- nomba/models.py +32 -3
- nomba/resources/virtual_accounts.py +84 -4
- {nomba_python-0.5.0.dist-info → nomba_python-0.5.1.dist-info}/METADATA +1 -1
- {nomba_python-0.5.0.dist-info → nomba_python-0.5.1.dist-info}/RECORD +7 -7
- {nomba_python-0.5.0.dist-info → nomba_python-0.5.1.dist-info}/WHEEL +1 -1
- {nomba_python-0.5.0.dist-info → nomba_python-0.5.1.dist-info}/licenses/LICENSE +0 -0
nomba/data/nomba_openapi.json
CHANGED
|
@@ -3586,6 +3586,153 @@
|
|
|
3586
3586
|
]
|
|
3587
3587
|
}
|
|
3588
3588
|
},
|
|
3589
|
+
"/v1/accounts/virtual/{identifier}/simulate-inflow": {
|
|
3590
|
+
"post": {
|
|
3591
|
+
"description": "Sandbox only. Simulates a bank transfer into a `SIMULATED` sandbox virtual account. It applies the same checks as a real inflow (account expiry, and sender name when `restrictInflowToAccountName` is `true`), sends the `payment_success` or `payment_failed` webhook, and records a successful inflow so [Transaction requery](/nomba-api-reference/requery/transaction-requery) can return it by `transactionRef`. A rejected inflow returns HTTP 200 with `data.status` set to `REJECTED`. Calling it on a `LIVE` account returns 400.",
|
|
3592
|
+
"operationId": "Simulate an inflow",
|
|
3593
|
+
"servers": [
|
|
3594
|
+
{
|
|
3595
|
+
"description": "Sandbox",
|
|
3596
|
+
"url": "https://sandbox.nomba.com"
|
|
3597
|
+
}
|
|
3598
|
+
],
|
|
3599
|
+
"parameters": [
|
|
3600
|
+
{
|
|
3601
|
+
"description": "The parent accountId of the business.",
|
|
3602
|
+
"in": "header",
|
|
3603
|
+
"name": "accountId",
|
|
3604
|
+
"schema": {
|
|
3605
|
+
"type": "string",
|
|
3606
|
+
"format": "uuid",
|
|
3607
|
+
"example": "890022ce-bae0-45c1-9b9d-ee7872e6ca27"
|
|
3608
|
+
},
|
|
3609
|
+
"required": true
|
|
3610
|
+
},
|
|
3611
|
+
{
|
|
3612
|
+
"description": "The account reference or account number of the `SIMULATED` virtual account.",
|
|
3613
|
+
"example": "sandbox-va-001",
|
|
3614
|
+
"in": "path",
|
|
3615
|
+
"name": "identifier",
|
|
3616
|
+
"required": true,
|
|
3617
|
+
"schema": {
|
|
3618
|
+
"type": "string",
|
|
3619
|
+
"example": "sandbox-va-001"
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
],
|
|
3623
|
+
"requestBody": {
|
|
3624
|
+
"required": true,
|
|
3625
|
+
"content": {
|
|
3626
|
+
"application/json": {
|
|
3627
|
+
"schema": {
|
|
3628
|
+
"$ref": "#/components/schemas/SimulateInflowRequest"
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3633
|
+
"responses": {
|
|
3634
|
+
"200": {
|
|
3635
|
+
"description": "The inflow was processed. Check `data.status` to see whether it was accepted.",
|
|
3636
|
+
"content": {
|
|
3637
|
+
"application/json": {
|
|
3638
|
+
"schema": {
|
|
3639
|
+
"type": "object",
|
|
3640
|
+
"properties": {
|
|
3641
|
+
"code": {
|
|
3642
|
+
"type": "string",
|
|
3643
|
+
"example": "00",
|
|
3644
|
+
"description": "Response Code"
|
|
3645
|
+
},
|
|
3646
|
+
"description": {
|
|
3647
|
+
"type": "string",
|
|
3648
|
+
"example": "SUCCESS",
|
|
3649
|
+
"description": "Response description"
|
|
3650
|
+
},
|
|
3651
|
+
"data": {
|
|
3652
|
+
"$ref": "#/components/schemas/SimulateInflowResponse"
|
|
3653
|
+
}
|
|
3654
|
+
},
|
|
3655
|
+
"required": [
|
|
3656
|
+
"code",
|
|
3657
|
+
"description",
|
|
3658
|
+
"data"
|
|
3659
|
+
]
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
},
|
|
3664
|
+
"400": {
|
|
3665
|
+
"content": {
|
|
3666
|
+
"application/json": {
|
|
3667
|
+
"schema": {
|
|
3668
|
+
"$ref": "#/components/schemas/RequestError"
|
|
3669
|
+
}
|
|
3670
|
+
}
|
|
3671
|
+
},
|
|
3672
|
+
"description": "The request body sent by merchant did not pass the validation checks"
|
|
3673
|
+
},
|
|
3674
|
+
"401": {
|
|
3675
|
+
"content": {
|
|
3676
|
+
"application/json": {
|
|
3677
|
+
"schema": {
|
|
3678
|
+
"$ref": "#/components/schemas/AuthenticationError"
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
},
|
|
3682
|
+
"description": "The access_token provided to access the resource is missing or invalid."
|
|
3683
|
+
},
|
|
3684
|
+
"403": {
|
|
3685
|
+
"content": {
|
|
3686
|
+
"application/json": {
|
|
3687
|
+
"schema": {
|
|
3688
|
+
"$ref": "#/components/schemas/AuthorizationError"
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
},
|
|
3692
|
+
"description": "The client does not have the permissions to access this resource"
|
|
3693
|
+
},
|
|
3694
|
+
"404": {
|
|
3695
|
+
"content": {
|
|
3696
|
+
"application/json": {
|
|
3697
|
+
"schema": {
|
|
3698
|
+
"$ref": "#/components/schemas/RecordNotFoundError"
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
},
|
|
3702
|
+
"description": "The record that the client is trying to access does not exist."
|
|
3703
|
+
},
|
|
3704
|
+
"429": {
|
|
3705
|
+
"content": {
|
|
3706
|
+
"application/json": {
|
|
3707
|
+
"schema": {
|
|
3708
|
+
"$ref": "#/components/schemas/RateLimitError"
|
|
3709
|
+
}
|
|
3710
|
+
}
|
|
3711
|
+
},
|
|
3712
|
+
"description": "The client has maxed out the number of calls within a time period on this resource."
|
|
3713
|
+
},
|
|
3714
|
+
"500": {
|
|
3715
|
+
"content": {
|
|
3716
|
+
"application/json": {
|
|
3717
|
+
"schema": {
|
|
3718
|
+
"$ref": "#/components/schemas/ServerError"
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3721
|
+
},
|
|
3722
|
+
"description": "Downstream system error."
|
|
3723
|
+
}
|
|
3724
|
+
},
|
|
3725
|
+
"security": [
|
|
3726
|
+
{
|
|
3727
|
+
"BearerAuth": []
|
|
3728
|
+
}
|
|
3729
|
+
],
|
|
3730
|
+
"summary": "Simulate an inflow",
|
|
3731
|
+
"tags": [
|
|
3732
|
+
"Virtual Accounts"
|
|
3733
|
+
]
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3589
3736
|
"/v1/checkout/order": {
|
|
3590
3737
|
"post": {
|
|
3591
3738
|
"description": "You can use this endpoint to create an online checkout order. Load the URL returned in 'checkoutLink' property in a browser to allow your customer initiate payment.",
|
|
@@ -3769,8 +3916,8 @@
|
|
|
3769
3916
|
},
|
|
3770
3917
|
"description": {
|
|
3771
3918
|
"type": "string",
|
|
3772
|
-
"example": "
|
|
3773
|
-
"description": "
|
|
3919
|
+
"example": "tokenized transaction completed successfully",
|
|
3920
|
+
"description": "Response description. It says the transaction completed even when the charge was declined or needs an OTP, so read `data.status` and `data.otpRequired` instead."
|
|
3774
3921
|
},
|
|
3775
3922
|
"data": {
|
|
3776
3923
|
"$ref": "#/components/schemas/TokenizedCardPaymentResponse"
|
|
@@ -3896,7 +4043,7 @@
|
|
|
3896
4043
|
},
|
|
3897
4044
|
"/v1/checkout/tokenized-card-data": {
|
|
3898
4045
|
"get": {
|
|
3899
|
-
"description": "
|
|
4046
|
+
"description": "List the cards your customers have saved. Filter by customer email, or page through cards saved in a date range.",
|
|
3900
4047
|
"operationId": "List all tokenized cards for merchant",
|
|
3901
4048
|
"parameters": [
|
|
3902
4049
|
{
|
|
@@ -3911,7 +4058,7 @@
|
|
|
3911
4058
|
"required": true
|
|
3912
4059
|
},
|
|
3913
4060
|
{
|
|
3914
|
-
"description": "
|
|
4061
|
+
"description": "The email address the card was saved with. When you send it, Nomba returns all of that customer's cards in one response and ignores the other query parameters.",
|
|
3915
4062
|
"example": "abcde@gmail.com",
|
|
3916
4063
|
"in": "query",
|
|
3917
4064
|
"name": "customerEmail",
|
|
@@ -3920,25 +4067,25 @@
|
|
|
3920
4067
|
}
|
|
3921
4068
|
},
|
|
3922
4069
|
{
|
|
3923
|
-
"description": "Start date, based on the date the
|
|
3924
|
-
"example": "2023-08-
|
|
4070
|
+
"description": "Start date and time, based on the date the card was saved. Ignored when `customerEmail` is sent.",
|
|
4071
|
+
"example": "2023-08-08T00:00:00",
|
|
3925
4072
|
"in": "query",
|
|
3926
|
-
"name": "
|
|
4073
|
+
"name": "dateFrom",
|
|
3927
4074
|
"schema": {
|
|
3928
4075
|
"type": "string"
|
|
3929
4076
|
}
|
|
3930
4077
|
},
|
|
3931
4078
|
{
|
|
3932
|
-
"description": "
|
|
4079
|
+
"description": "End date and time, based on the date the card was saved. Defaults to now. Ignored when `customerEmail` is sent.",
|
|
3933
4080
|
"example": "2023-08-08T23:59:59",
|
|
3934
4081
|
"in": "query",
|
|
3935
|
-
"name": "
|
|
4082
|
+
"name": "dateTo",
|
|
3936
4083
|
"schema": {
|
|
3937
4084
|
"type": "string"
|
|
3938
4085
|
}
|
|
3939
4086
|
},
|
|
3940
4087
|
{
|
|
3941
|
-
"description": "
|
|
4088
|
+
"description": "Page number to return. Omit it, or send `0`, for the first page. Ignored when `customerEmail` is sent.",
|
|
3942
4089
|
"example": 0,
|
|
3943
4090
|
"in": "query",
|
|
3944
4091
|
"name": "page",
|
|
@@ -3946,6 +4093,16 @@
|
|
|
3946
4093
|
"type": "integer",
|
|
3947
4094
|
"format": "int32"
|
|
3948
4095
|
}
|
|
4096
|
+
},
|
|
4097
|
+
{
|
|
4098
|
+
"description": "Number of cards per page. Defaults to `50`. Ignored when `customerEmail` is sent.",
|
|
4099
|
+
"example": 50,
|
|
4100
|
+
"in": "query",
|
|
4101
|
+
"name": "limit",
|
|
4102
|
+
"schema": {
|
|
4103
|
+
"type": "integer",
|
|
4104
|
+
"format": "int32"
|
|
4105
|
+
}
|
|
3949
4106
|
}
|
|
3950
4107
|
],
|
|
3951
4108
|
"responses": {
|
|
@@ -3968,15 +4125,20 @@
|
|
|
3968
4125
|
"data": {
|
|
3969
4126
|
"type": "object",
|
|
3970
4127
|
"properties": {
|
|
4128
|
+
"hasNextPage": {
|
|
4129
|
+
"type": "boolean",
|
|
4130
|
+
"description": "`true` if there are more cards to fetch",
|
|
4131
|
+
"example": false
|
|
4132
|
+
},
|
|
3971
4133
|
"nextPage": {
|
|
3972
|
-
"type": "
|
|
4134
|
+
"type": "integer",
|
|
3973
4135
|
"format": "int32",
|
|
3974
|
-
"description": "The
|
|
3975
|
-
"example":
|
|
4136
|
+
"description": "The page to request next. `0` if there are no more pages.",
|
|
4137
|
+
"example": 0
|
|
3976
4138
|
},
|
|
3977
4139
|
"tokenizedCardDataList": {
|
|
3978
4140
|
"type": "array",
|
|
3979
|
-
"description": "
|
|
4141
|
+
"description": "The saved cards that match the request",
|
|
3980
4142
|
"items": {
|
|
3981
4143
|
"$ref": "#/components/schemas/TokenizedCardData"
|
|
3982
4144
|
}
|
|
@@ -4078,13 +4240,13 @@
|
|
|
4078
4240
|
"BearerAuth": []
|
|
4079
4241
|
}
|
|
4080
4242
|
],
|
|
4081
|
-
"summary": "List
|
|
4243
|
+
"summary": "List saved cards",
|
|
4082
4244
|
"tags": [
|
|
4083
4245
|
"Online Checkout"
|
|
4084
4246
|
]
|
|
4085
4247
|
},
|
|
4086
4248
|
"post": {
|
|
4087
|
-
"description": "
|
|
4249
|
+
"description": "Change the email address linked to a saved card. This endpoint can't change the card itself.",
|
|
4088
4250
|
"operationId": "Update tokenized card data",
|
|
4089
4251
|
"requestBody": {
|
|
4090
4252
|
"content": {
|
|
@@ -4094,7 +4256,7 @@
|
|
|
4094
4256
|
}
|
|
4095
4257
|
}
|
|
4096
4258
|
},
|
|
4097
|
-
"description": "The
|
|
4259
|
+
"description": "The card to update, and the email addresses",
|
|
4098
4260
|
"required": true
|
|
4099
4261
|
},
|
|
4100
4262
|
"responses": {
|
|
@@ -4126,7 +4288,7 @@
|
|
|
4126
4288
|
}
|
|
4127
4289
|
}
|
|
4128
4290
|
},
|
|
4129
|
-
"description": "
|
|
4291
|
+
"description": "Email address changed.",
|
|
4130
4292
|
"headers": {
|
|
4131
4293
|
"X-Rate-Limit-Limit": {
|
|
4132
4294
|
"description": "The number of allowed requests in the current period",
|
|
@@ -4217,7 +4379,7 @@
|
|
|
4217
4379
|
"BearerAuth": []
|
|
4218
4380
|
}
|
|
4219
4381
|
],
|
|
4220
|
-
"summary": "
|
|
4382
|
+
"summary": "Change the email linked to a saved card",
|
|
4221
4383
|
"parameters": [
|
|
4222
4384
|
{
|
|
4223
4385
|
"description": "The parent accountId of the business.",
|
|
@@ -4236,7 +4398,7 @@
|
|
|
4236
4398
|
]
|
|
4237
4399
|
},
|
|
4238
4400
|
"delete": {
|
|
4239
|
-
"description": "Delete a
|
|
4401
|
+
"description": "Delete a saved card. A deleted card can't be charged again. The request sends a JSON body with DELETE, so check that your HTTP client doesn't drop it.",
|
|
4240
4402
|
"operationId": "Delete tokenized card data",
|
|
4241
4403
|
"requestBody": {
|
|
4242
4404
|
"content": {
|
|
@@ -4246,7 +4408,7 @@
|
|
|
4246
4408
|
}
|
|
4247
4409
|
}
|
|
4248
4410
|
},
|
|
4249
|
-
"description": "The
|
|
4411
|
+
"description": "The card to delete",
|
|
4250
4412
|
"required": true
|
|
4251
4413
|
},
|
|
4252
4414
|
"responses": {
|
|
@@ -4278,7 +4440,7 @@
|
|
|
4278
4440
|
}
|
|
4279
4441
|
}
|
|
4280
4442
|
},
|
|
4281
|
-
"description": "
|
|
4443
|
+
"description": "Card deleted.",
|
|
4282
4444
|
"headers": {
|
|
4283
4445
|
"X-Rate-Limit-Limit": {
|
|
4284
4446
|
"description": "The number of allowed requests in the current period",
|
|
@@ -4369,7 +4531,7 @@
|
|
|
4369
4531
|
"BearerAuth": []
|
|
4370
4532
|
}
|
|
4371
4533
|
],
|
|
4372
|
-
"summary": "Delete
|
|
4534
|
+
"summary": "Delete a saved card",
|
|
4373
4535
|
"parameters": [
|
|
4374
4536
|
{
|
|
4375
4537
|
"description": "The parent accountId of the business.",
|
|
@@ -5014,7 +5176,7 @@
|
|
|
5014
5176
|
},
|
|
5015
5177
|
"description": {
|
|
5016
5178
|
"type": "string",
|
|
5017
|
-
"example": "
|
|
5179
|
+
"example": "checkout otp processed successfully",
|
|
5018
5180
|
"description": "Response description"
|
|
5019
5181
|
},
|
|
5020
5182
|
"data": {
|
|
@@ -20198,8 +20360,8 @@
|
|
|
20198
20360
|
},
|
|
20199
20361
|
"transactionId": {
|
|
20200
20362
|
"type": "string",
|
|
20201
|
-
"description": "transaction id
|
|
20202
|
-
"example": "
|
|
20363
|
+
"description": "transaction id returned when the card details were submitted, or by a tokenized card charge that requires an OTP",
|
|
20364
|
+
"example": "a729d716-566f-4a47-986f-32b3fa39e075"
|
|
20203
20365
|
}
|
|
20204
20366
|
},
|
|
20205
20367
|
"required": [
|
|
@@ -20214,12 +20376,12 @@
|
|
|
20214
20376
|
"status": {
|
|
20215
20377
|
"type": "boolean",
|
|
20216
20378
|
"description": "true is the transaction was successful",
|
|
20217
|
-
"example":
|
|
20379
|
+
"example": true
|
|
20218
20380
|
},
|
|
20219
20381
|
"message": {
|
|
20220
20382
|
"type": "string",
|
|
20221
20383
|
"description": "details response message",
|
|
20222
|
-
"example": "
|
|
20384
|
+
"example": "SUCCESS"
|
|
20223
20385
|
}
|
|
20224
20386
|
},
|
|
20225
20387
|
"required": [
|
|
@@ -20553,8 +20715,8 @@
|
|
|
20553
20715
|
"properties": {
|
|
20554
20716
|
"status": {
|
|
20555
20717
|
"type": "boolean",
|
|
20556
|
-
"description": "
|
|
20557
|
-
"example":
|
|
20718
|
+
"description": "`true` when the card was deleted",
|
|
20719
|
+
"example": true
|
|
20558
20720
|
},
|
|
20559
20721
|
"message": {
|
|
20560
20722
|
"type": "string",
|
|
@@ -20568,18 +20730,18 @@
|
|
|
20568
20730
|
"properties": {
|
|
20569
20731
|
"tokenKey": {
|
|
20570
20732
|
"type": "string",
|
|
20571
|
-
"description": "token
|
|
20733
|
+
"description": "The card token",
|
|
20572
20734
|
"example": "5844858382"
|
|
20573
20735
|
},
|
|
20574
20736
|
"currentEmailAddress": {
|
|
20575
20737
|
"type": "string",
|
|
20576
|
-
"description": "
|
|
20738
|
+
"description": "The email address currently linked to the card",
|
|
20577
20739
|
"example": "email@email.com"
|
|
20578
20740
|
},
|
|
20579
20741
|
"newEmailAddress": {
|
|
20580
20742
|
"type": "string",
|
|
20581
|
-
"description": "
|
|
20582
|
-
"example": "email@email.com"
|
|
20743
|
+
"description": "The email address to link to the card instead",
|
|
20744
|
+
"example": "new.email@email.com"
|
|
20583
20745
|
}
|
|
20584
20746
|
},
|
|
20585
20747
|
"required": [
|
|
@@ -20593,18 +20755,16 @@
|
|
|
20593
20755
|
"properties": {
|
|
20594
20756
|
"status": {
|
|
20595
20757
|
"type": "boolean",
|
|
20596
|
-
"description": "
|
|
20597
|
-
"example":
|
|
20758
|
+
"description": "`true` when the email was changed. `false` if `currentEmailAddress` isn't the email linked to the card.",
|
|
20759
|
+
"example": true
|
|
20598
20760
|
},
|
|
20599
20761
|
"message": {
|
|
20600
20762
|
"type": "string",
|
|
20601
|
-
"description": "
|
|
20602
|
-
"example": "
|
|
20763
|
+
"description": "Response message",
|
|
20764
|
+
"example": "Email address updated successfully"
|
|
20603
20765
|
},
|
|
20604
20766
|
"tokenizedCardData": {
|
|
20605
|
-
"
|
|
20606
|
-
"$ref": "#/components/schemas/TokenizedCardData"
|
|
20607
|
-
}
|
|
20767
|
+
"$ref": "#/components/schemas/TokenizedCardData"
|
|
20608
20768
|
}
|
|
20609
20769
|
}
|
|
20610
20770
|
},
|
|
@@ -20673,7 +20833,7 @@
|
|
|
20673
20833
|
},
|
|
20674
20834
|
"allowedPaymentMethods": {
|
|
20675
20835
|
"type": "array",
|
|
20676
|
-
"description": "Optional list of payment methods to display on the checkout page. If not provided, all supported methods for your account and region will be shown. Supported values: Card, Transfer, Nomba QR, USSD
|
|
20836
|
+
"description": "Optional list of payment methods to display on the checkout page. If not provided, all supported methods for your account and region will be shown. Supported values: Card, Transfer, Nomba QR, USSD (Nigerian checkout); MOMO, Intl Card, Apple Pay (DRC checkout); Intl Transfer, which is Pay by Bank, for supported GBP and EUR checkout flows.",
|
|
20677
20837
|
"items": {
|
|
20678
20838
|
"type": "string",
|
|
20679
20839
|
"enum": [
|
|
@@ -20681,7 +20841,6 @@
|
|
|
20681
20841
|
"Transfer",
|
|
20682
20842
|
"Nomba QR",
|
|
20683
20843
|
"USSD",
|
|
20684
|
-
"Buy Now Pay Later",
|
|
20685
20844
|
"MOMO",
|
|
20686
20845
|
"Intl Card",
|
|
20687
20846
|
"Apple Pay",
|
|
@@ -20785,12 +20944,32 @@
|
|
|
20785
20944
|
"status": {
|
|
20786
20945
|
"type": "boolean",
|
|
20787
20946
|
"description": "status of the transaction",
|
|
20788
|
-
"example":
|
|
20947
|
+
"example": false
|
|
20789
20948
|
},
|
|
20790
20949
|
"message": {
|
|
20791
20950
|
"type": "string",
|
|
20792
20951
|
"description": "some details of the transaction response.",
|
|
20793
|
-
"example": "
|
|
20952
|
+
"example": "Please enter the OTP sent to the phone/email address registered with your bank."
|
|
20953
|
+
},
|
|
20954
|
+
"orderId": {
|
|
20955
|
+
"type": "string",
|
|
20956
|
+
"description": "The order ID",
|
|
20957
|
+
"example": "b6a3c0f2-6d2e-4c1a-9a41-3f2b7d0c9e15"
|
|
20958
|
+
},
|
|
20959
|
+
"orderReference": {
|
|
20960
|
+
"type": "string",
|
|
20961
|
+
"description": "The order reference",
|
|
20962
|
+
"example": "90e81e8a-bc14-4ebf-89c0-57da752cca58"
|
|
20963
|
+
},
|
|
20964
|
+
"otpRequired": {
|
|
20965
|
+
"type": "boolean",
|
|
20966
|
+
"description": "true when the customer's bank requires an OTP to complete the charge. The charge stays pending until the OTP is submitted with transactionId to /v1/checkout/checkout-card-otp.",
|
|
20967
|
+
"example": true
|
|
20968
|
+
},
|
|
20969
|
+
"transactionId": {
|
|
20970
|
+
"type": "string",
|
|
20971
|
+
"description": "Returned only when otpRequired is true. Send it with the customer's OTP to /v1/checkout/checkout-card-otp.",
|
|
20972
|
+
"example": "a729d716-566f-4a47-986f-32b3fa39e075"
|
|
20794
20973
|
}
|
|
20795
20974
|
}
|
|
20796
20975
|
},
|
|
@@ -20851,28 +21030,28 @@
|
|
|
20851
21030
|
"properties": {
|
|
20852
21031
|
"tokenKey": {
|
|
20853
21032
|
"type": "string",
|
|
20854
|
-
"description": "
|
|
21033
|
+
"description": "The card token (`tokenKey`) you charge the card with",
|
|
20855
21034
|
"example": "e890bd1a9f0d"
|
|
20856
21035
|
},
|
|
20857
21036
|
"customerEmail": {
|
|
20858
21037
|
"type": "string",
|
|
20859
|
-
"description": "
|
|
21038
|
+
"description": "The email address the card was saved with",
|
|
20860
21039
|
"example": "email@email.com"
|
|
20861
21040
|
},
|
|
20862
21041
|
"cardType": {
|
|
20863
21042
|
"type": "string",
|
|
20864
|
-
"description": "
|
|
21043
|
+
"description": "The card scheme, for example `Visa`, `Mastercard` or `Verve`",
|
|
20865
21044
|
"example": "Verve"
|
|
20866
21045
|
},
|
|
20867
21046
|
"cardPan": {
|
|
20868
21047
|
"type": "string",
|
|
20869
|
-
"description": "
|
|
20870
|
-
"example": "
|
|
21048
|
+
"description": "The card number. List saved cards returns only the last four digits.",
|
|
21049
|
+
"example": "7580"
|
|
20871
21050
|
},
|
|
20872
|
-
"
|
|
21051
|
+
"tokenExpiryDate": {
|
|
20873
21052
|
"type": "string",
|
|
20874
|
-
"description": "
|
|
20875
|
-
"example": "
|
|
21053
|
+
"description": "When the card expires, as `YYMM`. `2808` means August 2028.",
|
|
21054
|
+
"example": "2808"
|
|
20876
21055
|
}
|
|
20877
21056
|
}
|
|
20878
21057
|
},
|
|
@@ -21405,6 +21584,15 @@
|
|
|
21405
21584
|
"CreateVirtualAccountRequest": {
|
|
21406
21585
|
"type": "object",
|
|
21407
21586
|
"properties": {
|
|
21587
|
+
"mode": {
|
|
21588
|
+
"type": "string",
|
|
21589
|
+
"enum": [
|
|
21590
|
+
"SIMULATED",
|
|
21591
|
+
"LIVE"
|
|
21592
|
+
],
|
|
21593
|
+
"description": "Sandbox only. `SIMULATED` (default for `NGN`) creates a test account with a sandbox-only account number that you fund with [Simulate an inflow](/nomba-api-reference/virtual-accounts/simulate-inflow). `LIVE` creates a real Nombank account that receives real bank transfers (at most 2 active per business). `SIMULATED` supports `NGN` only. Ignored in production. Optional.",
|
|
21594
|
+
"example": "SIMULATED"
|
|
21595
|
+
},
|
|
21408
21596
|
"accountRef": {
|
|
21409
21597
|
"type": "string",
|
|
21410
21598
|
"description": "Account reference",
|
|
@@ -21447,6 +21635,12 @@
|
|
|
21447
21635
|
"type": "boolean",
|
|
21448
21636
|
"description": "When set to true, Nomba will reject any inflow to the virtual account whose sender name does not match the virtual account name. The order of names does not matter—for example, a VA name of 'John Doe Naomi' would match sender names like 'Doe John Naomi' or 'Naomi Doe John', since different banks may arrange names differently. A `payment_failed` webhook event is sent to notify the merchant that the inflow was rejected. The rejected inflow is reversed back to the sender according to the sending bank's policy. Optional.",
|
|
21449
21637
|
"example": true
|
|
21638
|
+
},
|
|
21639
|
+
"callbackUrl": {
|
|
21640
|
+
"type": "string",
|
|
21641
|
+
"format": "uri",
|
|
21642
|
+
"description": "URL to receive `payment_success` and `payment_failed` webhook events for inflows into this virtual account. Optional.",
|
|
21643
|
+
"example": "https://merchant.example.com/webhooks/nomba"
|
|
21450
21644
|
}
|
|
21451
21645
|
},
|
|
21452
21646
|
"required": [
|
|
@@ -21457,6 +21651,15 @@
|
|
|
21457
21651
|
"CreateVirtualAccountResponse": {
|
|
21458
21652
|
"type": "object",
|
|
21459
21653
|
"properties": {
|
|
21654
|
+
"mode": {
|
|
21655
|
+
"type": "string",
|
|
21656
|
+
"enum": [
|
|
21657
|
+
"SIMULATED",
|
|
21658
|
+
"LIVE"
|
|
21659
|
+
],
|
|
21660
|
+
"description": "Sandbox only: `SIMULATED` or `LIVE`. Not returned in production.",
|
|
21661
|
+
"example": "SIMULATED"
|
|
21662
|
+
},
|
|
21460
21663
|
"createdAt": {
|
|
21461
21664
|
"type": "string",
|
|
21462
21665
|
"description": "Creation timestamp",
|
|
@@ -21662,6 +21865,15 @@
|
|
|
21662
21865
|
"VirtualAccountObject": {
|
|
21663
21866
|
"type": "object",
|
|
21664
21867
|
"properties": {
|
|
21868
|
+
"mode": {
|
|
21869
|
+
"type": "string",
|
|
21870
|
+
"enum": [
|
|
21871
|
+
"SIMULATED",
|
|
21872
|
+
"LIVE"
|
|
21873
|
+
],
|
|
21874
|
+
"description": "Sandbox only: `SIMULATED` or `LIVE`. Not returned in production.",
|
|
21875
|
+
"example": "SIMULATED"
|
|
21876
|
+
},
|
|
21665
21877
|
"createdAt": {
|
|
21666
21878
|
"type": "string",
|
|
21667
21879
|
"description": "Creation timestamp",
|
|
@@ -21747,6 +21959,89 @@
|
|
|
21747
21959
|
"expired"
|
|
21748
21960
|
]
|
|
21749
21961
|
},
|
|
21962
|
+
"SimulateInflowRequest": {
|
|
21963
|
+
"type": "object",
|
|
21964
|
+
"properties": {
|
|
21965
|
+
"amount": {
|
|
21966
|
+
"type": "string",
|
|
21967
|
+
"description": "Amount to send, in naira. Must be greater than zero. Simulated accounts accept any amount.",
|
|
21968
|
+
"example": "5000.00"
|
|
21969
|
+
},
|
|
21970
|
+
"senderAccountName": {
|
|
21971
|
+
"type": "string",
|
|
21972
|
+
"description": "The sender's account name. Checked against the virtual account name when `restrictInflowToAccountName` is `true`; word order doesn't matter.",
|
|
21973
|
+
"example": "Scorsese Daniel"
|
|
21974
|
+
},
|
|
21975
|
+
"senderAccountNumber": {
|
|
21976
|
+
"type": "string",
|
|
21977
|
+
"description": "The sender's account number. Optional.",
|
|
21978
|
+
"example": "0011223344"
|
|
21979
|
+
},
|
|
21980
|
+
"senderBankCode": {
|
|
21981
|
+
"type": "string",
|
|
21982
|
+
"description": "The sender's bank code. Optional.",
|
|
21983
|
+
"example": "058"
|
|
21984
|
+
},
|
|
21985
|
+
"narration": {
|
|
21986
|
+
"type": "string",
|
|
21987
|
+
"description": "Transfer narration. Optional.",
|
|
21988
|
+
"example": "Invoice 1042"
|
|
21989
|
+
}
|
|
21990
|
+
},
|
|
21991
|
+
"required": [
|
|
21992
|
+
"amount",
|
|
21993
|
+
"senderAccountName"
|
|
21994
|
+
]
|
|
21995
|
+
},
|
|
21996
|
+
"SimulateInflowResponse": {
|
|
21997
|
+
"type": "object",
|
|
21998
|
+
"properties": {
|
|
21999
|
+
"status": {
|
|
22000
|
+
"type": "string",
|
|
22001
|
+
"enum": [
|
|
22002
|
+
"SUCCESS",
|
|
22003
|
+
"REJECTED"
|
|
22004
|
+
],
|
|
22005
|
+
"description": "Whether the inflow was accepted.",
|
|
22006
|
+
"example": "SUCCESS"
|
|
22007
|
+
},
|
|
22008
|
+
"responseCode": {
|
|
22009
|
+
"type": "string",
|
|
22010
|
+
"description": "NIP response code: `00` accepted, `07` account expired, `08` sender name does not match.",
|
|
22011
|
+
"example": "00"
|
|
22012
|
+
},
|
|
22013
|
+
"reason": {
|
|
22014
|
+
"type": "string",
|
|
22015
|
+
"description": "Why the inflow was rejected: `EXPIRED` or `NAME_MISMATCH`. Only present when `status` is `REJECTED`.",
|
|
22016
|
+
"example": "NAME_MISMATCH"
|
|
22017
|
+
},
|
|
22018
|
+
"transactionRef": {
|
|
22019
|
+
"type": "string",
|
|
22020
|
+
"description": "Reference of the recorded inflow. Use it with Transaction requery. Only present when `status` is `SUCCESS`.",
|
|
22021
|
+
"example": "SANDBOX-VA-92eb15fb-56c3-4678-8dd2-faed8529f236"
|
|
22022
|
+
},
|
|
22023
|
+
"sessionId": {
|
|
22024
|
+
"type": "string",
|
|
22025
|
+
"description": "NIP-style session ID for the simulated transfer.",
|
|
22026
|
+
"example": "999999261113102524068408167198"
|
|
22027
|
+
},
|
|
22028
|
+
"accountNumber": {
|
|
22029
|
+
"type": "string",
|
|
22030
|
+
"description": "The virtual account number.",
|
|
22031
|
+
"example": "0216409640"
|
|
22032
|
+
},
|
|
22033
|
+
"accountRef": {
|
|
22034
|
+
"type": "string",
|
|
22035
|
+
"description": "The virtual account reference.",
|
|
22036
|
+
"example": "sandbox-va-001"
|
|
22037
|
+
},
|
|
22038
|
+
"amount": {
|
|
22039
|
+
"type": "string",
|
|
22040
|
+
"description": "The amount sent.",
|
|
22041
|
+
"example": "5000.00"
|
|
22042
|
+
}
|
|
22043
|
+
}
|
|
22044
|
+
},
|
|
21750
22045
|
"RateLimitError": {
|
|
21751
22046
|
"type": "object",
|
|
21752
22047
|
"description": "Rate-limit error response.",
|
|
@@ -24221,7 +24516,7 @@
|
|
|
24221
24516
|
},
|
|
24222
24517
|
"securitySchemes": {
|
|
24223
24518
|
"BearerAuth": {
|
|
24224
|
-
"description": "Nomba authenticates API calls with [OAuth2 HTTP bearer tokens](http://tools.ietf.org/html/rfc6750). There are two methods of authentication; [Client-Credentials method](https://www.rfc-editor.org/rfc/rfc6749) and [PKCE (Proof Key for Code Exchange)](https://www.rfc-editor.org/rfc/rfc7636) method.
|
|
24519
|
+
"description": "Nomba authenticates API calls with [OAuth2 HTTP bearer tokens](http://tools.ietf.org/html/rfc6750). There are two methods of authentication; [Client-Credentials method](https://www.rfc-editor.org/rfc/rfc6749) and [PKCE (Proof Key for Code Exchange)](https://www.rfc-editor.org/rfc/rfc7636) method. Both methods return an access token. Send it in the `Authorization` header: `Authorization: Bearer <access_token>`.",
|
|
24225
24520
|
"scheme": "bearer",
|
|
24226
24521
|
"type": "http",
|
|
24227
24522
|
"bearerFormat": "JWT"
|
nomba/models.py
CHANGED
|
@@ -147,6 +147,7 @@ class CreateVirtualAccountData(TypedDict, total=False):
|
|
|
147
147
|
callbackUrl: str
|
|
148
148
|
expired: bool
|
|
149
149
|
restrictInflowToAccountName: bool
|
|
150
|
+
mode: str
|
|
150
151
|
|
|
151
152
|
class CreateVirtualAccountResponse(TypedDict, total=False):
|
|
152
153
|
code: str
|
|
@@ -167,6 +168,7 @@ class CreateVirtualAccountForASubAccountData(TypedDict, total=False):
|
|
|
167
168
|
callbackUrl: str
|
|
168
169
|
expired: bool
|
|
169
170
|
restrictInflowToAccountName: bool
|
|
171
|
+
mode: str
|
|
170
172
|
|
|
171
173
|
class CreateVirtualAccountForASubAccountResponse(TypedDict, total=False):
|
|
172
174
|
code: str
|
|
@@ -190,6 +192,21 @@ class UpdateAVirtualAccountResponse(TypedDict, total=False):
|
|
|
190
192
|
description: str
|
|
191
193
|
data: UpdateAVirtualAccountData
|
|
192
194
|
|
|
195
|
+
class SimulateInflowData(TypedDict, total=False):
|
|
196
|
+
status: str
|
|
197
|
+
responseCode: str
|
|
198
|
+
reason: str
|
|
199
|
+
transactionRef: str
|
|
200
|
+
sessionId: str
|
|
201
|
+
accountNumber: str
|
|
202
|
+
accountRef: str
|
|
203
|
+
amount: str
|
|
204
|
+
|
|
205
|
+
class SimulateInflowResponse(TypedDict, total=False):
|
|
206
|
+
code: str
|
|
207
|
+
description: str
|
|
208
|
+
data: SimulateInflowData
|
|
209
|
+
|
|
193
210
|
class FetchAVirtualAccountData(TypedDict, total=False):
|
|
194
211
|
createdAt: str
|
|
195
212
|
accountHolderId: str
|
|
@@ -225,9 +242,20 @@ class CreateAnOnlineCheckoutOrderResponse(TypedDict, total=False):
|
|
|
225
242
|
description: str
|
|
226
243
|
data: CreateAnOnlineCheckoutOrderData
|
|
227
244
|
|
|
245
|
+
class TokenizedCardData(TypedDict, total=False):
|
|
246
|
+
tokenKey: str
|
|
247
|
+
customerEmail: str
|
|
248
|
+
cardType: str
|
|
249
|
+
cardPan: str
|
|
250
|
+
tokenExpiryDate: str
|
|
251
|
+
|
|
228
252
|
class ChargeCustomerWithTokenizedCardDataData(TypedDict, total=False):
|
|
229
253
|
status: bool
|
|
230
254
|
message: str
|
|
255
|
+
orderId: str
|
|
256
|
+
orderReference: str
|
|
257
|
+
otpRequired: bool
|
|
258
|
+
transactionId: str
|
|
231
259
|
|
|
232
260
|
class ChargeCustomerWithTokenizedCardDataResponse(TypedDict, total=False):
|
|
233
261
|
code: str
|
|
@@ -235,8 +263,9 @@ class ChargeCustomerWithTokenizedCardDataResponse(TypedDict, total=False):
|
|
|
235
263
|
data: ChargeCustomerWithTokenizedCardDataData
|
|
236
264
|
|
|
237
265
|
class ListAllTokenizedCardsForMerchantData(TypedDict, total=False):
|
|
238
|
-
|
|
239
|
-
|
|
266
|
+
hasNextPage: bool
|
|
267
|
+
nextPage: int
|
|
268
|
+
tokenizedCardDataList: list[TokenizedCardData]
|
|
240
269
|
|
|
241
270
|
class ListAllTokenizedCardsForMerchantResponse(TypedDict, total=False):
|
|
242
271
|
code: str
|
|
@@ -246,7 +275,7 @@ class ListAllTokenizedCardsForMerchantResponse(TypedDict, total=False):
|
|
|
246
275
|
class UpdateTokenizedCardDataData(TypedDict, total=False):
|
|
247
276
|
status: bool
|
|
248
277
|
message: str
|
|
249
|
-
tokenizedCardData:
|
|
278
|
+
tokenizedCardData: TokenizedCardData
|
|
250
279
|
|
|
251
280
|
class UpdateTokenizedCardDataResponse(TypedDict, total=False):
|
|
252
281
|
code: str
|
|
@@ -15,7 +15,7 @@ class VirtualAccounts:
|
|
|
15
15
|
def __init__(self, client: NombaClient) -> None:
|
|
16
16
|
self._client = client
|
|
17
17
|
|
|
18
|
-
def create_virtual_account(self, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, **extra: object) -> _models.CreateVirtualAccountResponse:
|
|
18
|
+
def create_virtual_account(self, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, callback_url: object | None = None, mode: object | None = None, **extra: object) -> _models.CreateVirtualAccountResponse:
|
|
19
19
|
"""
|
|
20
20
|
Create virtual account
|
|
21
21
|
|
|
@@ -30,6 +30,8 @@ class VirtualAccounts:
|
|
|
30
30
|
expiryDate: Account expiry date in UTC. Optional. ⚠️Be careful with this.
|
|
31
31
|
expectedAmount: Amount the account can receive. Optional.
|
|
32
32
|
restrictInflowToAccountName: When set to true, Nomba will reject any inflow to the virtual account whose sender name does not match the virtual account name. The order of names does not matter—for example, a VA name of 'John Doe Naomi' would match sender names like 'Doe John Naomi' or 'Naomi Doe John', since different banks may arrange names differently. A `payment_failed` webhook event is sent to notify the merchant that the inflow was rejected. The rejected inflow is reversed back to the sender according to the sending bank's policy. Optional.
|
|
33
|
+
callbackUrl: URL to receive payment_success and payment_failed webhook events for inflows into this virtual account. Optional.
|
|
34
|
+
mode: Sandbox only. `SIMULATED` (default for NGN) or `LIVE`. Optional.
|
|
33
35
|
"""
|
|
34
36
|
path = f"/v1/accounts/virtual"
|
|
35
37
|
params = None
|
|
@@ -46,11 +48,15 @@ class VirtualAccounts:
|
|
|
46
48
|
body["expectedAmount"] = expected_amount
|
|
47
49
|
if restrict_inflow_to_account_name is not None:
|
|
48
50
|
body["restrictInflowToAccountName"] = restrict_inflow_to_account_name
|
|
51
|
+
if callback_url is not None:
|
|
52
|
+
body["callbackUrl"] = callback_url
|
|
53
|
+
if mode is not None:
|
|
54
|
+
body["mode"] = mode
|
|
49
55
|
body.update(extra)
|
|
50
56
|
validate_body("post", "/v1/accounts/virtual", body)
|
|
51
57
|
return self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
52
58
|
|
|
53
|
-
def create_virtual_account_for_a_sub_account(self, sub_account_id: str, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, **extra: object) -> _models.CreateVirtualAccountForASubAccountResponse:
|
|
59
|
+
def create_virtual_account_for_a_sub_account(self, sub_account_id: str, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, callback_url: object | None = None, mode: object | None = None, **extra: object) -> _models.CreateVirtualAccountForASubAccountResponse:
|
|
54
60
|
"""
|
|
55
61
|
Create virtual account for a sub account
|
|
56
62
|
|
|
@@ -65,6 +71,8 @@ class VirtualAccounts:
|
|
|
65
71
|
expiryDate: Account expiry date in UTC. Optional. ⚠️Be careful with this.
|
|
66
72
|
expectedAmount: Amount the account can receive. Optional.
|
|
67
73
|
restrictInflowToAccountName: When set to true, Nomba will reject any inflow to the virtual account whose sender name does not match the virtual account name. The order of names does not matter—for example, a VA name of 'John Doe Naomi' would match sender names like 'Doe John Naomi' or 'Naomi Doe John', since different banks may arrange names differently. A `payment_failed` webhook event is sent to notify the merchant that the inflow was rejected. The rejected inflow is reversed back to the sender according to the sending bank's policy. Optional.
|
|
74
|
+
callbackUrl: URL to receive payment_success and payment_failed webhook events for inflows into this virtual account. Optional.
|
|
75
|
+
mode: Sandbox only. `SIMULATED` (default for NGN) or `LIVE`. Optional.
|
|
68
76
|
"""
|
|
69
77
|
path = f"/v1/accounts/virtual/{sub_account_id}"
|
|
70
78
|
params = None
|
|
@@ -81,6 +89,10 @@ class VirtualAccounts:
|
|
|
81
89
|
body["expectedAmount"] = expected_amount
|
|
82
90
|
if restrict_inflow_to_account_name is not None:
|
|
83
91
|
body["restrictInflowToAccountName"] = restrict_inflow_to_account_name
|
|
92
|
+
if callback_url is not None:
|
|
93
|
+
body["callbackUrl"] = callback_url
|
|
94
|
+
if mode is not None:
|
|
95
|
+
body["mode"] = mode
|
|
84
96
|
body.update(extra)
|
|
85
97
|
validate_body("post", "/v1/accounts/virtual/{subAccountId}", body)
|
|
86
98
|
return self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
@@ -175,6 +187,34 @@ You can, however, update the expectedAmount value at any time to change the acce
|
|
|
175
187
|
params = None
|
|
176
188
|
return self._client.delete(path, params=params) # type: ignore[return-value]
|
|
177
189
|
|
|
190
|
+
def simulate_inflow(self, identifier: str, amount, sender_account_name, *, sender_account_number: object | None = None, sender_bank_code: object | None = None, narration: object | None = None, **extra: object) -> _models.SimulateInflowResponse:
|
|
191
|
+
"""
|
|
192
|
+
Simulate an inflow
|
|
193
|
+
|
|
194
|
+
Sandbox only. Simulates a bank transfer into a `SIMULATED` sandbox virtual account.
|
|
195
|
+
|
|
196
|
+
Body fields:
|
|
197
|
+
amount (required): Amount to send, in naira. Must be greater than zero.
|
|
198
|
+
senderAccountName (required): The sender's account name.
|
|
199
|
+
senderAccountNumber: The sender's account number. Optional.
|
|
200
|
+
senderBankCode: The sender's bank code. Optional.
|
|
201
|
+
narration: Transfer narration. Optional.
|
|
202
|
+
"""
|
|
203
|
+
path = f"/v1/accounts/virtual/{identifier}/simulate-inflow"
|
|
204
|
+
params = None
|
|
205
|
+
body: dict[str, object] = {}
|
|
206
|
+
body["amount"] = amount
|
|
207
|
+
body["senderAccountName"] = sender_account_name
|
|
208
|
+
if sender_account_number is not None:
|
|
209
|
+
body["senderAccountNumber"] = sender_account_number
|
|
210
|
+
if sender_bank_code is not None:
|
|
211
|
+
body["senderBankCode"] = sender_bank_code
|
|
212
|
+
if narration is not None:
|
|
213
|
+
body["narration"] = narration
|
|
214
|
+
body.update(extra)
|
|
215
|
+
validate_body("post", "/v1/accounts/virtual/{identifier}/simulate-inflow", body)
|
|
216
|
+
return self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
217
|
+
|
|
178
218
|
|
|
179
219
|
|
|
180
220
|
class AsyncVirtualAccounts:
|
|
@@ -183,7 +223,7 @@ class AsyncVirtualAccounts:
|
|
|
183
223
|
def __init__(self, client: AsyncNombaClient) -> None:
|
|
184
224
|
self._client = client
|
|
185
225
|
|
|
186
|
-
async def create_virtual_account(self, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, **extra: object) -> _models.CreateVirtualAccountResponse:
|
|
226
|
+
async def create_virtual_account(self, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, callback_url: object | None = None, mode: object | None = None, **extra: object) -> _models.CreateVirtualAccountResponse:
|
|
187
227
|
"""
|
|
188
228
|
Create virtual account
|
|
189
229
|
|
|
@@ -198,6 +238,8 @@ class AsyncVirtualAccounts:
|
|
|
198
238
|
expiryDate: Account expiry date in UTC. Optional. ⚠️Be careful with this.
|
|
199
239
|
expectedAmount: Amount the account can receive. Optional.
|
|
200
240
|
restrictInflowToAccountName: When set to true, Nomba will reject any inflow to the virtual account whose sender name does not match the virtual account name. The order of names does not matter—for example, a VA name of 'John Doe Naomi' would match sender names like 'Doe John Naomi' or 'Naomi Doe John', since different banks may arrange names differently. A `payment_failed` webhook event is sent to notify the merchant that the inflow was rejected. The rejected inflow is reversed back to the sender according to the sending bank's policy. Optional.
|
|
241
|
+
callbackUrl: URL to receive payment_success and payment_failed webhook events for inflows into this virtual account. Optional.
|
|
242
|
+
mode: Sandbox only. `SIMULATED` (default for NGN) or `LIVE`. Optional.
|
|
201
243
|
"""
|
|
202
244
|
path = f"/v1/accounts/virtual"
|
|
203
245
|
params = None
|
|
@@ -214,11 +256,15 @@ class AsyncVirtualAccounts:
|
|
|
214
256
|
body["expectedAmount"] = expected_amount
|
|
215
257
|
if restrict_inflow_to_account_name is not None:
|
|
216
258
|
body["restrictInflowToAccountName"] = restrict_inflow_to_account_name
|
|
259
|
+
if callback_url is not None:
|
|
260
|
+
body["callbackUrl"] = callback_url
|
|
261
|
+
if mode is not None:
|
|
262
|
+
body["mode"] = mode
|
|
217
263
|
body.update(extra)
|
|
218
264
|
validate_body("post", "/v1/accounts/virtual", body)
|
|
219
265
|
return await self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
220
266
|
|
|
221
|
-
async def create_virtual_account_for_a_sub_account(self, sub_account_id: str, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, **extra: object) -> _models.CreateVirtualAccountForASubAccountResponse:
|
|
267
|
+
async def create_virtual_account_for_a_sub_account(self, sub_account_id: str, account_ref, account_name, *, bvn: object | None = None, nin: object | None = None, expiry_date: object | None = None, expected_amount: object | None = None, restrict_inflow_to_account_name: object | None = None, callback_url: object | None = None, mode: object | None = None, **extra: object) -> _models.CreateVirtualAccountForASubAccountResponse:
|
|
222
268
|
"""
|
|
223
269
|
Create virtual account for a sub account
|
|
224
270
|
|
|
@@ -233,6 +279,8 @@ class AsyncVirtualAccounts:
|
|
|
233
279
|
expiryDate: Account expiry date in UTC. Optional. ⚠️Be careful with this.
|
|
234
280
|
expectedAmount: Amount the account can receive. Optional.
|
|
235
281
|
restrictInflowToAccountName: When set to true, Nomba will reject any inflow to the virtual account whose sender name does not match the virtual account name. The order of names does not matter—for example, a VA name of 'John Doe Naomi' would match sender names like 'Doe John Naomi' or 'Naomi Doe John', since different banks may arrange names differently. A `payment_failed` webhook event is sent to notify the merchant that the inflow was rejected. The rejected inflow is reversed back to the sender according to the sending bank's policy. Optional.
|
|
282
|
+
callbackUrl: URL to receive payment_success and payment_failed webhook events for inflows into this virtual account. Optional.
|
|
283
|
+
mode: Sandbox only. `SIMULATED` (default for NGN) or `LIVE`. Optional.
|
|
236
284
|
"""
|
|
237
285
|
path = f"/v1/accounts/virtual/{sub_account_id}"
|
|
238
286
|
params = None
|
|
@@ -249,6 +297,10 @@ class AsyncVirtualAccounts:
|
|
|
249
297
|
body["expectedAmount"] = expected_amount
|
|
250
298
|
if restrict_inflow_to_account_name is not None:
|
|
251
299
|
body["restrictInflowToAccountName"] = restrict_inflow_to_account_name
|
|
300
|
+
if callback_url is not None:
|
|
301
|
+
body["callbackUrl"] = callback_url
|
|
302
|
+
if mode is not None:
|
|
303
|
+
body["mode"] = mode
|
|
252
304
|
body.update(extra)
|
|
253
305
|
validate_body("post", "/v1/accounts/virtual/{subAccountId}", body)
|
|
254
306
|
return await self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
@@ -343,3 +395,31 @@ You can, however, update the expectedAmount value at any time to change the acce
|
|
|
343
395
|
params = None
|
|
344
396
|
return await self._client.delete(path, params=params) # type: ignore[return-value]
|
|
345
397
|
|
|
398
|
+
async def simulate_inflow(self, identifier: str, amount, sender_account_name, *, sender_account_number: object | None = None, sender_bank_code: object | None = None, narration: object | None = None, **extra: object) -> _models.SimulateInflowResponse:
|
|
399
|
+
"""
|
|
400
|
+
Simulate an inflow
|
|
401
|
+
|
|
402
|
+
Sandbox only. Simulates a bank transfer into a `SIMULATED` sandbox virtual account.
|
|
403
|
+
|
|
404
|
+
Body fields:
|
|
405
|
+
amount (required): Amount to send, in naira. Must be greater than zero.
|
|
406
|
+
senderAccountName (required): The sender's account name.
|
|
407
|
+
senderAccountNumber: The sender's account number. Optional.
|
|
408
|
+
senderBankCode: The sender's bank code. Optional.
|
|
409
|
+
narration: Transfer narration. Optional.
|
|
410
|
+
"""
|
|
411
|
+
path = f"/v1/accounts/virtual/{identifier}/simulate-inflow"
|
|
412
|
+
params = None
|
|
413
|
+
body: dict[str, object] = {}
|
|
414
|
+
body["amount"] = amount
|
|
415
|
+
body["senderAccountName"] = sender_account_name
|
|
416
|
+
if sender_account_number is not None:
|
|
417
|
+
body["senderAccountNumber"] = sender_account_number
|
|
418
|
+
if sender_bank_code is not None:
|
|
419
|
+
body["senderBankCode"] = sender_bank_code
|
|
420
|
+
if narration is not None:
|
|
421
|
+
body["narration"] = narration
|
|
422
|
+
body.update(extra)
|
|
423
|
+
validate_body("post", "/v1/accounts/virtual/{identifier}/simulate-inflow", body)
|
|
424
|
+
return await self._client.post(path, json=body, params=params) # type: ignore[return-value]
|
|
425
|
+
|
|
@@ -2,12 +2,12 @@ nomba/__init__.py,sha256=F_MK2miPM9nqPZ6hrKkA8kk29kBD-IAAYMks17m30Mo,941
|
|
|
2
2
|
nomba/client.py,sha256=3wTiR5DJ5Tuyv7jGpZqKhQzbJCSch66UfNyh9v6k_pU,5849
|
|
3
3
|
nomba/concurrency.py,sha256=0wTRJ57uLR-rXaIEMfivSRr4qEKvZMu3j5EXgAyLKoo,1870
|
|
4
4
|
nomba/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
nomba/data/nomba_openapi.json,sha256=
|
|
5
|
+
nomba/data/nomba_openapi.json,sha256=nJPbR8S9bmAtWQBj7-R9bgXGCrWEcaQa7ocTCUfpkWc,838304
|
|
6
6
|
nomba/exceptions.py,sha256=Dx6OASM-7bvzsejmVbw_Iy6PXhm09K6Cu52mxlOjVY8,1484
|
|
7
7
|
nomba/flows/__init__.py,sha256=v2yT_QfBLIzWRvhCiDXXELFMWFTf3ye_VkVlEGA2kb0,155
|
|
8
8
|
nomba/flows/card_payment.py,sha256=Z0eJeFYrvJ_Za_JWl4qxalhU9Q-s-3LjO318ShtbN_k,7512
|
|
9
9
|
nomba/http.py,sha256=yOOkhqZd97XzGm4h6Mk8X1RnjVh2ZyfkmRW2mYkj2oI,17509
|
|
10
|
-
nomba/models.py,sha256=
|
|
10
|
+
nomba/models.py,sha256=RiYAuWg7pVUNvu3ntGZ4dZ9p9dIhgAyFApcaVwOH_Jo,29628
|
|
11
11
|
nomba/pagination.py,sha256=g5EagLomsdkN9YojCCnp55mm9IrFCfXBaU9500G_Ri8,3678
|
|
12
12
|
nomba/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
nomba/resources/__init__.py,sha256=i3E8PWRR1_rnXjmKApjSpnAIVvTEI7mLruGvR0HqAJM,1342
|
|
@@ -24,10 +24,10 @@ nomba/resources/global_payout.py,sha256=B-8Gx80DBb1DO9r-qnjhulsi0yfWYiFbf-9OsTfj
|
|
|
24
24
|
nomba/resources/terminals.py,sha256=9TzQU_WWObF2tUmG0rEVkQqveYGpJq7vjP9clfpWgKw,9986
|
|
25
25
|
nomba/resources/transactions.py,sha256=W3D3Jev9OvTc7_rJpSVf1xPDIw6h8CONRu7v7SQl9Yk,22334
|
|
26
26
|
nomba/resources/transfers.py,sha256=KE6VlvY9Nl79kpFshsoypVhHH_boHbwRcL6rrAJfblM,15036
|
|
27
|
-
nomba/resources/virtual_accounts.py,sha256=
|
|
27
|
+
nomba/resources/virtual_accounts.py,sha256=bKlEH1VlLsvbaapingjO1F1VC8VuPecpUXdXaJ2OFig,24102
|
|
28
28
|
nomba/validation.py,sha256=sAlddQ0TDtQO4AiTgNQRRRg9GN-fHArJEfCsulPpNyw,3489
|
|
29
29
|
nomba/webhooks.py,sha256=wNJwMqNgkrWmk8zR8Ein_ynlW0XkW6wwrDfhh4gB4Ic,7016
|
|
30
|
-
nomba_python-0.5.
|
|
31
|
-
nomba_python-0.5.
|
|
32
|
-
nomba_python-0.5.
|
|
33
|
-
nomba_python-0.5.
|
|
30
|
+
nomba_python-0.5.1.dist-info/licenses/LICENSE,sha256=mjDpnzT-qVss184RByMTVtrwe1SPNK_7xwM7JTS13eo,4505
|
|
31
|
+
nomba_python-0.5.1.dist-info/WHEEL,sha256=3OmCxFA0ffBIsX4x0o8CdfSvZAOvO3mzEG8U_z5TvV4,80
|
|
32
|
+
nomba_python-0.5.1.dist-info/METADATA,sha256=n9gs3B2bJP3YpM3pXbr8htVD0bOx4Px80FuD3QB_7e0,12747
|
|
33
|
+
nomba_python-0.5.1.dist-info/RECORD,,
|
|
File without changes
|