Skip to content

Commit f3ae812

Browse files
author
Christian Wick
committed
Updated README with new examples
1 parent 3de7e1f commit f3ae812

1 file changed

Lines changed: 60 additions & 11 deletions

File tree

README.md

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Settle Request Generator
2-
This small utility can be used to help with testing the `KEY` authentication method for integration with the Settle API. It generates the correct headers for a signed request using the request parameters and a private key.
2+
3+
This small utility can be used to help with testing the `KEY` authentication method for integration with the Settle API. It generates the correct headers for a signed request using the request parameters and a private key.
34

45
## Try it here
56

6-
https://settleapi.github.io/settle-request-generator
7+
<https://settleapi.github.io/settle-request-generator>
78

89
## Authentication with the Settle API
9-
Please visit the [Settle API documentation](https://developer.settle.eu/authentication.html) for more information on the two types of authentication, `SECRET` and `KEY`.
10+
11+
Please visit the [Settle API documentation](https://developer.settle.eu/authentication.html) for more information on the two types of authentication, `SECRET` and `KEY`.
1012

1113
The api credentials are managed in the [Settle Business portal](https://business.settle.eu/) (a [sandbox version](https://business.sandbox.settle.eu/) is also available) under the *Integration* tab.
1214

@@ -15,6 +17,7 @@ To get started you can just let Settle generate the key-pair for you, but please
1517
You can also generate your own key and just upload the public part to Settle.
1618

1719
### Generate RSA private key
20+
1821
```bash
1922
openssl genrsa -des -out private.pem 2048
2023
```
@@ -25,22 +28,24 @@ You'll have to to enter a passphrase. Under appropriate conditions (noninteracti
2528
openssl rsa -in private.pem -out private.pem
2629
```
2730

28-
2931
### Generate RSA public key
3032

3133
```bash
3234
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
3335
```
3436

35-
3637
## Field data examples
3738

38-
* **Merchant ID**: `abc123`
39-
* **API key ID**: `xyz789`
40-
* **Method**: `POST`
41-
* **URL**: `https://api.sandbox.settle.eu/merchant/v1/payment_request/`
39+
### For default use with `X-Auka-User`
40+
41+
* **X-Auka-Merchant**: `abc123`
42+
* **X-Auka-User**: `xyz789`
43+
* **REST API Method**: `POST`
44+
* **REST API Endpoint URL**: `https://api.sandbox.settle.eu/merchant/v1/payment_request/`
4245
* **Request body**:
43-
```{
46+
47+
```
48+
{
4449
"payer": "abc123",
4550
"payee": "msisdn:47123456789",
4651
"idempotency_id": "04449a4866",
@@ -51,7 +56,9 @@ openssl rsa -in private.pem -outform PEM -pubout -out public.pem
5156
"expires_in": 120
5257
}
5358
```
54-
* **Private keyfor** `xyz789`:
59+
60+
* Private RSA key for **X-Auka-User** `xyz789`:
61+
5562
```
5663
-----BEGIN RSA PRIVATE KEY-----
5764
MIICXQIBAAKBgQCotJXYCo9VPuS1qjBRPAP5jAN9Wj8qmYnKMy31w81jiL3QegVQ/w6pCoy3
@@ -69,5 +76,47 @@ jFUCQQCEKcuxG/huGU5PuNRKA5TfpOE9l0cquiI9613YdbbUszc19PWXFywu5ttHzp29y3jE
6976
-----END RSA PRIVATE KEY-----
7077
```
7178

79+
### For integrator use with `X-Auka-Integrator`
80+
81+
* **X-Auka-Merchant**: `fzkmhy0q`
82+
* **X-Auka-Integrator**: `7e3cbb17`
83+
* **REST API Method**: `POST`
84+
* **REST API Endpoint URL**: `https://api.sandbox.settle.eu/merchant/v1/payment_request/`
85+
* **Request body**:
86+
87+
```
88+
{
89+
"payer": "fzkmhy0q",
90+
"payee": "msisdn:47123456789",
91+
"idempotency_id": "04449a4866",
92+
"currency": "NOK",
93+
"amount": 1000,
94+
"require_identified": "True",
95+
"chat_text": "Some text",
96+
"expires_in": 120
97+
}
98+
```
99+
100+
### Private RSA key
101+
102+
For **X-Auka-Integrator** `7e3cbb17`:
103+
104+
```
105+
-----BEGIN RSA PRIVATE KEY-----
106+
MIICWgIBAAKBgGeEsepm1Dm0LMW9H4cgO8+RpyiQh6JcWKlKfGZahTo3iXq55wGh
107+
DLOHVP1i5ULPuz8IA3HG1W481AlBeIvT/fmlKy/zjNUebAClvujpKjMRkn2p0Npg
108+
kyC4b17ZtoEkmixM2SrVhxBpy1PJoLFNKILqOGF+nFJ3Du/AEDOTNMrzAgMBAAEC
109+
gYAJYriW3hfj23grvYf8Qmnp2fTj8qa5i9HmF4DL7u0haCOo4u4U8bsrE9wa1Tqg
110+
IiGCB4H4cOStCArZg/wgAWqHeHKyn5+U74hbUnVMwj79zPgySJ/olFtrMptS8Jwe
111+
28zGDua91T7a8y/12HY+a4EGQd/K6S8z3lgnMBFcebI84QJBAKS1wVM0Nu4RZmSS
112+
50GWWui3sdHxe8OxyyiDUdBxajTuIuIH7/A6SOILRGs7cSF3ST9BVk0Lsx+jejvE
113+
rg30E9sCQQCg5KBqp93nZs0ky+DuVK63HYVo9+AF6r7bNXvvX9L0V0FaaUgqdjeL
114+
aonhBQ0VvmtCya+6poyptSbAVEmA09zJAkBI6VhaD6wdOMCd1tXeF8PIbsCdkgta
115+
dpLbLT6DSiFcqunwKtlQ+0wWHCy+V0LeMKLRCIg+dOZnJAPQ/2CZNqmvAkAl2yVT
116+
cwPnOmzyR3Y5HXuuYifNtuTi/4TAlyj9/ZHpI86gszzjoMUY7IxcgY++mfsqz8Gl
117+
LSLTm2fuwOY6hZ7hAkAmww+iGigsQK/qFUenQ1afn9hQxsLrriOgBKNZygqFBHh4
118+
4u6VK3BHZuYEpMcEzY6JSEKxucN7rZ8CulNO9A0w
119+
-----END RSA PRIVATE KEY-----
120+
```
72121

73122
[![Netlify Status](https://api.netlify.com/api/v1/badges/a7197edc-db66-4a23-b006-657a5868fdbf/deploy-status)](https://app.netlify.com/sites/settle-request-generator/deploys)

0 commit comments

Comments
 (0)