Skip to content
Last updated

Getting the credit card status

GET https://payments-api.booking.com/connectivity-payments/reservations/{reservationId}/status?type=ccstatus

When the credit card status is either INVALID_CARD or INITIAL_CARD_CHECK_UNSUCCESSFUL, you receive a notification. Upon receiving the CREDIT_CARD_STATUS_UPDATE notification, you can query the endpoint to get the current card status. Based on the status, you can take the appropriate action, such as requesting the guest to update the card or cancel the reservation.

For more information, see Card verification flow.

Path parameters

The following table describes what elements you must add as path parameters:

ElementDescriptionTypeRequired/Optional
reservation-idSpecifies the identifier of the reservation.stringrequired

Query parameters

The following table describes what elements you must add as query parameters:

ElementDescriptionTypeRequired/Optional
typeIndicates that the status of the credit card used per given reservation has to be returned in the response. Currently, the only supported value for type is ccstatus.stringoptional

Headers

ElementDescriptionTypeRequired/Optional
accept-versionSpecifies the version of the API you want to use.stringoptional

Response body example

The following is a successful response body example:

{
    "meta": {
        "ruid": "ekjdb-vi1je-fv723b-jewklnnn"
    },
    "data": {
        "reservation_id": "res123",
        "status_type": "CREDIT_CARD_VALIDATION",
        "status_value": "INVALID_CARD"
    },
    "errors": [],
    "warnings": []
}

The following is an error response body example:

{
  "meta": {
    "ruid": "ekjdb-vi1je-fv723b-jewklnnn"
  },
  "data": null,
  "errors": [
    {
      "description": "The reservation is not on Smart Pay at Property",
      "message": "BAD_REQUEST",
      "status_code": 400,
      "debug_message": null
    }
  ],
  "warnings": []
}

Response body elements

The following table describes the response elements:

ElementDescriptionType
dataContains the response data.object
: reservation_idSpecifies the identifier of the reservation.string
: status_typeSpecifies the type of the status being updated: CREDIT_CARD_VALIDATION.string
: status_valueSpecifies the status of the credit card: VERIFIED, INITIAL_CARD_CHECK_UNSUCCESSFUL, INVALID_CARD, UNKNOWN, or PENDING_CARD_UPDATE. For more information, see Credit card statuses.string

Credit card statuses

The only two statuses for which a notification is sent are INITIAL_CARD_CHECK_UNSUCCESSFUL and INVALID_CARD.

StatusDescription
INITIAL_CARD_CHECK_UNSUCCESSFULInitial verification done at the time of booking has failed. Another verification will be performed 3 days before the free cancellation deadline.
INVALID_CARDCard is invalid.
UNKNOWNCard hasn't been checked yet.
PENDING_CARD_UPDATEGuest has a 24-hour window to update their card information.
VERIFIEDCard has been verified and is considered valid until the next check is performed.

Response codes

This table lists and describes the response codes that the Credit Card Status API can return.

CodeTypeDescription
200SuccessStatus for the credit card is fetched successfully.
400Non-retryable failureRequest payload is invalid.
401Non-retryable failureMachine account is not authenticated.
403Non-retryable failureMachine account is not authorized to fetch the requested information.
404Non-retryable failureSpecified reservation doesn't exist.
410Non-retryable failureRequested resource is outdated and no longer available to be served.
429Retryable errorYou exceeded the rate limit.
500Retryable failureRequest failed with an internal server error.