Skip to content

Get purchase history

/me/get_purchase_history

Target audience: Developers

Release version: 4.1.3

Get purchase history

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

Requirements

Identity Scope
Yes /external/me/r

Curl Example

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

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

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