Skip to content

Get receipt

/me/get_receipt

Target audience: Developers

Release version: 4.1.3

Get receipt

Introduction

This endpoint returns a receipt of the current account.

URI

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

Requirements

Identity Scope
Yes /external/me/r

Parameters

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

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/me/get_receipt \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token_with_identity>' \
  --header 'content-type: application/json' \
  --data '{
              "receipt_id": "50f3ac249f6aef294d000007"
          }'

Response

HTTP 200 OK
{
    "item": {
        "id": "50f3ac249f6aef294d000007",
        "organisation_id": "adeprimo",
        "created_at": "2019-08-21T12:00:00.000+02:00",
        "updated_at": "2019-08-21T12:00:00.000+02:00",
        "paid_at": "2019-08-21T12:00:00.000+02:00",
        "company_name": "Adeprimo Ab",
        "crn": "123456-7890",
        "order_id": "ORDERID-123",
        "email": "sales@adeprimo.se",
        "phone_nr": "+4670 1234567",
        "address": "Zätagränd 11, 11111 Östersund",
        "receipt_text": "Thank you for purchasing from us!",
        "articles": [
          {
            "name": "Digital (1 month)",
            "type": "subscription",
            "amount": "100.0",
            "numbers": "",
          }
        ],
        "sum": "100.0",
        "vat_specifications": [
          {
            "vat_amount": "20.0",
            "vat_percentage": "25",
            "net_amount": "80.0",
            "gross_amount": "100.0",
          }
        ],
        "payment_method": "CREDITCARD",
        "masked_cc_nr": "54**********1234",
    }         
}

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