Skip to content

/get_purchase_history

/me/get_purchase_history

Target audience: Developers

1
Release version: 4.1.3

Introduction

This endpoint returns the current accounts purchase history.

URI

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

Required scope

1
/external/me/r

Curl Example

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/me/get_purchase_history \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token_with_identity>'

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
HTTP 200 OK
{
    "items": [
        {
            "payment_id": "585a4768edce2c5e6f000001",
            "order_id": "ORDERID-123",
            "description": "Digital product",
            "price": "100.0",
            "payment_method": "creditcard",
            "payment_type": "normal",
            "is_partial_payment": false,
            "is_number_based": false,
            "payment_created": "2019-08-21T12:00:00.000+02:00",
            "tulo_provisioned": true,
            "receipt_id": "5d5d278137c2edaed4f84a21",
            "masked_credit_card": "54************1234",
            "state": "closed"            
        },
        {
            "payment_id": "585a4768edce2c5e6f000002",
            "order_id": "ORDERID-234",
            "description": "Paper product",
            "price": "200.0",
            "payment_method": "creditcard",
            "payment_type": "normal",
            "is_partial_payment": false,
            "is_number_based": false,
            "payment_created": "2019-08-21T12:00:00.000+02:00",
            "tulo_provisioned": false,
            "receipt_id": "5d5d2bc837c2edb25dbe045d",
            "masked_credit_card": "54************1234",
            "state": "closed"            
        }
     ]
}

Errors

Example error response

1
2
3
4
5
6
HTTP 400 Bad Request
{
    "code": "invalid_parameter",
    "field": "account_id",
    "message": "Parameter must match format (/^[a-f\d]{24}$/)"
}

HTTP 400 Bad Request

Name Type Description
unknown_parameter Object One or more of the fields in the request was not recognized

HTTP 404 Not Found

Name Type Description
not_found Object Indicates that no account could be found associated with the acces-token in use

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side