Skip to content

Get profiles

/payment_profile

Target audience: Developers

Release version: 4.5.6

Get payment profile

Introduction

This endpoint fetches all payment profiles for the supplied account.

URI

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

Requirements

Identity Scope
Yes /external/payment_profile/r

Parameters

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

Curl examples

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

Response

HTTP 200 OK
{
  "items": [
    {
      "id": "6273b22509c04cf8cdf6f5f5",
      "account_id": "6273b22509c04cf8cdf6f5f1",
      "type": "adyen_scheme",
      "default_profile": false,
      "state": "activated",
      "meta_data": {
        "masked_number": "123***123",
        "expiry_month": "04",
        "expiry_year": "2023",
        "brand": "VISA"
      },
      "agreements": [
        "ORDER-123",
        "ORDER-456"
      ]
    },
    {
      "id": "6273b22509c04cf8cdf6f5f8",
      "account_id": "6273b22509c04cf8cdf6f5f1",
      "type": "adyen_klarna_paynow",
      "default_profile": false,
      "state": "activated",
      "meta_data": null,
      "agreements": [
        "ORDER-789"
      ]
    }
  ]
}

Errors

This API uses the common error conventions of the Payway API

See common error responses