### Java Request Example Source: https://docs.hyperwallet.com/content/api/v4/resources/authentication-token/create Example of how to create an authentication token using the Hyperwallet Java SDK. This shows the initialization of the Hyperwallet client and the call to get the authentication token. ```java Hyperwallet hyperwallet = new Hyperwallet("testuser@12345678", "myAccPassw0rd"); HyperwalletAuthenticationToken response = hyperwallet.getAuthenticationToken("usr-c4292f1a-866f-4310-a289-b916853939de"); ``` -------------------------------- ### Node.js Request Example Source: https://docs.hyperwallet.com/content/api/v4/resources/authentication-token/create Example of how to create an authentication token using the Hyperwallet Node.js SDK. This demonstrates client initialization and the asynchronous call to get the token. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.getAuthenticationToken("usr-c4292f1a-866f-4310-a289-b916853939de", function(error, body) { // handle response body here }); ``` -------------------------------- ### Install Node.js SDK with npm Source: https://docs.hyperwallet.com/content/api/v4/overview/sdk Install the Hyperwallet Node.js SDK using npm for API v4 integration. ```bash $ npm install hyperwallet-sdk ``` -------------------------------- ### cURL Request Example Source: https://docs.hyperwallet.com/content/api/v4/resources/authentication-token/create Example of how to create an authentication token using cURL. This demonstrates the endpoint, basic authentication, and required headers. ```bash curl -X "POST" "https://uat-api.paylution.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/authentication-token" \ -u testuser@12345678:myAccPassw0rd \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d "" ``` -------------------------------- ### PHP Request Example Source: https://docs.hyperwallet.com/content/api/v4/resources/authentication-token/create Example of how to create an authentication token using the Hyperwallet PHP SDK. This shows the client initialization and the method call to retrieve the token. ```php $hyperwallet = new Hyperwallet("testuser@12345678", "myAccPassw0rd"); $response = $hyperwallet->getAuthenticationToken("usr-c4292f1a-866f-4310-a289-b916853939de"(new Hyperwallet//Model//AuthenticationToken()) ); ``` -------------------------------- ### Install SDK using Carthage Source: https://docs.hyperwallet.com/content/mobile/v1/ios-core-sdk/quick-start Add this line to your Cartfile to install the Hyperwallet iOS SDK using Carthage. Replace `{version}` with the desired SDK version. ```bash github "hyperwallet/hyperwallet-ios-sdk" "{version}" ``` -------------------------------- ### Create Bank Account Node.js SDK Request Source: https://docs.hyperwallet.com/content/api/v4/resources/bank-accounts/create Node.js SDK example for creating a bank account. Ensure the hyperwallet-node package is installed and configured with your credentials. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.createBankAccount("usr-c4292f1a-866f-4310-a289-b916853939de", {}, function(error, body) { // handle response body here }); ``` -------------------------------- ### Initialize Hyperwallet Client and Get Intent Source: https://docs.hyperwallet.com/content/mobile/v1/android-ui-sdk/quick-start Create an instance of the Hyperwallet Client using your authentication provider and get the intent to launch the transfer method list activity. ```java // initialize UI SDK HyperwalletTransferMethodUi mHyperwalletTransferMethodUi = HyperwalletTransferMethodUi.getInstance(getApplicationContext(), hyperwalletAuthenticationTokenProvider); // use UI SDK functions Intent intent = mTransferMethodUi.getIntentListTransferMethodActivity(MainActivity.this); startActivityForResult(intent, YOUR_APP_SHOW_TM_LIST_REQUEST_CODE); ``` -------------------------------- ### Account Balances Response Example Source: https://docs.hyperwallet.com/content/api/v4/resources/balances/accounts-list This is an example of a successful response when listing account balances. It includes pagination information and a list of balances with currency and amount. ```json { "hasNextPage": false, "hasPreviousPage": false, "limit": 10, "data": [ { "currency": "USD", "amount": "999880.00" }, { "currency": "CAD", "amount": "1880.00" } ], "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/programs/prg-83836cdf-2ce2-4696-8bc5-f1b86077238c/accounts/act-da5795ed-d1c9-4231-9e71-611ab8fe9f66/balances?limit=10" } ] } ``` -------------------------------- ### List Users Response Example Source: https://docs.hyperwallet.com/content/api/v4/resources/users/list This is an example of the JSON response received when listing users. It includes pagination details and a list of user objects, each with their profile information. ```json { "hasNextPage": true, "hasPreviousPage": false, "limit": 2, "data": [ { "token": "usr-00c6cfda-a43d-4b29-a20b-1abc7e800b58", "status": "ACTIVATED", "verificationStatus": "NOT_REQUIRED", "createdOn": "2019-10-30T22:15:35", "clientUserId": "CSLAJQt7bD", "profileType": "INDIVIDUAL", "firstName": "John", "lastName": "Smith", "dateOfBirth": "1980-01-01", "email": "john@company.com", "addressLine1": "123 Main Street", "city": "New York", "stateProvince": "NY", "country": "US", "postalCode": "10016", "language": "en", "programToken": "prg-83836cdf-2ce2-4696-8bc5-f1b86077238c", "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/users/usr-00c6cfda-a43d-4b29-a20b-1abc7e800b58" } ] }, { "token": "usr-f9154016-94e8-4686-a840-075688ac07b5", "status": "PRE_ACTIVATED", "verificationStatus": "NOT_REQUIRED", "businessStakeholderVerificationStatus": "REQUIRED", "letterOfAuthorizationStatus": "NOT_REQUIRED", "createdOn": "2019-05-11T16:01:30", "clientUserId": "CSK7b8Ffch", "profileType": "BUSINESS", "businessName": "Company", "businessType": "CORPORATION", "firstName": "Jane", "lastName": "Smith", "dateOfBirth": "1980-01-01", "businessRegistrationId": "12345678", "email": "jane@company.com", "addressLine1": "123 Main Street", "city": "London", "stateProvince": "London", "country": "GB", "postalCode": "WC2N 5DX", "language": "en", "programToken": "prg-83836cdf-2ce2-4696-8bc5-f1b86077238c", "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/users/usr-f9154016-94e8-4686-a840-075688ac07b5" } ] } ], "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/users/?after=usr-f9154016-94e8-4686-a840-075688ac07b5&limit=2" }, { "params": { "rel": "next" }, "href": "https://uat-api.paylution.com/rest/v4/users/?after=usr-f9916b65-94e8-4686-a840-075688ac09b3&limit=2" } ] } ``` -------------------------------- ### Example getAuthenticationToken Function Source: https://docs.hyperwallet.com/content/embedded-payout-experience/v1/verify-payee/drop-in-ui This is an example implementation for retrieving an authentication token. You must tailor this function to your server setup and requirements, including API credentials and endpoints. ```javascript // this is an example implementation - you will need to tailor this example to your setup and requirements function getAuthenticationToken(callback) { var username = "[API USER]"; var password = "[API USER PASSWORD]"; $.ajax({ url: `https://{yourServer}/{yourAuthenticationEndpoint}`, method: 'POST', dataType: 'json', beforeSend: function(xhrObj){ xhrObj.setRequestHeader("Content-Type","application/json"); xhrObj.setRequestHeader("Accept","application/json"); }, success: function( data, txtStatus, xhr ) { callback(data); }, error: function(jqXHR, textStatus, errorThrown) { console.log(jqXHR, textStatus, errorThrown); callback(null, errorThrown); } }); ``` -------------------------------- ### Full Drop-in UI Implementation Example Source: https://docs.hyperwallet.com/content/embedded-payout-experience/v1/verify-payee/drop-in-ui This snippet shows a complete HTML and JavaScript implementation for integrating the Hyperwallet drop-in UI. It includes script loading, UI element configuration, event handling for completion and loading states, and an example of fetching an authentication token. ```html
``` -------------------------------- ### Example Authentication Token Retrieval Source: https://docs.hyperwallet.com/content/embedded-payout-experience/v1/create-transfer-method/drop-in-ui An example implementation of the `getAuthenticationToken` function using jQuery AJAX. Customize the URL, credentials, and endpoint to match your server setup. ```javascript function getAuthenticationToken(callback) { var username = "[API USER]"; var password = "[API USER PASSWORD]"; $.ajax({ url: `https://{yourServer}/{yourAuthenticationEndpoint}`, method: 'POST', dataType: 'json', beforeSend: function(xhrObj){ xhrObj.setRequestHeader("Content-Type","application/json"); xhrObj.setRequestHeader("Accept","application/json"); }, success: function( data, txtStatus, xhr ) { callback(data); }, error: function(jqXHR, textStatus, errorThrown) { console.log(jqXHR, textStatus, errorThrown); callback(null, errorThrown); } }); } ``` -------------------------------- ### Initialize Hyperwallet SDK Source: https://docs.hyperwallet.com/content/mobile/v1/ios-core-sdk/quick-start Import the HyperwalletSDK and initialize it with an instance of your `HyperwalletAuthenticationTokenProvider` implementation. ```swift // add to the header import HyperwalletSDK ``` ```swift Hyperwallet.setup(authenticationTokenProvider :HyperwalletAuthenticationTokenProvider) ``` -------------------------------- ### Get Supplemental Data Group Details Request Example Source: https://docs.hyperwallet.com/content/api/v4/resources/supplemental-data/data-group-get Example cURL command to retrieve supplemental data group details for a payment. Ensure to replace placeholders with actual values. ```bash curl -X "GET" "https://uat-api.paylution.com/rest/v4/payments/spd-3fa85f64-5717-4562-b3fc-2c963f66afa6/supplemental-data" \ -u testuser@12345678:myAccPassw0rd \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d "" ``` -------------------------------- ### Retrieve Paper Check - Node.js Source: https://docs.hyperwallet.com/content/api/v4/resources/paper-checks/retrieve Node.js example for retrieving a paper check. This shows how to initiate a GET request to the API endpoint. ```javascript const url = "https://uat-api.paylution.com/rest/v4/users/{user-token}/paper-checks/{paper-check-token}"; // Make a GET request to the url ``` -------------------------------- ### Retrieve Paper Check - Java Source: https://docs.hyperwallet.com/content/api/v4/resources/paper-checks/retrieve Java code example for retrieving a paper check. This demonstrates making a GET request to the API. ```java String url = "https://uat-api.paylution.com/rest/v4/users/{user-token}/paper-checks/{paper-check-token}"; // Make a GET request to the url ``` -------------------------------- ### Update Business Stakeholder in Node.js Source: https://docs.hyperwallet.com/content/api/v4/resources/business-stakeholders/update This Node.js example demonstrates how to update a business stakeholder using the Hyperwallet SDK. Ensure you have the SDK installed and configured with your credentials. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.updateBusinessStakeholder("usr-f9154016-94e8-4686-a840-075688ac07b5", "stk-9381634a-c57f-49d1-9f9b-3cc999322e37", { "firstName": "James", "lastName": "Smithe", "isDirector": "true" }, function(error, body) { // handle response body here }); ``` -------------------------------- ### Create Mobile Wallet with Node.js SDK Source: https://docs.hyperwallet.com/content/api/v4/resources/mobile-wallets/create This Node.js example shows how to create a mobile wallet using the Hyperwallet SDK. It initializes the client with your username and password and uses a callback to handle the response. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.createDigitalWallet("usr-97282923-fdc7-413f-aaec-82ae783503d1", { "type": "WALLET_ACCOUNT", "transferMethodCountry": "ID", "transferMethodCurrency": "IDR", "accountId": "7358767438", "digitalWalletProvider": "OVO" }, function(error, body) { // handle response body here }); ``` -------------------------------- ### List Payment Status Transitions (Node.js) Source: https://docs.hyperwallet.com/content/api/v4/resources/status-transitions/list This Node.js example shows how to use the hyperwallet-node SDK to fetch payment status transitions. It requires initializing the client with your username and password, and provides a callback function to handle the response or errors. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.listPaymentStatusTransitions("pmt-2c059341-8281-4d30-a65d-a49d8e2a9b0f", function(error, body) { // handle response body here }); ``` -------------------------------- ### Get Transfers with Pagination Source: https://docs.hyperwallet.com/content/api/v4/overview/pagination Demonstrates how to retrieve a list of transfers with a specified limit for pagination. This example sets the limit to 2, returning two resources per page. ```bash curl -X "GET" "https://uat-api.paylution.com/rest/v4/transfers?limit=2" \ -u "restapiuser@12345678:myAccPassw0rd" \ -H "Accept: application/json" ``` -------------------------------- ### Update User (Node.js) Source: https://docs.hyperwallet.com/content/api/v4/resources/users/update This Node.js example demonstrates updating a user by their token. It uses a callback function to handle potential errors and the response body. The Hyperwallet SDK must be installed. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.updateUser("usr-f9154016-94e8-4686-a840-075688ac07b5", { "email": "jim@company.com", "firstName": "Jim", "lastName": "Smithe" }, function(error, body) { // handle response body here }); ``` -------------------------------- ### Retrieve User Status Transition - Node.js Source: https://docs.hyperwallet.com/content/api/v4/resources/status-transitions/users-retrieve This Node.js example shows how to fetch a user status transition using the hyperwallet-node library. It requires initializing the client with username and password, and uses a callback to handle the response. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.getUserStatusTransition("usr-f695ef43-9614-4e17-9269-902c234616c3", "sts-70ddc78a-0c14-4a72-8390-75d49ff376f2", function(error, body) { // handle response body here }); ``` -------------------------------- ### Get Supplemental Data Group Details Response Example Source: https://docs.hyperwallet.com/content/api/v4/resources/supplemental-data/data-group-get Sample JSON response when retrieving supplemental data group details. This includes details like industry type, amounts, status, and tokens. ```json [ { "industryType": "airlines", "otherDeductionsAmount": "200", "otherDeductionsCurrency": "CNY", "status": "INVALID", "createdOn": "2021-06-01T22:28:27.809Z", "token": "spd-5a30ae30-c980-11eb-b8bc-0242ac130003", "responseCode": "PURCHASE_CURRENCY_MISMATCH_BETWEEN_LINE_ITEMS", "responseDescription": "Records under the supplemental data group have more than 1 currency.Purchase currency should be same for all the line items under a supplemental data group.", "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/payments/pmt-9826c53c-c0e5-4663-a9ac-e6526fd67998/supplemental-data/spd-5a30ae30-c980-11eb-b8bc-0242ac130003" } ] }, { "industryType": "airlines", "otherDeductionsAmount": "200", "otherDeductionsCurrency": "CNY", "status": "CREATED", "createdOn": "2021-06-01T23:28:27.809Z", "token": "spd-3fa85f64-5717-4562-b3fc-2c963f66afa6", "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/payments/pmt-9826c53c-c0e5-4663-a9ac-e6526fd67998/supplemental-data/spd-3fa85f64-5717-4562-b3fc-2c963f66afa6" } ] } ] ``` -------------------------------- ### GET /transfers with limit parameter Source: https://docs.hyperwallet.com/content/api/v4/overview/pagination This example demonstrates how to retrieve a list of transfers with a specified limit. The 'limit' parameter controls the number of resources returned per page. The response includes the 'limit' used, the 'data' array containing the resources, a 'links' array with HATEAOS links (including 'next' and 'previous' if applicable), and boolean flags 'hasNextPage' and 'hasPreviousPage' to indicate the presence of further pages. ```APIDOC ## GET /transfers ### Description Retrieves a list of transfers with pagination controls. ### Method GET ### Endpoint /rest/v4/transfers ### Parameters #### Query Parameters - **limit** (integer) - Optional - Specifies the number of matching resources returned in the page. Ranges from 1 to 1000. By default, `limit=100`. ### Request Example ```curl curl -X "GET" "https://uat-api.paylution.com/rest/v4/transfers?limit=2" \ -u "restapiuser@12345678:myAccPassw0rd" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **limit** (integer) - The limit parameter supplied in the query. - **data** (array) - An array containing matching resources. - **links** (array) - An array of HATEOAS links, including 'next' and 'previous' if applicable. - **hasNextPage** (boolean) - Indicates whether there are more pages after the current page. - **hasPreviousPage** (boolean) - Indicates whether there are pages before the current page. #### Response Example ```json { "hasNextPage": false, "hasPreviousPage": false, "limit": 2, "data": [ { "token": "trf-6bf3b5b2-21b0-4148-8c0e-6a44919ce6f9", "status": "SCHEDULED", "createdOn": "2019-06-16T20:30:19", "clientTransferId": "42556512", "sourceToken": "trm-33374cd4-e84f-402e-8773-5539fbbe1897", "sourceAmount": "10.01", "sourceFeeAmount": "0.00", "sourceCurrency": "CAD", "destinationToken": "act-67b680fe-9ae8-46f2-953b-7057d8d9cf92", "destinationAmount": "10.01", "destinationFeeAmount": "0.75", "destinationCurrency": "CAD", "notes": "create CAD DDT via IS", "memo": "Transfer123456", "purpose": "OTHER" }, { "token": "trf-3ff65674-a867-43f3-8893-5dff52342b09", "status": "SCHEDULED", "createdOn": "2019-07-24T12:16:52", "clientTransferId": "16301803", "sourceToken": "trm-1d2eb7d9-9a8e-4e7e-b2b4-49a9909ae25c", "sourceAmount": "10.01", "sourceFeeAmount": "0.00", "sourceCurrency": "CAD", "destinationToken": "act-67b680fe-9ae8-46f2-953b-7057d8d9cf92", "destinationAmount": "10.01", "destinationFeeAmount": "0.75", "destinationCurrency": "CAD", "notes": "create CAD DDT via IS", "memo": "Transfer123456", "purpose": "OTHER" } ], "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/transfers?after=trf-6bf3b5b2-21b0-4148-8c0e-6a44919ce6f9&limit=2" } ] } ``` ``` -------------------------------- ### Node.js SDK for Creating User Status Transition Source: https://docs.hyperwallet.com/content/api/v4/resources/status-transitions/users-create This Node.js example shows how to create a user status transition using the Hyperwallet SDK. It requires user credentials and the user token, along with the transition details in the request body. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.createUserStatusTransition("usr-f695ef43-9614-4e17-9269-902c234616c3", { "notes": "Closing this account.", "transition": "LOCKED" }, function(error, body) { // handle response body here }); ``` -------------------------------- ### Create Bank Account (PHP) Source: https://docs.hyperwallet.com/content/api/v4/resources/bank-accounts/create?accountType=BANK_ACCOUNT&profileType=Individual This PHP code example shows how to create a bank account using the Hyperwallet SDK. It utilizes a model object for setting the account details. ```php $hyperwallet = new Hyperwallet("testuser@12345678", "myAccPassw0rd"); $response = $hyperwallet->createBankAccount("usr-c4292f1a-866f-4310-a289-b916853939de", (new \Hyperwallet\Model\BankAccount()) ->setProfileType("INDIVIDUAL") ->setTransferMethodCountry("US") ->setTransferMethodCurrency("USD") ->setType("BANK_ACCOUNT") ->setBranchId("101089292") ->setBankAccountId("7861012345") ->setBankAccountPurpose("SAVINGS") ->setFirstName("John") ->setLastName("Smith") ->setCountry("US") ->setStateProvince("WA") ->setAddressLine1("123 Main Street") ->setCity("Hometown") ->setPostalCode("12345") ->setBankAccountRelationship("SELF") ); ``` -------------------------------- ### Example Embed Script Source: https://docs.hyperwallet.com/content/embedded-payout-experience/v1/create-transfer-method/drop-in-ui An example of the script tag with placeholder values replaced. ```html ``` -------------------------------- ### Example Payment Response Source: https://docs.hyperwallet.com/content/api/v4/resources/payments/retrieve This is an example of the JSON response received when successfully retrieving payment details. ```json { "token": "pmt-87939c73-ff0a-4011-970e-3de855347ea7", "status": "COMPLETED", "createdOn": "2019-10-31T22:48:52", "amount": "20.00", "currency": "USD", "clientPaymentId": "DyClk0VG", "purpose": "OTHER", "expiresOn": "2020-04-29", "destinationToken": "usr-c4292f1a-866f-4310-a289-b916853939de", "programToken": "prg-83836cdf-2ce2-4696-8bc5-f1b86077238c", "links": [ { "params": { "rel": "self" }, "href": "https://uat-api.paylution.com/rest/v4/payments/pmt-87939c73-ff0a-4011-970e-3de855347ea7" } ] } ``` -------------------------------- ### Create PayPal Account (Node.js) Source: https://docs.hyperwallet.com/content/api/v4/resources/paypal-accounts/create Use this Node.js example to create a PayPal account via the Hyperwallet SDK. It requires authentication credentials and the user token, along with an object containing the PayPal account information. ```javascript var Hyperwallet = require('hyperwallet-node'); var client = new Hyperwallet({ username: 'testuser@12345678', password: 'myAccPassw0rd' }); client.createPayPalAccount("usr-c4292f1a-866f-4310-a289-b916853939de", { "type": "PAYPAL_ACCOUNT", "transferMethodCountry": "US", "transferMethodCurrency": "USD", "accountId": "john@company.com" }, function(error, body) { // handle response body here }); ``` -------------------------------- ### List Transfer Methods using Java Source: https://docs.hyperwallet.com/content/api/v4/resources/transfer-methods/list This Java code snippet demonstrates how to list transfer methods for a user using the Hyperwallet SDK. It requires initializing the Hyperwallet client with credentials. ```java Hyperwallet hyperwallet = new Hyperwallet("testuser@12345678", "myAccPassw0rd"); HyperwalletList