Account Information
Retrieves the details of the current account.
Required scope: view-account
Returns
Returns an Account object if the call succeeds. If the account ID does not exist, this call returns an error.
Request
Endpoint: https://youcanpay.com/api/v2/account/meMethod: GET
bash
$ curl --location --request GET 'https://youcanpay.com/api/v2/account/me' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'Response
json
{
"object": "v2.account",
"id": "30801ee4-04c2-4a38-8627-91cbffdab749",
"user_id": "30801ee4-04c2-4a38-8627-91cbffdab749",
"is_staff": false,
"email": "[email protected]",
"live_mode_enabled": true,
"identity_verified": true,
"status": "active",
"balance": {
"amount": "0.00",
"currency": "MAD",
"localized": "MAD 0.00"
},
"hold": {
"amount": "0.00",
"currency": "MAD",
"localized": "MAD 0.00"
},
"commission": {
"local_credit_card": {
"percentage": 1.9,
"fixed": 2,
"currency": "MAD",
"display": "1.9% + 2 MAD"
},
"international_credit_card": {
"percentage": 2.9,
"fixed": 2,
"currency": "MAD",
"display": "2.9% + 2 MAD"
}
},
"config": {
"max_daily_volume": null,
"hold_percentage": 0,
"gateways": ["credit_card", "cashplus"],
"success_url": null,
"error_url": null
},
"locale": "en_US",
"created_at": "2023-12-26 15:23:39"
}Attributes
| Parameter | Type | Description |
|---|---|---|
object | string | Always v2.account. |
id | string | The object's unique identifier. |
user_id | string|null | Identifier of the underlying user account. |
is_staff | boolean | Whether the account belongs to a YouCan staff member. |
email | string | The account's email address. |
live_mode_enabled | boolean | Whether the account can process live transactions. |
identity_verified | boolean | Whether the account's identity has been verified. |
status | string | The status of the account. |
balance | object|null | Available balance, as a money object. |
hold | object|null | Held balance, as a money object. |
commission.local_credit_card.percentage | float | Commission percentage on local credit card transactions. |
commission.local_credit_card.fixed | number | Fixed fee on local credit card transactions. |
commission.local_credit_card.currency | string | Currency of the fixed fee. |
commission.local_credit_card.display | string | Human-readable representation of the commission. |
commission.international_credit_card.* | Same shape, for international credit card transactions. | |
config.max_daily_volume | integer|null | Maximum daily processing volume, or null if unlimited. |
config.hold_percentage | float | Percentage of each transaction placed on hold. |
config.gateways | array | Enabled payment gateways: credit_card, cashplus. |
config.success_url | string|null | Default redirect URL on successful payment. |
config.error_url | string|null | Default redirect URL on failed payment. |
locale | string | The account's locale. |
created_at | string|null | When the account was created. |
Money object
Any field described as a "money object" has the following shape:
| Parameter | Type | Description |
|---|---|---|
amount | string | The amount formatted in major units. |
currency | string | The ISO currency code. |
localized | string | The localized, human-readable representation. |