Payment API

Single Sign On

API Documentation

Senest redigeret:

Introduction

For various reasons you may wish to implement our SingleSignOn token in your application or CRM-integration providing full access to any entity and all actions in OnlineFundraising for a limited period of 30 minutes.

This e.g. allows trusted users in your CRM instant access to entities in OnlineFundraising without the need of a login, however we do require an email-address matching a user in OnlineFundraising in order to register who performs which actions.

Properties

Name

Type

Description

ssoTokenGuid

STRING

Unique Guid

createdTs

DATETIME

Timestamp of ssoToken creation

ssoToken

STRING

Token needed for links to OnlineFundraising

expiresTs

DATETIME

Timestamp of expiration

metaData

OBJECT

The metaData passed along with the token containing at least an email-address

Endpoints

POST /auth/ssoToken

Create a Single Sign On token lasting 30 minutes.

Request

The following must be provided as the request body:

{
  "email": "your@email.tld"
}

Response

HTTP

Description

201

Created

400

Something's wrong with request body.

HTTP 201 Example

{
  "ssoTokenGuid": "99ddbc42-2260-4faf-b35d-xxxxxxxxxxxx",
  "createdTs": "2019-09-25 16:07:47 +0200",
  "ssoToken": "877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx",
  "expiresTs": "2019-09-25 16:37:47 +0200",
  "metaData": {
    "email": "your@email.tld"
  }
}

 

GET /auth/ssoToken/{ssoTokenGuid}

Get an existing Single Sign On token.

Response

HTTP

Description

200

OK

404

Not found

HTTP 200 Example

{
  "ssoTokenGuid": "99ddbc42-2260-4faf-b35d-xxxxxxxxxxxx",
  "createdTs": "2019-09-25 16:07:47 +0200",
  "ssoToken": "877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx",
  "expiresTs": "2019-09-25 16:37:47 +0200",
  "metaData": {
    "email": "your@email.tld"
  }
}

 

Using the Single Sign On token

When the Single Sign On token is acquired, it should be appended to all links pointing to OnlineFundraising’s UI following this structure:

Contact
https://org-name.onlinefundraising.dk/contacts/?contact=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

Agreement
https://org-name.onlinefundraising.dk/agreements/?agreement=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

AddOn
https://org-name.onlinefundraising.dk/subscriptions?subscription=29fba5e5-bbe7-40a5-941c-xxxxxxxxxxxx&add_on=6e3a4f22-7ffe-4dce-9bf9-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

Subscription
https://org-name.onlinefundraising.dk/subscriptions/?subscription=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

PaymentMethod
https://org-name.onlinefundraising.dk/payment_methods/?payment_method=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

Payment
https://org-name.onlinefundraising.dk/payments/?payment=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

DataSet
https://org-name.onlinefundraising.dk/data_sets/?data_set=a792a3fc-993a-4199-ac18-xxxxxxxxxxxx&ssoToken=877b051f55bd3f9cd8d72e2d67555c107fe8627xxxxxxxxxxxx

 

The result is instant access to e.i. a Payment view like this, allowing Refund or access to the connected Contact, Subscription etc.:

payment__2_.png