Skip to content

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

ParameterTypeDescription
objectstringAlways v2.account.
idstringThe object's unique identifier.
user_idstring|nullIdentifier of the underlying user account.
is_staffbooleanWhether the account belongs to a YouCan staff member.
emailstringThe account's email address.
live_mode_enabledbooleanWhether the account can process live transactions.
identity_verifiedbooleanWhether the account's identity has been verified.
statusstringThe status of the account.
balanceobject|nullAvailable balance, as a money object.
holdobject|nullHeld balance, as a money object.
commission.local_credit_card.percentagefloatCommission percentage on local credit card transactions.
commission.local_credit_card.fixednumberFixed fee on local credit card transactions.
commission.local_credit_card.currencystringCurrency of the fixed fee.
commission.local_credit_card.displaystringHuman-readable representation of the commission.
commission.international_credit_card.*Same shape, for international credit card transactions.
config.max_daily_volumeinteger|nullMaximum daily processing volume, or null if unlimited.
config.hold_percentagefloatPercentage of each transaction placed on hold.
config.gatewaysarrayEnabled payment gateways: credit_card, cashplus.
config.success_urlstring|nullDefault redirect URL on successful payment.
config.error_urlstring|nullDefault redirect URL on failed payment.
localestringThe account's locale.
created_atstring|nullWhen the account was created.

Money object

Any field described as a "money object" has the following shape:

ParameterTypeDescription
amountstringThe amount formatted in major units.
currencystringThe ISO currency code.
localizedstringThe localized, human-readable representation.