cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/booking/BOOKING_ID/payment_methods/PAYMENT_METHOD_REFERENCE" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.bookings.get_booking_payment_method(
"BOOKING_ID", "PAYMENT_METHOD_REFERENCE"
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.bookings.getBookingPaymentMethod('BOOKING_ID', 'PAYMENT_METHOD_REFERENCE');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->bookings->getBookingPaymentMethod('BOOKING_ID', 'PAYMENT_METHOD_REFERENCE');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.bookings.bookings_dto.BookingsDto.BookingPaymentMethod;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<BookingPaymentMethod> response = client.bookings().getBookingPaymentMethod(
"BOOKING_ID",
"PAYMENT_METHOD_REFERENCE");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Bookings.GetBookingPaymentMethodAsync(
"BOOKING_ID",
"PAYMENT_METHOD_REFERENCE");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.bookings.getBookingPaymentMethod(
'BOOKING_ID',
'PAYMENT_METHOD_REFERENCE',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Bookings().GetBookingPaymentMethod(context.Background(), "BOOKING_ID", "PAYMENT_METHOD_REFERENCE", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"order": {
"payment_method": {
"created_by": "<string>",
"created_on": "<string>",
"default": true,
"id": "<string>",
"last_updated_by": "<string>",
"last_updated_on": "<string>",
"last_used_at": "<string>",
"object": "<string>",
"payment_count": 123,
"processor": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"processor_type": "<string>",
"reference": "<string>",
"restricted_to_orders": true,
"specified_order_ids": "<string>",
"status": "<string>",
"version": 123
}
}
}Bookings
Retrieve a booking payment method
Returns one payment method bound to a booking, found by its reference.
GET
/
booking
/
{booking_id}
/
payment_methods
/
{payment_method_ref}
cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/booking/BOOKING_ID/payment_methods/PAYMENT_METHOD_REFERENCE" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.bookings.get_booking_payment_method(
"BOOKING_ID", "PAYMENT_METHOD_REFERENCE"
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.bookings.getBookingPaymentMethod('BOOKING_ID', 'PAYMENT_METHOD_REFERENCE');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->bookings->getBookingPaymentMethod('BOOKING_ID', 'PAYMENT_METHOD_REFERENCE');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.bookings.bookings_dto.BookingsDto.BookingPaymentMethod;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<BookingPaymentMethod> response = client.bookings().getBookingPaymentMethod(
"BOOKING_ID",
"PAYMENT_METHOD_REFERENCE");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Bookings.GetBookingPaymentMethodAsync(
"BOOKING_ID",
"PAYMENT_METHOD_REFERENCE");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.bookings.getBookingPaymentMethod(
'BOOKING_ID',
'PAYMENT_METHOD_REFERENCE',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Bookings().GetBookingPaymentMethod(context.Background(), "BOOKING_ID", "PAYMENT_METHOD_REFERENCE", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"order": {
"payment_method": {
"created_by": "<string>",
"created_on": "<string>",
"default": true,
"id": "<string>",
"last_updated_by": "<string>",
"last_updated_on": "<string>",
"last_used_at": "<string>",
"object": "<string>",
"payment_count": 123,
"processor": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"processor_type": "<string>",
"reference": "<string>",
"restricted_to_orders": true,
"specified_order_ids": "<string>",
"status": "<string>",
"version": 123
}
}
}Returns the payment method whose
reference matches, under order.payment_method.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Path Parameters
The booking's id. Any order's id works here, whatever the order's type.
The payment method's reference, not its id.
Response
200 - application/json
The payment method, under order.payment_method.
Show child attributes
Show child attributes