Collect payment for a class booking by using a new credit/debit card
This API helps you to save the new credit/debit card details of the guest and then collect payment for the class booking.
You must specify appropriate details for the parameters in the API request body. For more information, refer to the Request Body Parameters table.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
GET /Catalog/Payments/Invoice/IntializePayment
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| transactionDetails | object | No | — | Object that contains various transaction-related elements. For more information, refer to the transactionDetails Object table. |
| billingInfo | object | No | — | Object that contains various billing-related elements. For more information, refer to the billingInfo Object table. |
| shippingInfo | object | No | — | Object that contains various shipping-related elements. For more information, refer to the shippingInfo Object table. |
| paymentDetails | object | No | — | Object that contains various payment-related elements. For more information, refer to the paymentDetails Object table. |
Response
Success (200 OK)
{
"ProcessorId": {},
"TokenFK": "55546105",
"HostedPaymentURL": "https://cpykdev.zenotibeta.com/OnlinePayments/page?TokenFK=55546105&Mode=test&ProcessorId=Adyen&SubscriberId=d51712b1-6040-4dd4-abff-cffc9d36f89e&Source=WebStore&TransactionType=Sale&FirstRecurringCharge=0&AvsSource=Client",
"Mode": 0,
"TokenDetails": {},
"MetaData": {},
"Error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| ProcessorId | object | |
| TokenFK | string | |
| HostedPaymentURL | string | |
| Mode | integer | |
| TokenDetails | object | |
| MetaData | object | |
| Error | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/Catalog/Payments/Invoice/IntializePayment' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/Catalog/Payments/Invoice/IntializePayment', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/Catalog/Payments/Invoice/IntializePayment',
headers={
'Authorization': 'bearer {{access_token}}',
},
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
"https://api.zenoti.com/Catalog/Payments/Invoice/IntializePayment");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/Catalog/Payments/Invoice/IntializePayment')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |