Versions Compared

Key

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

Available from CRM.COM R14.0.0

Excerpt

This method transfers money from an active wallet to its related accounts receivable or from an active accounts receivable to its related active wallet, if there is enough money.

Resource URL

Parameters

String

Name

Type

Description

token

String

The token retrieved from the login method

mode

(mandatory)

It determines if the money transferring will be performed from a wallet to an account or vice versa. The following options are supported:

  • WALLET_TO_ACCOUNT: If this mode is set then it is mandatory to specify a wallet from which the money transfer will be performed. The accounts receivable field is not applicable.
  • ACCOUNT

    _

    TO_WALLET: If this mode is set then it is mandatory to specify an accounts receivable from which the money transfer will be performed. The wallet field is not applicable.

    wallet_identifier
    (
    semi-optionalmandatory)

    Wallet identifier

    The identifier of the wallet from which the money will be transferred. Note that this information is applicable and mandatory only if the mode is set to WALLET_TO_ACCOUNT.   The allowed wallets identifier fields are the following:

    Include Page
    V4:wallet_identifier
    V4:wallet_identifier

    accounts_receivable_identifier

    (semi-optional)

    Accounts Receivable Identifier

    The identifier of the accounts receivable from to which the money will be transferred. Note that this information is applicable and mandatory only if the mode is set to ACCOUNT_TO_WALLET. If not specified then the wallet amount will be transferred to the accounts receivable that owns the wallet. The allowed accounts receivable identifier fields are the following:

    Include Page
    V4:accounts_receivable_identifier
    V4:accounts_receivable_identifier

    Tip

    Available from CRM.COM R14.1.0

    amount

    (mandatory)

    FloatThe amount that will be transferred from the active wallet to its related accounts receivable or from the active accounts receivable to its related active wallet based on the mode selected. This amount is in the accounts receivable's currency which is also the wallet's currency.

    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 after the transfer

    wallet_alternative_balanceNumber

    The balance of the wallet in wallet alternative currency, after the transfer

    Tip

    Available form CRM.COM R14.2.0

    accounts_receivable_balanceNumberThe balance of the account after the transfer

    wallet_transaction

    Wallet Transaction object

    The wallet transaction that was created during the transfer

    credit_noteCredit Note objectThe credit note that was created during the transfer

    Anchor
    transfer to account reference data
    transfer to account reference data
    Referred Objects Response Data

    Include Page
    V4:wallet_transaction_completeshort
    V4:wallet_complete_transaction_short

    Include Page
    V4:credit_note_short
    V4:credit_note_short

    Examples

    Expand
    titleExample 1

    HTTP Method: POST

     

    Request:

    Body:

    Code Block
    themeConfluence
    languagejs
    linenumberstrue
     {
      "token":"{{token}}",
      "wallet_identifier":{"number":"W0000000576"},
      "amount":20
    }

    Response:

    Code Block
    themeConfluence
    languagejavascript
    linenumberstrue
     {
        "data": {
            "credit_note": {
                "posted_on": "2017-09-05T14:24:46",
                "number": "433",
                "total_amount": 20,
                "issued_on": "2017-09-05T14:24:46",
                "currency_rate_period": null,
                "id": "36ADA3EFA8074E1680214C25555F4DDF",
                "life_cycle_state": "POSTED",
                "reference_number": "608"
            },
            "wallet_balance": 851,
            "wallet_transaction": {
                "number": "67606",
                "amount": 20,
                "wallet": {
                    "number": "W0000000576",
                    "accounts_receivable": {
                        "number": "ACR0000000334",
                        "name": "ACR0000000334 Marina Antoniadou",
                        "id": "0BBD8595621F43E58327A7DBB19EF2D9",
                        "life_cycle_state": "ACTIVE",
                        "account_owner": {
                            "company_profile": null,
                            "company_name": null,
                            "name": null,
                            "last_name": "Antoniadou",
                            "id": "BC7F051E0EF54BB1A7BD138BE3FA4704",
                            "life_cycle_state": "FINANCIAL",
                            "middle_name": null,
                            "title": null,
                            "type": "PERSON",
                            "first_name": "Marina",
                            "demographics": {
                                "name_day": {
                                    "month": null,
                                    "day": null
                                },
                                "id_number": "369874",
                                "gender": "FEMALE",
                                "date_of_birth": {
                                    "month": null,
                                    "year": null,
                                    "day": null
                                },
                                "industry_sector": null,
                                "passport_number": null,
                                "industry": null,
                                "social_security_number": null,
                                "passport_issued_by_country": null
                            }
                        }
                    },
                    "id": "E551DAE770A549DF94085FB33C50EC53",
                    "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-05T14:24:46",
                    "updated_date": "2017-09-05T14:24:46",
                    "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": null,
                "currency_rate_period": null,
                "id": "CEBBBD92551D4A74ACC02688832C86C2",
                "life_cycle_state": "EFFECTIVE",
                "extra_added_amount": null,
                "type": {
                    "alternative_code": "WI",
                    "name": "Wallet Invoice",
                    "description": null,
                    "id": "45522EB7F330448EB7B392318B1EC4B7",
                    "classification": "DEBIT"
                },
                "caused_by_entity_id": null
            },
            "accounts_receivable_balance": 10270.19
        },
        "status": {
            "code": "OK",
            "description": "",
            "message": ""
        }
    }