Get profile
/payment_profile/find
Target audience: Developers
Release version: 4.5.6
Find payment profile¶
Introduction¶
This endpoint fetches a single payment profile for the supplied account, based on given search criteria.
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/payment_profile/find |
Production | https://backend.worldoftulo.com/external/api/v1/payment_profile/find |
Requirements¶
Identity | Scope |
---|---|
No | /external/payment_profile/r |
Parameters¶
You are required to supply either order_id
or id
.
Field | Required | Type | Description |
---|---|---|---|
account_id | Yes | String | The id of the account Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i". |
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?account_id=7273a2c309c04cf2178b4c50&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?account_id=7273a2c309c04cf2178b4c50&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",
"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"
]
}
}
Errors¶
This API uses the common error conventions of the Payway API