Get profile
/me/payment_profile/find
Target audience: Developers
Release version: 4.5.4
Find payment profile¶
Introduction¶
This endpoint fetches a single payment profile for the current account, based on given search criteria.
URI¶
| Environment | URI |
|---|---|
| Stage | https://payway-api.stage.adeprimo.se/external/api/v1/me/payment_profile/find |
| Production | https://backend.worldoftulo.com/external/api/v1/me/payment_profile/find |
Requirements¶
| Identity | Scope |
|---|---|
| Yes | /external/me/payment_profile/r |
Parameters¶
You are required to supply either order_id or id.
| Field | Required | Type | Description |
|---|---|---|---|
| id | No | String | The id of the payment profile Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i". |
| order_id | No | String | Gets profile (if any) for the specified order: Allowed values: /\A[A-Z0-9]+-[0-9]+$/ |
Curl examples¶
By id¶
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/payment_profile/find?id=6273a2c309c04cf2178b4c50 \
--header 'accept: application/json' \
--header 'authorization: Bearer <access_token_with_identity>'
By order_id¶
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/payment_profile/find?order_id=ORDER-123 \
--header 'accept: application/json' \
--header 'authorization: Bearer <access_token_with_identity>'
Response¶
HTTP 200 OK
{
"item": {
"id": "6273a2c309c04cf2178b4c50",
"account_id": "6273a1a609c04ceec7409c99",
"payment_option": "adyen",
"type": "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"
]
}
}
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).
Errors¶
This API uses the common error conventions of the Payway API