44
55> Thepeer's official python sdk for developers to use in their python projects.
66
7- - To start using this SDK , create an account at https://thepeer.co/ if you haven't already.
7+ - To start using this sdk , create an account at https://thepeer.co/ if you haven't already.
88- You can then retrieve your API keys from your [ dashboard] ( https://dashboard.thepeer.co/ )
99
1010## Installation
@@ -25,12 +25,12 @@ thepeer_instance = ThepeerInit("YOUR_API_KEY_HERE")
2525
2626```
2727
28- ## Available Methods Exposed By the SDK
28+ ## Available methods exposed by the sdk
2929
3030** Note:**
31- - For More info about the exposed methods, please refer to the general [ documentation] ( https://docs.thepeer.co/ )
31+ - For more info about the exposed methods, please refer to the general [ documentation] ( https://docs.thepeer.co/ )
3232 - Be sure to keep your API Credentials securely in [ environment variables] ( https://www.twilio.com/blog/environment-variables-python )
33- ### Indexing A User
33+ ### Indexing a user
3434This describes how to index a user on your account (this is usually the first step before using other methods)
3535
3636``` python
@@ -39,7 +39,7 @@ test = thepeer_instance.index_user("Osagie Iyayi", "
[email protected] ", "
3939
4040#### Parameters supported
4141
42- | Parameters | Data Type | Required | Description |
42+ | Parameters | Data type | Required | Description |
4343| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
4444| ``` name ``` | ``` string ``` | ``` true ``` | ``` The name of user to be indexed ``` .
4545| ``` identifier ``` | ``` string ``` | ``` true ``` | ``` the identifier of the account(either email or username). ```
@@ -55,12 +55,12 @@ test = thepeer_instance.validate_signature(data,signature)
5555```
5656#### Parameters supported
5757
58- | Parameters | Data Type | Required | Description |
58+ | Parameters | Data type | Required | Description |
5959| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
6060| ``` data ``` | ``` dictionary ``` | ``` true ``` | ``` the payload containing the data to be authenticated ```
6161| ``` signature ``` | ``` string ``` | ``` true ``` | ``` The HMAC signature ``` |
6262
63- ### Get an Indexed User
63+ ### Get an indexed user
6464This method gets the information of an indexed user
6565
6666``` python
@@ -70,11 +70,11 @@ test = thepeer_instance.view_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd")
7070#### Parameters supported
7171
7272
73- | Parameters | Data Type | Required | Description |
73+ | Parameters | Data type | Required | Description |
7474| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7575| ``` reference ``` | ``` string ``` | ``` true ``` | ``` the unique reference returned when the user was indexed ```
7676
77- ### Get All Indexed Users
77+ ### Get all indexed users
7878This method returns all indexed users for a specific account
7979
8080``` python
@@ -83,21 +83,21 @@ test = thepeer_instance.all_users(1,15)
8383
8484#### Parameters supported
8585
86- | Parameters | Data Type | Required | Description |
86+ | Parameters | Data type | Required | Description |
8787| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
8888| ``` page ``` | ``` integer ``` | ``` false ``` | ``` the first page displaying all the indexed users. defaults to 1 ```
8989| ``` per_page ``` | ``` integer ``` | ``` false ``` | ``` The number of users to display per page. defaults to 15 ``` |
9090
9191
92- ### Update an Indexed User
92+ ### Update an indexed user
9393This methods helps to update the details of an indexed user
9494
9595``` python
9696test = thepeer_instance.update_user(reference,** data)
9797```
9898#### Parameters supported
9999
100- | Parameters | Data Type | Required | Description |
100+ | Parameters | Data type | Required | Description |
101101| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
102102| ``` reference ``` | ``` string ``` | ``` true ``` | ``` the unique reference returned when the user was indexed ```
103103| ``` data ``` | ``` Any ``` | ``` true ``` | ``` A keyword argument which contains on or more of the indexed user's email, name or identifier ``` |
@@ -108,7 +108,7 @@ test = thepeer_instance.update_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd", iden
108108 name = " Edmond Kirsch" ,
109109110110```
111- ### Remove an Indexed User
111+ ### Remove an indexed user
112112This methods helps to remove the details of an indexed user from a specific account
113113
114114``` python
@@ -117,94 +117,94 @@ test = thepeer_instance.delete_user("3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd")
117117
118118#### Parameters supported
119119
120- | Parameters | Data Type | Required | Description |
120+ | Parameters | Data type | Required | Description |
121121| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
122122| ``` reference ``` | ``` string ``` | ``` true ``` | ``` the unique reference returned when the user was indexed ```
123123
124- ### Get User Links
124+ ### Get user links
125125
126126This method gets all payment links associated to an indexed user
127127``` python
128128test = thepeer_instance.get_user_links(" 3bbb0fbf-82fa-48a0-80eb-d2c0338fe7dd" )
129129```
130- #### Parameters Required
130+ #### Parameters required
131131
132- | Parameters | Data Type | Required | Description |
132+ | Parameters | Data type | Required | Description |
133133| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
134134| ``` reference ``` | ``` string ``` | ``` true ``` | ``` the unique reference returned when the user was indexed ```
135135
136136
137- ### Get Single Link
137+ ### Get single link
138138
139139This method gets the payment information located in a payment link
140140
141141``` python
142142test = thepeer_instance.get_single_link(" da14a90c-61c2-4cf7-a837-e3112a2d0c3d" )
143143```
144144
145- #### Parameters Required
145+ #### Parameters required
146146
147- | Parameters | Data Type | Required | Description |
147+ | Parameters | Data type | Required | Description |
148148| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
149149| ``` link_id ``` | ``` string ``` | ``` true ``` | ``` the unique link_id containing the payment information ```
150150
151151
152- ### Charge A Link
152+ ### Charge a link
153153This method allows a business to charge a user via their linked account
154154``` python
155155test = thepeer_instance.charge_link(link_id, amount, remark, currency)
156156```
157157
158- #### Parameters Required
158+ #### Parameters required
159159
160- | Parameters | Data Type | Required | Description |
160+ | Parameters | Data type | Required | Description |
161161| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
162162| ``` link_id ``` | ``` string ``` | ``` true ``` | ``` the unique link_id containing the payment information ```
163163| ``` amount ``` | ``` integer ``` | ``` true ``` | ``` the amount of the whole transaction ```
164164| ``` remark ``` | ``` string ``` | ``` true ``` | ``` short detail about the transaction ``` |
165165| ``` currency ``` | ``` string ``` | ``` false ``` | ``` The denomination medium of paying (either one of NGN and USD). defaults to NGN ```
166166
167- ### Authorize Direct Charge
167+ ### Authorize charge
168168This method allows a business to authorize a direct charge request made by a user
169169
170170``` python
171- test = thepeer_instance.authorize_direct_charge(auth_charge_reference , event)
171+ test = thepeer_instance.authorize_charge(charge_reference , event)
172172```
173- #### Parameters Required
173+ #### Parameters required
174174
175- | Parameters | Data Type | Required | Description |
175+ | Parameters | Data type | Required | Description |
176176| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
177- | ``` auth_charge_reference ``` | ``` string ``` | ``` true ``` | ``` the reference associated to a pending charge request ```
177+ | ``` charge_reference ``` | ``` string ``` | ``` true ``` | ``` the reference associated to a pending charge request ```
178178| ``` event ``` | ``` string ``` | ``` true ``` | ``` the type of webhook event ``` |
179179
180180** Pro Tip:** the various types of webhook events are available [ here] ( https://docs.thepeer.co/authorization/process-authorization-requests#supported-events )
181181
182182
183- ### Get Transaction Detail
183+ ### Get transaction detail
184184This method gets the details of a transaction
185185``` python
186186test = thepeer_instance.get_transaction_detail(" eda58ee3-4f2c-4aa4-9da7-10a2b8ced453" )
187187```
188188
189- #### Parameters Required
189+ #### Parameters required
190190
191- | Parameters | Data Type | Required | Description |
191+ | Parameters | Data type | Required | Description |
192192| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
193193| ``` transaction_id ``` | ``` string ``` | ``` true ``` | ``` the unique transaction identifier ```
194194
195- ### Refund Transaction
195+ ### Refund transaction
196196This method allows a business to refund a transaction back to the user for obvious reasons
197197``` python
198198test = thepeer_instance.refund_transaction(" 28e52edf-16d9-4921-8a54-ef34d7029707" , " possible threat actor" ):
199199```
200200
201- #### Parameters Required
202- | Parameters | Data Type | Required | Description |
201+ #### Parameters required
202+ | Parameters | Data type | Required | Description |
203203| ----------------------| ---------------------------| ----------| -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
204204| ``` transaction_id ``` | ``` string ``` | ``` true ``` | ``` the unique transaction identifier ```
205205| ``` reason ``` | ``` string ``` | ``` false ``` | ``` a short sentence explaining reasons for the refund ``` |
206206
207207
208208
209- ## License
210- This project is MIT Licensed (MIT). Please see the [ License File] ( https://github.com/thepeerstack/python-sdk/blob/main/LICENSE ) for more information.
209+ <!-- ## License
210+ This project is MIT Licensed (MIT). Please see the [License File](https://github.com/thepeerstack/python-sdk/blob/main/LICENSE) for more information. -->
0 commit comments