Skip to content

Scope of this API

This API can be used to integrate Magicline operations into third party clients like websites or apps.

Following operations are supported

  • Online contract conclusion
  • Trial session slot booking
  • Lead creation
Download OpenAPI description
Languages
Servers
Generated server url

https://connectdemo.api.magicline.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/magicline/connectapi/connectapi/

Campaigns

List your marketing campaigns

Operations
Operations

TrialSessions

Allow prospects to book a trial session

Operations
Operations

Referral

Additional referral information for member creation

Operations

Image

Allow prospect to upload image

Operations

Promotions

Getting information about external promotion participation

Operations
Operations
Operations
Operations
Operations

CreditCard Tokenization

Store credit cards for new members

Operations

Request

Bodyapplication/jsonrequired
browserInfostringrequired

Browser Info object, is obtained from Adyen card component and must be serialized to string

originstringrequired

Origin, obtained via window.location.origin

paymentMethodstringrequired

Payment Method, is obtained from Adyen card component and must be serialized to string

returnUrlstringrequired

Return url for redirects. If user is redirected to banking page, he will be redirected to this url after authentication.

studioIdinteger(int64)required

Studio Id

curl -i -X POST \
  https://connectdemo.api.magicline.com/connect/v2/creditcard/tokenization/initiate \
  -H 'Content-Type: application/json' \
  -d '{
    "browserInfo": "string",
    "origin": "string",
    "paymentMethod": "string",
    "returnUrl": "string",
    "studioId": 0
  }'

Responses

OK

Body*/*
actionstring

Action object by Adyen (serialized to Json string). If this is not 'null' pass it to the Adyen web component

errorMessagestring
referencestringrequired

Reference for tokenization process, use it in further requests

resultCodestringrequired

Result code by payment provider, usually 'IdentifyShopper' or 'RedirectShopper', then 'action' needs to be passed to Adyen component. Display generic error message when this is 'Error'. For a complete list see: https://docs.adyen.com/online-payments/payment-result-codes

Request

Query
studioIdinteger(int64)required

Studio Id

Example: studioId=1
countryCodestringrequired

Country code

Example: countryCode=DE
localestringrequired

Locale

Example: locale=de-DE
curl -i -X GET \
  'https://connectdemo.api.magicline.com/connect/v2/creditcard/tokenization/payment-methods?studioId=1&countryCode=DE&locale=de-DE'

Responses

Get payment methods, the contained paymentMethodsJson must be deserialized and passed to the Adyen web component

Body*/*
paymentMethodsJsonstringrequired

Contains the Adyen payment methods, serialized to JSON.

Request

Path
tokenizationReferencestringrequired

Tokenization reference you'll get via initiate endpoint

Bodyapplication/jsonrequired
redirectResultstring

Redirect result

threeDSResultstring

3DS Result

curl -i -X POST \
  'https://connectdemo.api.magicline.com/connect/v2/creditcard/tokenization/{tokenizationReference}/complete' \
  -H 'Content-Type: application/json' \
  -d '{
    "redirectResult": "string",
    "threeDSResult": "string"
  }'

Responses

OK

Body*/*
refusalReasonstring
resultCodestring

Request

Path
tokenizationReferencestringrequired
curl -i -X GET \
  'https://connectdemo.api.magicline.com/connect/v2/creditcard/tokenization/{tokenizationReference}/state'

Responses

OK

Body*/*
errorMessagestring
paymentInstrumentDtoobject(PaymentInstrumentDto)

The created payment instrument, only filled when tokenization completed

publicUserTokenstring(uuid)
statestringrequired

State of tokenization, on success this is 'COMPLETE'

Enum"INITIATE""FAILURE""COMPLETE"
userTokenstring(uuid)

Request

Path
tokenizationReferencestringrequired

Tokenization reference you'll get via initiate endpoint

Bodyapplication/jsonrequired
redirectResultstring

Redirect result

threeDSResultstring

3DS Result

curl -i -X POST \
  'https://connectdemo.api.magicline.com/connect/v1/creditcard/tokenization/{tokenizationReference}/complete' \
  -H 'Content-Type: application/json' \
  -d '{
    "redirectResult": "string",
    "threeDSResult": "string"
  }'

Responses

OK

Body*/*
refusalReasonstring
resultCodestring

Request

Path
tokenizationReferencestringrequired
curl -i -X GET \
  'https://connectdemo.api.magicline.com/connect/v1/creditcard/tokenization/{tokenizationReference}/state'

Responses

OK

Body*/*
errorMessagestring
paymentInstrumentDtoobject(PaymentInstrumentDto)

The created payment instrument, only filled when tokenization completed

publicUserTokenstring(uuid)
statestringrequired

State of tokenization, on success this is 'COMPLETE'

Enum"INITIATE""FAILURE""COMPLETE"
userTokenstring(uuid)
Operations
Operations
Operations
Operations
Operations
Operations