Skip to content

Commit

Permalink
feat: Added new API endpoints (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitdas13 authored Dec 18, 2023
1 parent 2180c8c commit 0f90a48
Show file tree
Hide file tree
Showing 27 changed files with 1,729 additions and 76 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ on:
- cron: '30 20 * * *'
jobs:
semgrep:
name: Scan
runs-on: [ubuntu-latest] # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
name: Semgrep
runs-on: [ubuntu-latest]
container:
image: returntocorp/semgrep
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
with:
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
publishDeployment: 339
- uses: actions/[email protected]
- name: Run semgrep
run: semgrep ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

workflow_status:
runs-on: [ ubuntu-latest ] # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
Expand Down Expand Up @@ -48,4 +48,4 @@ jobs:
curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \
-d '{ "state" : "success" , "context" : "github/security-status-check" , "description" : "github/security-status-check", "target_url" : "https://github.com/${{ github.repository }}" }' \
https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.githubCommit }}
exit 0
exit 0
104 changes: 104 additions & 0 deletions documents/Iin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
### Iin

### Token IIN API

```php
$tokenIin = "412345";
$api->iin->fetch($tokenIin);
```

**Parameters:**

| Name | Type | Description |
|------------|--------|-----------------------------------|
| tokenIin* | string | The token IIN. |

**Response:**
```json
{
"iin": "412345",
"entity": "iin",
"network": "Visa",
"type": "credit",
"sub_type": "business",
"issuer_code": "HDFC",
"issuer_name": "HDFC Bank Ltd",
"international": false,
"is_tokenized": true,
"card_iin": "411111",
"emi":{
"available": true
},
"recurring": {
"available": true
},
"authentication_types": [
{
"type":"3ds"
},
{
"type":"otp"
}
]
}
```
-------------------------------------------------------------------------------------------------------

### Fetch All IINs Supporting Native OTP

```php
$api->iin->all(array("flow" => "otp"));
```

**Response:**
```json
{
"count": 24,
"iins": [
"512967",
"180005",
"401704",
"401806",
"123456",
"411111",
"123512967",
"180012305",
"401123704"
]
}
```
-------------------------------------------------------------------------------------------------------

### Fetch All IINs with Business Sub-type

```php
$api->iin->all(array("sub_type" => "business"));
```

**Response:**
```json
{
"count": 24,
"iins": [
"512967",
"180005",
"401704",
"401806",
"607389",
"652203",
"414367",
"787878",
"123456",
"411111",
"123512967",
"180012305",
"401123704"
]
}
```
-------------------------------------------------------------------------------------------------------

**PN: * indicates mandatory fields**
<br>
<br>
**For reference click [here](https://razorpay.com/docs/api/payments/cards/iin-api/#iin-entity)**
60 changes: 60 additions & 0 deletions documents/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,66 @@ $api->account->fetch($accountId);

-------------------------------------------------------------------------------------------------------

### Upload account documents
```php

$accountId = "acc_M83Uw27KXuC7c8";

$payload = [
'file'=> '/Users/your_name/Downloads/sample_uploaded.pdf'
"document_type" => "business_proof_url"
];

$api->account->fetch($accoundId)->uploadAccountDoc($payload);
```

**Parameters:**

| Name | Type | Description |
|-------------|-------------|---------------------------------------------|
| accountId* | string | The unique identifier of a sub-merchant account generated by Razorpay. |
| file* | string | The URL generated once the business proof document is uploaded. |
| document_type* | string | The documents valid for the proof type to be shared. Possible values : <br> business_proof_of_identification: `shop_establishment_certificate`, `gst_certificate`, `msme_certificate`, `business_proof_url`, `business_pan_url`, <br><br> additional_documents : `form_12_a_url`, `form_80g_url`, `cancelled_cheque` |

**Response:**
```json
{
"business_proof_of_identification": [
{
"type": "business_proof_url",
"url": "<https://rzp.io/i/bzDKbNg>"
}
]
}
```
-------------------------------------------------------------------------------------------------------

### Fetch account documents
```php
$accountId = "acc_M83Uw27KXuC7c8";

$api->account->fetch($accoundId)->fetchAccountDoc();
```

**Parameters:**

| Name | Type | Description |
|-------------|-------------|---------------------------------------------|
| accountId* | string | The unique identifier of a sub-merchant account generated by Razorpay. |

**Response:**
```json
{
"business_proof_of_identification": [
{
"type": "business_proof_url",
"url": "<https://rzp.io/i/bzDKbNg>"
}
]
}
```
-------------------------------------------------------------------------------------------------------

**PN: * indicates mandatory fields**
<br>
<br>
Expand Down
Loading

0 comments on commit 0f90a48

Please sign in to comment.