All URIs are relative to /api, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| fetchCatlog() | GET /instances/{instance_key}/business/catalog | Fetches the catlog. |
| sendPaymentRequest() | POST /instances/{instance_key}/business/payment-request | Send a payment request. |
fetchCatlog($instance_key): \WhatsAPI\models\APIResponseFetches the catlog.
Gets list of all products registered by you.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\BusinessManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
try {
$result = $apiInstance->fetchCatlog($instance_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BusinessManagementApi->fetchCatlog: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key |
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
sendPaymentRequest($instance_key, $data): \WhatsAPI\models\APIResponseSend a payment request.
Sends an payment request to a user. Feature is still in beta.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WhatsAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new WhatsAPI\Api\BusinessManagementApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$instance_key = 'instance_key_example'; // string | Instance key
$data = new \WhatsAPI\models\PaymentRequestPayload(); // \WhatsAPI\models\PaymentRequestPayload | Data
try {
$result = $apiInstance->sendPaymentRequest($instance_key, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BusinessManagementApi->sendPaymentRequest: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| instance_key | string | Instance key | |
| data | \WhatsAPI\models\PaymentRequestPayload | Data |
- Content-Type:
application/json - Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]