/purchase_session

/adyen/purchase_session

Target audience: Developers

1
Release version: 4.2.0

Introduction

This endpoint returns an Adyen purchase session.

Attention

This API is not required for implementing the redirect purchase flow.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/adyen/purchase_session
Production https://backend.worldoftulo.com/external/api/v1/adyen/purchase_session

Requirements

Identity Scope
No /external/adyen/r

Curl Examples

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/adyen/purchase_session?id=585a4768edce2c5e6f000001 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token-with-identity>'
Parameter Description Required Format Type
Id Id of the purchase session Yes Size range ..24
Allowed values: "/^[a-f\d]{24}$/i"
String

Response

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
HTTP 200
{
  "item": {
    "id": "5ea6ed5009c04c1f1a6a9c66",
    "organisation_id": "adeprimo",
    "account_id": "5ea6ed5009c04c1f1a6a9c56",
    "period_id": "5ea6ed5009c04c1f1a6a9c61",
    "product_code": "package_code",
    "description": "description",
    "origin_key": "pub.key123123",
    "locale": "sv-SE",
    "complete_url": "https://complete.com",
    "error_url": "https://error.com",
    "cancel_url": "https://cancel.com",
    "traffic_source": "facebook",
    "merchant_reference": "adeprimo-campaign-001"
  }
}

Errors

The error response is sent as application/JSON and will have an HTTP status code ranging between 400-500.

An error message will contain these properties in every response.

Error example

1
2
3
4
5
{
  "code": "error_code",
  "field": "field",
  "message": "error message"
}