-
Notifications
You must be signed in to change notification settings - Fork 134
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 #299 from razorpay/doc_correction
customer doc corrections
- Loading branch information
Showing
25 changed files
with
1,394 additions
and
622 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
### Create customer | ||
```php | ||
$api->customer->create(array('name' => 'Razorpay User', 'email' => '[email protected]','contact'=>'9123456780','notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf')); | ||
$api->customer->create(array('name' => 'Razorpay User', 'email' => '[email protected]','contact'=>'9123456780', 'fail_existing'=> '0', 'notes'=> array('notes_key_1'=> 'Tea, Earl Grey, Hot','notes_key_2'=> 'Tea, Earl Grey… decaf'))); | ||
``` | ||
|
||
**Parameters:** | ||
|
@@ -36,22 +36,25 @@ $api->customer->create(array('name' => 'Razorpay User', 'email' => 'customer@raz | |
### Create order | ||
|
||
```php | ||
$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'emandate','customer_id' => 'cust_1Aa00000000001','receipt' => 'Receipt No. 1','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'netbanking','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); | ||
$api->order->create(array('amount' => 0,'currency' => 'INR','method' => 'emandate','payment_capture' => true, 'customer_id' => 'cust_JdumbHq5F3kKu6','receipt' => 'Receipt No. #19','notes' => array('notes_key_1' => 'Beam me up Scotty','notes_key_2' => 'Engage'),'token' => array('auth_type' => 'netbanking','max_amount' => 9999900,'expire_at' => 4102444799,'notes' => array('notes_key_1' => 'Tea, Earl Grey, Hot','notes_key_2' => 'Tea, Earl Grey… decaf.'),'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0000001')))); | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| amount* | integer | Amount of the order to be paid | | ||
| 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. | | ||
| notes | array | A key-value pair | | ||
| token | array | A key-value pair | | ||
| 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 | | ||
| method* | string | Payment method used to make the registration transaction. Possible value is `emandate`. | | ||
| receipt | string | Your system order reference id. | | ||
| 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. | | ||
| token | array | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#112-create-an-order) are supported| | ||
| notes | object | A key-value pair | | ||
|
||
**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 | ||
|
@@ -63,23 +66,27 @@ Please refer this [doc](https://razorpay.com/docs/api/recurring-payments/emandat | |
### Create registration link | ||
|
||
```php | ||
$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'[email protected]','contact'=>'9123456780'),'type'=>'link','amount'=>100,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'emandate','max_amount'=>'500','expire_at'=>'1634215992'),'receipt'=>'Receipt No. 5','email_notify'=>1,'sms_notify'=>1,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); | ||
$api->subscription->createSubscriptionRegistration(array('customer'=>array('name'=>'Gaurav Kumar','email'=>'[email protected]','contact'=>'9123456780'),'type'=>'link','amount'=>0,'currency'=>'INR','description'=>'Registration Link for Gaurav Kumar','subscription_registration'=>array('method'=>'emandate', 'auth_type'=>'netbanking', 'max_amount'=>'500', 'bank_account' => array('beneficiary_name' => 'Gaurav Kumar','account_number' => '1121431121541121','account_type' => 'savings','ifsc_code' => 'HDFC0001233'), 'expire_at'=>'1634215992'),'receipt'=>'Receipt No. 5','email_notify'=>1,'sms_notify'=>1,'expire_by'=>1634215992,'notes' => array('note_key 1' => 'Beam me up Scotty','note_key 2' => 'Tea. Earl Gray. Hot.'))); | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| customer | array | Details of the customer to whom the registration link will be sent. | | ||
| customer* | array | 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 | array | Details of the authorization payment. | | ||
| notes | array | A key-value pair | | ||
| subscription_registration | array | 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 | array | 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) | ||
Create registration link response please click [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Send/Resend notifications | ||
|
@@ -302,7 +309,7 @@ $api->customer->fetch($customerId)->tokens()->delete($tokenId); | |
### Create an order to charge the customer | ||
|
||
```php | ||
$api->order->create(array('receipt' => '123', 'amount' => 100, 'currency' => 'INR', 'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); | ||
$api->order->create(array('amount' => 1000,'currency' => 'INR','payment_capture' => true,'receipt' => 'Receipt No. 1','notes'=> array('notes_key_1' => 'Tea, Earl Grey, Hot', 'notes_key_2' => 'Tea, Earl Grey… decaf.'))); | ||
``` | ||
|
||
**Parameters:** | ||
|
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
Oops, something went wrong.