Skip to content

Account Information

Retrieves the details of the current account.

You can add an expand param to the request URL in case you want to get your identity info: https://api.youcanpay.com/account/me?expand=identity.

Returns

Returns an Account object if the call succeeds. If the account ID does not exist, this call returns an error.

Request

Endpoint: https://api.youcanpay.com/account/meMethod: GET

bash
$ curl --location --request POST 'https://api.youcanpay.com/account/me' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'

Response

json
{
    "data": {
        "object": "account",
        "id": "30801ee4-04c2-4a38-8627-91cbffdab749",
        "parent_id": null,
        "first_name": "Customer",
        "last_name": "Customer",
        "phone": "+212699007772",
        "email": "customer1@gmail.com",
        "created_at": 1703597019,
        "status": "Active",
        "locale": "en_US",
        "success_url": null,
        "error_url": null,
        "email_verified_at": null,
        "phone_verified_at": null,
        "suspended_at": null,
        "suspension_reason": null,
        "identity": "44b3f6f6-d502-48f2-b1cc-9ee60ca84f6a",
        "funds": {
            "data": {
                "object": "funds",
                "balance": {
                    "amount": "0",
                    "currency": "MAD",
                    "localized": "MAD 0.00"
                },
                "hold": {
                    "amount": "0",
                    "currency": "MAD",
                    "localized": "MAD 0.00"
                }
            }
        }
    }
}