Skip to content

Get purchase history

/account/get_purchase_history

Target audience: Developers

Get purchase history

Introduction

This endpoint returns the purchase history of a given account.

URI

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

Requirements

Identity Scope
No /external/account/r

Parameters

Field Required Type Description
account_id Required String The id of the requested account
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v4/account/get_purchase_history \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token_without_identity>'
  --data   '{
            "account_id": "50f3ac249f6aef294d000007"
            }'

Response

HTTP 200 OK
{
  "items": [
    {
      "payment_id": "585a4768edce2c5e6f000001",
      "transaction_number": "ABCDEF123456",
      "order_id": "ORDERID-123",
      "description": "Digital product",
      "price": "100.0",
      "payment_method": "adyen",
      "payment_method_details": {
        "type": "scheme",
        "name": "Card"
      },
      "payment_type": "normal",
      "is_partial_payment": false,
      "is_number_based": false,
      "is_voucher_purchase": false,
      "voucher_code": null,
      "payment_created": "2019-08-21T12:00:00.000+02:00",
      "tulo_provisioned": true,
      "receipt_id": "5d5d278137c2edaed4f84a21",
      "masked_credit_card": "54************1234",
      "state": "closed",
      "offline_payment": false,
      "payment_ref": "ABC123",
      "paid": true,
      "pending": false,
      "failed": false,
      "internal": false
    },
    {
      "payment_id": "585a4768edce2c5e6f000002",
      "transaction_number": "ABCDEF123456",
      "order_id": "ORDERID-234",
      "description": "Paper product",
      "price": "200.0",
      "payment_method": "adyen",
      "payment_method_details": {
        "type": "scheme",
        "name": "Card"
      },
      "payment_type": "normal",
      "is_partial_payment": false,
      "is_number_based": false,
      "is_voucher_purchase": false,
      "voucher_code": null,
      "payment_created": "2019-08-21T12:00:00.000+02:00",
      "tulo_provisioned": false,
      "receipt_id": "5d5d2bc837c2edb25dbe045d",
      "masked_credit_card": "54************1234",
      "state": "closed",
      "offline_payment": false,
      "payment_ref": "ABC123",
      "paid": true,
      "pending": false,
      "failed": false,
      "internal": false
    }
  ]
}

Errors

This API uses the common error conventions of the Payway API

See common error responses