-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from razorpay/customer_doc_correction
customer doc correction
- Loading branch information
Showing
34 changed files
with
1,250 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ Razorpay::Customer.create({ | |
"contact": 9123456780, | ||
"email": "[email protected]", | ||
"fail_existing": 0, | ||
"gstin": "29XAbbA4369J1PA", | ||
"notes": { | ||
"notes_key_1": "Tea, Earl Grey, Hot", | ||
"notes_key_2": "Tea, Earl Grey… decaf." | ||
|
@@ -28,6 +27,7 @@ Razorpay::Customer.create({ | |
| email | string | Email of the customer | | ||
| contact | string | Contact number of the customer | | ||
| notes | object | A key-value pair | | ||
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`| | ||
|
||
**Response:** | ||
```json | ||
|
@@ -50,9 +50,10 @@ Razorpay::Customer.create({ | |
### Create order | ||
|
||
```rb | ||
Razorpay::Customer.create({ | ||
Razorpay::Order.create({ | ||
"amount": 0, | ||
"currency": "INR", | ||
"payment_capture": true, | ||
"method": "emandate", | ||
"customer_id": "cust_1Aa00000000001", | ||
"receipt": "Receipt No. 1", | ||
|
@@ -70,7 +71,7 @@ Razorpay::Customer.create({ | |
}, | ||
"bank_account": { | ||
"beneficiary_name": "Gaurav Kumar", | ||
"account_number": 1121431121541121, | ||
"account_number": "1121431121541121", | ||
"account_type": "savings", | ||
"ifsc_code": "HDFC0000001" | ||
} | ||
|
@@ -86,12 +87,14 @@ Razorpay::Customer.create({ | |
| currency* | string | Currency of the order. Currently only `INR` is supported. | | ||
| method* | string | The authorization method. In this case the value will be `emandate` | | ||
| receipt | string | Your system order reference id. | | ||
| customer_id* | string | The `customer_id` for the customer you want to charge.| | ||
| payment_capture | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. | | ||
| notes | object | A key-value pair | | ||
| token | object | A key-value pair | | ||
| notes | object | A key-value pair | | ||
| token | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#112-create-an-order) are supported| | ||
|
||
**Response:** | ||
Create order response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#112-create-an-order) | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Create an Authorization Payment | ||
|
@@ -142,16 +145,20 @@ Razorpay::SubscriptionRegistration.create(para_attr) | |
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| customer | object | Details of the customer to whom the registration link will be sent. | | ||
| customer* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported | | ||
| type* | string | In this case, the value is `link`. | | ||
| currency* | string | The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. | | ||
| amount* | integer | The payment amount in the smallest currency sub-unit. | | ||
| description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). | | ||
| subscription_registration | object | Details of the authorization payment. | | ||
| notes | object | A key-value pair | | ||
| subscription_registration | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported | | ||
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) | | ||
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. | | ||
| receipt | string | Your system order reference id. | | ||
| notes | object | A key-value pair | | ||
|
||
**Response:** | ||
Create registration link response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#121-create-a-registration-link) | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Send/Resend notifications | ||
|
@@ -161,7 +168,7 @@ invoiceId = "inv_JDdNb4xdf4gxQ7" | |
|
||
medium = "email" | ||
|
||
Razorpay::Invoice.notifyBy(invoiceId, medium) | ||
Razorpay::Invoice.notify_by(invoiceId, medium) | ||
``` | ||
|
||
**Parameters:** | ||
|
@@ -313,7 +320,7 @@ Razorpay::Payment.fetch(paymentId) | |
```rb | ||
customerId = "cust_1Aa00000000004" | ||
|
||
Razorpay::Customer.fetchTokens(customerId) | ||
Razorpay::Customer.fetch(customerId).fetchTokens | ||
``` | ||
|
||
**Parameters:** | ||
|
@@ -367,7 +374,7 @@ customerId = "cust_1Aa00000000004" | |
|
||
tokenId = "token_Hxe0skTXLeg9pF" | ||
|
||
Razorpay::fetch(customerId).deleteToken(tokenId) | ||
Razorpay::Customer.fetch(customerId).deleteToken(tokenId) | ||
``` | ||
|
||
**Parameters:** | ||
|
@@ -409,6 +416,7 @@ Razorpay::Order.create(para_attr) | |
| currency* | string | Currency of the order. Currently only `INR` is supported. | | ||
| receipt | string | Your system order reference id. | | ||
| notes | object | A key-value pair | | ||
| payment_capture* | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. | | ||
|
||
**Response:** | ||
```json | ||
|
@@ -450,7 +458,7 @@ para_attr = { | |
"note_key 2": "Tea. Earl Gray. Hot." | ||
} | ||
} | ||
Razorpay::Payment.createRecurringPayment(para_attr) | ||
Razorpay::Payment.create_recurring_payment(para_attr) | ||
``` | ||
|
||
**Parameters:** | ||
|
Oops, something went wrong.