Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 49 additions & 16 deletions documents/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,20 @@ client.customer.create({

```py
client.order.create({
"amount": 50000,
"currency": "INR",
"receipt": "receipt#1",
"notes": {
"key1": "value3",
"key2": "value2"
}
"amount":100,
"currency":"INR",
"customer_id":"cust_4xbQrmEoA5WJ01",
"method":"card",
"token":{
"max_amount":5000,
"expire_at":2709971120,
"frequency":"monthly"
},
"receipt":"Receipt No. 1",
"notes":{
"notes_key_1":"Tea, Earl Grey, Hot",
"notes_key_2":"Tea, Earl Grey... decaf."
}
})
```

Expand All @@ -62,24 +69,35 @@ client.order.create({
|-----------------|---------|------------------------------------------------------------------------------|
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
| currency* | string | The currency of the payment (defaults to INR) |
| customerId* | string | The id of the customer to be fetched |
| receipt | string | Your system order reference id. |
| method* | string | Payment method used to make the registration transaction. Possible value is `card`. |
| token | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#112-create-an-order) are supported |
| notes | object | A key-value pair |

**Response:**
```json
{
"id": "order_EKwxwAgItmmXdp",
"id": "order_JmugUU7mFbXTRN",
"entity": "order",
"amount": 50000,
"amount": 100,
"amount_paid": 0,
"amount_due": 50000,
"amount_due": 100,
"currency": "INR",
"receipt": "receipt#1",
"receipt": "Receipt No. 1",
"offer_id": null,
"status": "created",
"attempts": 0,
"notes": [],
"created_at": 1582628071
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey... decaf."
},
"created_at": 1656418993,
"token": {
"max_amount": 5000,
"expire_at": 2709971120
},
"method": "card"
}
```
-------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -117,8 +135,7 @@ client.registration_link.create({

| Name | Type | Description |
|-----------------|---------|------------------------------------------------------------------------------|
| customer | object | Details of the customer to whom the registration link will be sent. |
| type* | string | the value is `link`. |
| customer | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#121-create-a-registration-link) are supported |
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
| currency* | string | The currency of the payment (defaults to INR) |
| description* | string | A brief description of the payment. |
Expand Down Expand Up @@ -515,8 +532,24 @@ client.card.fetch(cardId)

| Name | Type | Description |
|-----------------|---------|------------------------------------------------------------------------------|
| cardId* | string | card id to be fetched |
| cardId* | string | card id to be fetched |

**Response:**
```json
{
"id": "card_JXPULjlKqC5j0i",
"entity": "card",
"name": "Gaurav",
"last4": "4366",
"network": "Visa",
"type": "credit",
"issuer": "UTIB",
"international": false,
"emi": true,
"sub_type": "consumer",
"token_iin": null
}
```
-------------------------------------------------------------------------------------------------------

## Delete tokens
Expand Down
29 changes: 29 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import razorpay
import requests
from pprint import pprint
import json

client = razorpay.Client(auth=("rzp_test_k6uL897VPBz20q", "EnLs21M47BllR3X8PSFtjtbd"))

data = {"customer_id":"cust_JnFmpXS63vWgYJ"}

#x = client.addon.delete("ao_JniYt836HF7aQm")

x = client.transfer.all({
'expand[]':'recipient_settlement'
})

print(json.dumps(x))

# def delete(self, addon_id, data={}, **kwargs):
# """
# Delete addon for given id

# Args:
# addon_id : Id for which addon object has to be deleted
# """
# url = '{}/{}'.format(self.base_url, addon_id)

# return self.delete_url(url, data, **kwargs)
# "please check response error_code , error_desc , tax and other are missing
# tested with account va_JccSJQQoGOBi2q"