curl --request POST \
--url https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"payment": {
"payment_provider": "upi",
"identifier": "ext-123",
"idempotency_key": "order-1"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment: {payment_provider: 'upi', identifier: 'ext-123', idempotency_key: 'order-1'}
})
};
fetch('https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments"
payload = { "payment": {
"payment_provider": "upi",
"identifier": "ext-123",
"idempotency_key": "order-1"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Create payment
Creates a payment for a booking using Cash or UPI. Use this when the client pays via cash or UPI outside the app; then use the Confirm payment endpoint to mark the payment as completed.
A cash payment can be recorded on a scheduling link that has no cash price. Pass amount and, optionally, currency. When the scheduling link already has a price, leave both out.
A retry with the same idempotency_key returns the payment already recorded. For UPI, a retry with the same identifier does too; a cash payment does not keep its identifier, so pass idempotency_key to make a cash retry safe.
While the booking has an open payment through another provider, the request returns a 422 error. Confirm or reject that payment first.
curl --request POST \
--url https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"payment": {
"payment_provider": "upi",
"identifier": "ext-123",
"idempotency_key": "order-1"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment: {payment_provider: 'upi', identifier: 'ext-123', idempotency_key: 'order-1'}
})
};
fetch('https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v2/bookings/{booking_id}/payments"
payload = { "payment": {
"payment_provider": "upi",
"identifier": "ext-123",
"idempotency_key": "order-1"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Booking ID (numeric) or booking SID (short ID, up to 10 characters). You can get the booking SID from the Get booking details or List bookings response.
"8sqtzrs"
Body
Hide child attributes
Hide child attributes
Payment method. Use upi for manual UPI or cash for cash payments. Internally mapped to eupi / cash.
upi, cash Your external payment reference ID.
"your-external-payment-id"
Optional key for idempotent create. For UPI or Cash, either identifier or idempotency_key (or both) is required.
"optional-idempotency-key"
Optional discount code. If present, it is validated (invalid/expired/limit reached returns 422).
"YOUR_DISCOUNT_CODE"
Amount the client paid, as a decimal such as 150.00. Only for cash, and only when the scheduling link has no cash price. When left out, it defaults to the amount of the scheduling link's default fee under another payment provider; without such a fee the request returns a 422 error. Also returns a 422 error for upi, or when the scheduling link has a cash price.
"150.00"
Three-letter ISO 4217 currency code for amount, such as USD. Defaults to the currency of the scheduling link's price, else the workspace currency.
"USD"
Response
Created - Payment created. Use the returned id when confirming the payment.
Payment record ID. Use this in the confirm endpoint.
"f46c9ddf-221d-4238-afb2-280c1c6b3185"
Your external payment reference ID.
"your-external-payment-id"
Payment status.
successful, authorized, declined, pending, requires_action, requires_confirmation, requires_payment_method, confirmation_pending, initiated, rejected "confirmation_pending"
Payment amount.
"100.0"
Currency code. Follows the ISO 4217 standard.
"USD"