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.
const config: ClientConfiguration = {
key: 'YOUR_API_KEY',
secret: 'YOUR_API_SECRET'
};
const 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
const config: ClientConfiguration = {
key: 'YOUR_API_KEY',
secret: 'YOUR_API_SECRET',
environment: ClientEnvironment.TEST
};
const paymentInstrumentResponse = await paymentClient.query({
query: PaymentInstrumentDocument,
variables: { token: 'some-token' }
});
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 Document Name: PaymentInstrumentDocument
Operation Inputs:
Name | Type | Description | Required |
---|---|---|---|
token |
String! |
External token | Yes |
Resources
⚠️ Documentation is unavailable at the moment- Query Definition
- Reference