PaymentClient deals with payment instruments and PCI data.
This client is connected with https://api.expediagroup.com/supply/payments/graphql endpoint by default.
You can refer to the configuration document to explore the full configuration options.
ClientConfiguration config = ClientConfiguration
.builder()
.key("KEY")
.secret("SECRET")
.build();
PaymentClient paymentClient = new PaymentClient(config);PaymentClient can be configured to work in different environments, below is a list of the supported environments by this client:
| Environment | Corresponding API Endpoint |
|---|---|
ClientEnvironment.PROD |
https://api.expediagroup.com/supply/payments/graphql |
ClientEnvironment.TEST |
https://test-api.expediagroup.com/supply/payments/graphql |
Configuration with Environment Example
ClientConfiguration config = ClientConfiguration
.builder()
.key("KEY")
.secret("SECRET")
.environment(ClientEnvironment.TEST)
.build();PaymentInstrumentQuery paymentInstrumentQuery = PaymentInstrumentQuery
.builder()
.token("payment_token")
.build();try {
PaymentInstrumentQuery.Data paymentData = paymentClient.execute(paymentInstrumentQuery);
}
catch(ExpediaGroupServiceException e) {
e.printStackTrace();
}At the moment, there is only one query called PaymentInstrument you can execute using the PaymentClient.
PaymentInstrument
Summary: Retrieve Payment instrument from external payment instrument token
Operation Class Name: PaymentInstrumentQuery
Operation Inputs:
| Name | Type | Description | Required |
|---|---|---|---|
token |
String! |
External token | Yes |
Resources
⚠️ Documentation is unavailable at the moment- Query Definition
- Reference