Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R14.0.0


Tip

Deprecated from CRM.COM R17.0.0


Excerpt

This method enforces the consumption of wallet funds by prepaid pre-rated services. The method can only be used for consuming wallet funds for prepaid pre-rated services.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

wallet_identifier
(mandatory)

Wallet identifier

The identifier of the wallet whose funds will be consumed. The allowed wallets identifier fields are the following:

Include Page
V4:wallet_identifier
V4:wallet_identifier

subscription_identifier

(mandatory based on conditions)

Subscription identifier

The identifier of the subscription whose services will consume the wallet's funds. Only prepaid subscriptions with at least one pre-rated service will be allowed. Mandatory if the account owner has multiple prepaid subscriptions that meed these conditions, otherwise if only one exists, then the wallet funds will be consumed by this single subscription. The allowed subscription identifier fields are the following:

Include Page
V4:subscription_identifier
V4:subscription_identifier

wallet_consumption_up_to_date

(optional)

DateDefines the date up to which the prepaid services will be rated, i.e. the date up to which all of the prepaid services of the subscription will consume the available wallet balance.

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

Name

Type

Description

wallet_balance

Number

The balance of the wallet - in wallet currency - after debiting the wallet because of wallet funds consumption

wallet_alternative_balanceNumberThe balance of the wallet - in wallet alternative currency - after debiting the wallet because of wallet funds consumption

wallet_transaction

Wallet Transaction object

The debit wallet transaction that was created during the wallet funds consumption

subscriptionSubscription objectThe prepaid subscription whose prepaid pre-rated services consumed the wallet funds

Anchor
consume wallet funds reference data
consume wallet funds reference data
Referred Objects Response Data

...

Expand
titleExample 1

HTTP Method: POST 


Request:

Body:

Response:

Code Block
     {
        "data":
        {
            "wallet_balance": 0.96,
            "subscription":
            {
                "number": "S0000009091",
                "accounts_receivable":
                {
                    "number": "ACR0000012577",
                    "verification_state": null,
                    "name": "ACR0000012577 Test 7784_6",
                    "contact_information":
                    {
                        "company_profile": null,
                        "company_name": null,
                        "name": "Test 7784_6",
                        "last_name": "7784_6",
                        "id": "2C9950BD6F4E4B56AF62C38C6B06704F",
                        "life_cycle_state": "FINANCIAL",
                        "middle_name": null,
                        "title": null,
                        "type": "PERSON",
                        "first_name": "Test",
                        "demographics":
                        {
                            "name_day":
                            {
                                "month": null,
                                "day": null
                            },
                            "id_number": "7784_6",
                            "gender": null,
                            "country_of_residence":
                            {
                                "alternative_code": "CYP",
                                "three_character_code": "CYP",
                                "name": "CYPRUS",
                                "id": "181",
                                "two_character_code": "CY"
                            },
                            "date_of_birth":
                            {
                                "month": null,
                                "year": null,
                                "day": null
                            },
                            "industry_sector": null,
                            "passport_number": null,
                            "industry": null,
                            "social_security_number": null,
                            "id_issued_by_country": null,
                            "passport_issued_by_country": null
                        }
                    },
                    "id": "8B8CE5FE0AA24CDFBBF21A6FBD169AF9",
                    "life_cycle_state": "ACTIVE"
                },
                "id": "7F26B03695C44FD19AB85AA49BB1FF06",
                "life_cycle_state": "EFFECTIVE",
                "type":
                {
                    "alternative_code": "Prepaid Pre-rate",
                    "name": "Prepaid Pre-rate",
                    "id": "CC1AA5B0D9F24FD083572E70BA27CE90"
                }
            },
            "wallet_transaction":
            {
                "number": "67925",
                "amount": 6.07,
                "wallet":
                {
                    "number": "W0000007394",
                    "accounts_receivable":
                    {
                        "number": "ACR0000012577",
                        "name": "ACR0000012577 Test 7784_6",
                        "id": "8B8CE5FE0AA24CDFBBF21A6FBD169AF9",
                        "life_cycle_state": "ACTIVE",
                        "account_owner":
                        {
                            "company_profile": null,
                            "company_name": null,
                            "name": "Test 7784_6",
                            "last_name": "7784_6",
                            "id": "2C9950BD6F4E4B56AF62C38C6B06704F",
                            "life_cycle_state": "FINANCIAL",
                            "middle_name": null,
                            "title": null,
                            "type": "PERSON",
                            "first_name": "Test",
                            "demographics":
                            {
                                "name_day":
                                {
                                    "month": null,
                                    "day": null
                                },
                                "id_number": "7784_6",
                                "gender": null,
                                "country_of_residence":
                                {
                                    "alternative_code": "CYP",
                                    "three_character_code": "CYP",
                                    "name": "CYPRUS",
                                    "id": "181",
                                    "two_character_code": "CY"
                                },
                                "date_of_birth":
                                {
                                    "month": null,
                                    "year": null,
                                    "day": null
                                },
                                "industry_sector": null,
                                "passport_number": null,
                                "industry": null,
                                "social_security_number": null,
                                "id_issued_by_country": null,
                                "passport_issued_by_country": null
                            }
                        }
                    },
                    "id": "98D2EB581BF640548D6B38894395D415",
                    "life_cycle_state": "EFFECTIVE"
                },
                "log_information":
                {
                    "created_by_unit":
                    {
                        "alternative_code": "adminunit",
                        "group_name": "Main Group",
                        "community_name": "Community",
                        "name": "Admin Unit",
                        "description": "admin unit",
                        "id": "1"
                    },
                    "updated_by_unit":
                    {
                        "alternative_code": "adminunit",
                        "group_name": "Main Group",
                        "community_name": "Community",
                        "name": "Admin Unit",
                        "description": "admin unit",
                        "id": "1"
                    },
                    "created_date": "2017-09-26T14:18:51",
                    "updated_date": "2017-09-26T14:18:55",
                    "updated_by_user":
                    {
                        "person_name": "CRM COM",
                        "id": "1",
                        "username": "MPAdministrator"
                    },
                    "created_by_user":
                    {
                        "person_name": "CRM COM",
                        "id": "1",
                        "username": "MPAdministrator"
                    }
                },
                "caused_by_entity": "PREPAIDBILLINGRUN",
                "currency_rate_period": null,
                "id": "F248DF1625984099AD52404B5C8351CE",
                "life_cycle_state": "EFFECTIVE",
                "extra_added_amount": null,
                "type":
                {
                    "alternative_code": "DWT",
                    "name": "Debit Wallet Transaction",
                    "description": null,
                    "id": "79050090144946579BDA43E11DB49543",
                    "classification": "DEBIT"
                },
                "caused_by_entity_id": "0FED3B8BCD63470284198A2285EEE846"
            }
        },
        "status":
        {
            "code": "OK",
            "description": "",
            "message": ""
        }
    }

 

...