const response = await fetch(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentGateway: {
Name: 'Stripe',
Credentials: {
SecretKey: 'sk_live_abc123'
}
}
})
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'paymentGateway': {
'Name': 'Stripe',
'Credentials': {
'SecretKey': 'sk_live_abc123'
}
}
}
)
print(response.status_code)
Credentials stored successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
Gateway Credentials
Store Payment Gateway Credentials
Store credentials for a payment gateway.
PUT
/
api
/
credentials
/
{credentialsId}
const response = await fetch(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentGateway: {
Name: 'Stripe',
Credentials: {
SecretKey: 'sk_live_abc123'
}
}
})
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'paymentGateway': {
'Name': 'Stripe',
'Credentials': {
'SecretKey': 'sk_live_abc123'
}
}
}
)
print(response.status_code)
Credentials stored successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
Gateway Credentials Guide
Store and manage payment gateway credentials
If you try to store credentials with an ID that already exists in your user in PCI Booking, the new set of credentials will overwrite the stored ones.
This cannot be undone.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
-1003 | 401 | API key is missing or invalid, or user type is not Booker. |
-125 | 400 | Request body could not be parsed as JSON. |
-125 | 400 | Request body is missing the paymentGateway (or virtualCardProvider) section. |
-125 | 400 | The Name property is missing from the provider section. |
-125 | 400 | The specified payment gateway name is not valid. |
-125 | 400 | No credentials were provided, but the gateway requires them. |
-125 | 400 | One or more credential field names do not match the gateway’s expected fields. |
Parameter Constraints
- credentialsId: Required string. Used as the unique identifier for this credential set.
- Request body: Must be valid JSON containing either a
paymentGatewayorvirtualCardProvidertop-level key. - Name (inside provider object): Required, non-empty string matching a supported gateway.
- Credentials (inside provider object): All property names must match the gateway’s expected credential field names (see Retrieve Credential Structure).
Parameters
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.Path Parameters
string
required
The unique ID for this set of credentials. You will reference this ID when sending a request through the Universal Payment Gateway.
Request Body
object
A custom object specifying the name of the payment gateway and its credentials.
const response = await fetch(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentGateway: {
Name: 'Stripe',
Credentials: {
SecretKey: 'sk_live_abc123'
}
}
})
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/credentials/my-stripe-credentials',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'paymentGateway': {
'Name': 'Stripe',
'Credentials': {
'SecretKey': 'sk_live_abc123'
}
}
}
)
print(response.status_code)
Response
Credentials stored successfully. No content returned.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}

