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
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/f4516111-2bfc-4ae0-9fc3-626cfe56e954/deploy-status)](https://app.netlify.com/sites/settle-developer-docs/deploys)

# Settle API Docs

## Introduction

This is the repo for the [Settle APIs Documentation](https://developer.settle.eu/) website. It's buildt using [Vuepress](https://vuepress.vuejs.org/) - a minimalistic Vue-powered static site generator from [Evan You](https://evanyou.me/), the creator of [Vue.js](https://vuejs.org/), and [Netlify CMS](https://www.netlifycms.org/) - an open source content management for your [Git workflow](https://guides.github.com/introduction/flow/).

***TL;DR:*** *[Contributing and setting up local environment](#contributing)*
**_TL;DR:_** _[Contributing and setting up local environment](#contributing)_

## VuePress

Expand Down Expand Up @@ -52,13 +53,19 @@ At its core, **Netlify CMS** is an open-source React app that acts as a wrapper

`yarn install`

4. ### Start the local dev server
4. ### Add .env.local file

Create a new file in the root folder named `.env.local` and add the `GITHUB_TOKEN` environment variable found in the Netlify Deploy Settings.

Learn more about environment variables over in the [Netlify docs](https://docs.netlify.com/configure-builds/environment-variables/)

5. ### Start the local dev server

`yarn docs:dev`

By default, you should now see your scaffolded Settle APIs docs site at [https://localhost:8080](https://localhost:8080)🚀

5. ### Start the local CMS server
6. ### Start the local CMS server

`npx netlify-cms-proxy-server`

Expand All @@ -78,10 +85,10 @@ At its core, **Netlify CMS** is an open-source React app that acts as a wrapper

3. ### Push to the branch

`git push origin feat/my-awesome-feature`
`git push origin feat/my-awesome-feature`

4. ### Open a Pull Request 🤓

`gh pr create --title "My Awesome feature" --body "This is my new awesome feature." --base dev`
`gh pr create --title "My Awesome feature" --body "This is my new awesome feature." --base dev`

**NOTE:** Pull Requests are used to start conversation about proposed changes before they're code is reviewed and eventually merged into the main branch, and **we will only consider Pull Requests initiated towards the [dev branch](https://github.com/SettleAPI/settle-developer-docs/tree/dev)**. Pull Requests towards any other branch will be ignored and closed without any further notifications.
**NOTE:** Pull Requests are used to start conversation about proposed changes before they're code is reviewed and eventually merged into the main branch, and **we will only consider Pull Requests initiated towards the [dev branch](https://github.com/SettleAPI/settle-developer-docs/tree/dev)**. Pull Requests towards any other branch will be ignored and closed without any further notifications.
20 changes: 15 additions & 5 deletions docs/.vuepress/theme/components/PageResource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@
<li>
Required Auth Level:
<router-link
v-if="$frontmatter.authLevel === 'SECRET'"
:to="'/guides/authentication/#authentication-using-secret'"
>SECRET</router-link
>
>{{ $frontmatter.authLevel }}
</router-link>
<router-link
v-if="$frontmatter.authLevel === 'KEY'"
:to="'/guides/authentication/#authentication-using-key'"
>{{ $frontmatter.authLevel }}
</router-link>
</li>
<li>Authorized Roles: All</li>
<li>Authorized Roles: {{ $frontmatter.authRoles }}</li>
</ul>
<h3 id="base-uris" v-if="servers">
<a href="#base-uris" class="header-anchor">#</a> Base URIs
Expand Down Expand Up @@ -140,7 +146,7 @@
<p class="custom-block-title">NOTE</p>
<p>The request body can not be empty.</p>
</div>

<h2 id="response-body">
<a href="#response-body" class="header-anchor">#</a> Response Body
</h2>
Expand All @@ -152,7 +158,11 @@
<div v-else>
<div class="warning custom-block">
<p class="custom-block-title">WARNING</p>
<p>No reference found for method <strong>{{ $frontmatter.operationId }}</strong>.</p>
<p>
No reference found for method
<strong>{{ $frontmatter.operationId }}</strong
>.
</p>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/api/reference/rest/v1/merchant.settlement.latest/get.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
layout: SpecialLayout
title: merchant.settlement.latest
title: merchant.settlement.latest.get
description: Endpoint description...
api: merchant
schema: merchant.settlement.latest
operationId: merchant.settlement.latest
operationId: merchant.settlement.latest.get
operation: get
method: get
authLevel: SECRET
authRoles: Any
---
---
47 changes: 46 additions & 1 deletion docs/api/reference/rest/v1/merchant.shortlink/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,49 @@ title: merchant.shortlink
description: Overview
schema: merchant.shortlink
api: merchant
---
---

## Shortlink Scan Handler

When user scans, Settle sends scan id and argstring, and can receive text and uri which can be transported back to the app. Uri will be opened in a web view inside the app if registered in list of trusted domains.

<div class="md-api_reference_FiraCode">
<div class="md-api_reference_request_heading">
<p>
<span class="badge post">POST</span> http://merchant.server/callback/url
</p>
</div>
</div>

<h2 id="schema">
<a href="#schema" class="header-anchor">#</a> Schema
</h2>

<div class="md-api_reference_FiraCode">

### id

- Type: `string`
- Required: `true`

The scan token ID that can be used as recipient for payment and permission requests. Expires in one day.

### argstring

- Type: `string`
- Required: `false`
- Default: `null`

The string that was appended to the shortlink value in the QR code that was scanned.

</div>

## Trusted Domains

Because of security considerations when opening external URIs inside the Settle App, URIs or domains that will be opened in the app needs to be preapproved by Settle.

There are currently no API endpoints for managing trusted domains, please contact Settle support to register domain that should be visible inside app.

## Shortlink Management

To be able to receive scans, one must first register a shortlink.
6 changes: 5 additions & 1 deletion docs/api/reference/rest/v1/merchant.statusCodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ title: merchant.statusCodes
description: Overview
schema: merchant.statusCodes
api: merchant
---
---

## Status Code

Some resources, such as the outcome resources (for payment request and permission request), have a status code field in the response body. The status_code resource lists and describes all possible status codes. Making a `GET /status_code/` request yields a list of status codes with corresponding names and descriptions. Making a `GET /status_code/{value}/` request (substituting `{value}` for a status code integer) yields the information for a particular status code.
6 changes: 3 additions & 3 deletions docs/api/reference/rest/v1/merchant.users/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ schema: merchant.users
operationId: merchant.users.create
operation: post
method: create
authLevel: SECRET
authRoles: Any
---
authLevel: KEY
authRoles: All
---
6 changes: 3 additions & 3 deletions docs/api/reference/rest/v1/merchant.users/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ schema: merchant.users
operationId: merchant.users.delete
operation: delete
method: delete
authLevel: SECRET
authRoles: Any
---
authLevel: KEY
authRoles: All
---
4 changes: 2 additions & 2 deletions docs/api/reference/rest/v1/merchant.users/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ operationId: merchant.users.get
operation: get
method: get
authLevel: SECRET
authRoles: Any
---
authRoles: All
---
8 changes: 7 additions & 1 deletion docs/api/reference/rest/v1/merchant.users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ title: merchant.users
description: Overview
schema: merchant.users
api: merchant
---
---

## Mercant Users

In order to gain access to the [Merchant API](/api/reference/rest/v1/) a client must authenticate itself using the ID and the secret/public key of an existing user. This means that the first user for a merchant must be created in the Self Service Portal or by an integrator on behalf of the merchant.

Each user is created for a specific merchant, which ID is given by the value of the **X-Settle-Merchant** header when making a [ `merchant.users.create` ](/api/reference/rest/v1/merchant.users/create/) request. A user can only interact with the API on behalf of the merchant which it was created for. The user ID is chosen on create and is has to be unique for the parent Merchant.
6 changes: 3 additions & 3 deletions docs/api/reference/rest/v1/merchant.users/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ schema: merchant.users
operationId: merchant.users.update
operation: put
method: update
authLevel: SECRET
authRoles: Any
---
authLevel: KEY
authRoles: All
---
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ title: users.permissions.request
description: Overview
schema: users.permissions.request
api: users
---
---

## Permission Request

Request authorization to access user controlled endpoint.