• Resolved Jaggy

    (@vishanjad)


    Support,
    Does the plugin have native WP REST API Support? Please advise.

    Thanks
    Vishan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Swings

    (@wpswings)

    Hi,

    Thanks for using our plugin.

    In reference to your query, please note that our plugin uses REST API and you can perform the following actions using the API:

    Retrieve particular user wallet transactions
    Retrieves all transactions related to the wallet of the user. The HTTP request is:

    GET {home_url}/wp-json/wsfw-route/v1/wallet/transactions/<id>?consumer_key=XXXX&consumer_secret=XXXX where <id> is an user id of user.

    Example : https://example.com/wp-json/wsfw-route/v1/wallet/transactions/1?consumer_key=XXXX&consumer_secret=XXXX

    JSON response example:

        [
        	{
    	    "Id": "90",
    	    "user_id": "1",
    	    "amount": "22",
    	    "transaction_type": "Debited by admin",
    	    "payment_method": "Manually By Admin",
    	    "transaction_id": "",
    	    "note": "",
    	    "date": "2021-04-22 20:16:23"
            },
            {
                "Id": "94",
                "user_id": "1",
                "amount": "12",
                "transaction_type": "Wallet credited through purchase #159",
                "payment_method": "bacs",
                "transaction_id": "159",
                "note": "",
                "date": "2021-04-22 21:35:47"
            }
        ]

    Update wallet of user

    This allows you to update the (credit/debit) wallet of the particular user. The HTTP request is:

    PUT {home_url}/wp-json/wsfw-route/v1/wallet/<id> where <id> is an user id of user.

    Required Headers

    Content-Type: application/json

    Example: https://example.com/wp-json/wsfw-route/v1/wallet/1

    curl -X PUT -d 'amount=29&action=credit' 'https://woocommerce.local/wp-json/wsfw-route/v1/wallet/1'
    –header ‘Content-Type: application/json’

    Please also see the attached image for the required parameters.

    Thanks,

    Thread Starter Jaggy

    (@vishanjad)

    Support,
    Thank you for your reply. Is possible to install your plugin on one WordPress site(parent), but spend from or add to wallet balance from a child site? With the child and parent site installation hosted on different hosting providers or VPS/ IP addresses?

    Also, do you have Developer and API documentation for your Pro Wallet offerring

    Please advise.

    Thanks
    Vishan

    Plugin Author WP Swings

    (@wpswings)

    Hi,
    Thanks for using our plugin.

    Currently, it is not possible as our plugin supports multisite but it works independently on each site.

    And we don’t have any separate developer doc for the plugin. You can check our plugin doc including the API part from here

    Thanks,

    Thread Starter Jaggy

    (@vishanjad)

    Support,
    Thanks for sharing, In your documentation, it says “REST API allows external apps to view and manage wallets. Access is granted only to those with valid API keys.” Please explain the difference between an external app vs an external WordPress site. What am I missing and what customization is needed to achieve the functionality explained in my last post.

    If you provide customization, can we set up a call to discuss requirements and pricing? Please advise.

    Regards
    Vishan

    Plugin Author WP Swings

    (@wpswings)

    Hi, @vishanjad
    Thanks for reaching out again!

    Our plugin support external app on the same site where wallet plugin is uploaded. The wallet can get updated through API from other plugin or the external app at the same site as they share same databases.

    If further you need any help or support then kindly connect with the support team.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP REST API Support’ is closed to new replies.