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,
      "visible": true,
      "state": "activated",
      "meta_data": {
        "masked_number": "123***123",
        "expiry_month": "04",
        "expiry_year": "2023",
        "brand": "VISA"
      },
      "agreements": [
        "ORDER-123",
        "ORDER-456"
      ],
      "supports_oneclick_shopping": true
    },
    {
      "id": "6273b22509c04cf8cdf6f5f8",
      "account_id": "6273b22509c04cf8cdf6f5f1",
      "type": "adyen_klarna_paynow",
      "default_profile": false,
      "visible": true,
      "state": "activated",
      "meta_data": null,
      "agreements": [
        "ORDER-789"
      ],
      "supports_oneclick_shopping": false
    }
  ]
}

Note

visible is a boolean indicating whether the payment profile should be displayed to the customer. It always returns true or false (defaulting to true for profiles created before this flag existed). It can be changed via the Set visibility endpoint, and is gated by the enable_payment_profile_visibility rule.

Note

supports_oneclick_shopping is a boolean indicating whether the payment profile can be offered to the customer as a saved payment method for a one-click purchase. It is true when the profile is activated and has payment method details (meta_data, such as the masked card number and expiry date) to show the customer. Tulo Shop only lists payment profiles where it is true.

Errors

This API uses the common error conventions of the Payway API

See common error responses