---
updatedAt: 2026-09-22T12:10:20.000Z
agentTools:
  projectIndex: https://open-api-docs.guesty.com/llms.txt
---

# GuestyPay Tokenization Flow

How to safely tokenize credit card details for the GuestyPay payment method.

## Overview

There are two primary steps to creating a guest payment method through GuestyPay for reservations.

1. Collect and tokenize the guest's credit card.
2. Create the guest payment method.

<br />

<img src="https://files.readme.io/7955ddb-OAPI_Diagram_Create_a_Guest_Payment_Method_with_GuestyPay_finalVersion.jpg" align="center" border="true" alt="Create a Guest Payment Method Sequence Diagram" caption="Figure 1.0. Create a Guest Payment Method Flow" />

<br />

## Step 1: Tokenize the Guest's Card

<br />

<Callout icon="📘" theme="info">
  ### Determine the Payment Processor ID

  The API will automatically identify a property's payment processor when you include the `listingId` in your tokenization request. Even then, it is a best practice to include the `paymentProviderId` as well. You can retrieve it with the following request.

  * <Anchor target="_blank" href="https://open-api-docs.guesty.com/reference/getpaymentproviderbylisting">Get payment provider by listing id</Anchor>
</Callout>

<br />

### Payment Form and SDK

The quickest, easiest, and **recommended** way to process payments on your website is to use our payment form SDK. Guesty offers a JavaScript SDK that supports multiple payment methods, ensuring your guests enjoy a personalized and hassle-free checkout experience. It's secure and PCI-compliant. You can access it at the links below.

* <Anchor target="_blank" href="https://github.com/guestyorg/tokenization-js/wiki">GitHub Wiki</Anchor>
* <Anchor target="_blank" href="https://www.npmjs.com/package/@guestyorg/tokenization-js?activeTab=readme">NPM package</Anchor>

Please note that the SDK supports the <Anchor target="_blank" href="https://help.guesty.com/hc/en-gb/articles/9361476868637-Welcome-to-GuestyPay">GuestyPay</Anchor>, <Anchor target="_blank" href="https://help.guesty.com/hc/en-gb/articles/9362439480605-Connecting-a-Merchant-Warrior-account-to-Guesty">Merchant Warrior</Anchor>, and <Anchor target="_blank" href="https://help.guesty.com/hc/en-gb/articles/9365557631773-Connecting-a-Hyp-account-to-Guesty">HYP</Anchor> payment processors.

<br />

<Callout icon="❗️" theme="error">
  ### Migrate to the SDK

  If you previously, built a direct integration with the GuestyPay API, please migrate to the latest version of our SDK. For assistance or any questions, please contact <Anchor target="_blank" href="https://help.guesty.com/hc/en-gb/articles/9370047984413-Contacting-Customer-Experience">Customer Experience</Anchor>​.
</Callout>

<br />

## Step 2: Create the Guest Payment Method

This action is part of the second step of the Open API's booking process. You will use the token you've generated to create the payment method. For a detailed explanation and examples, see <Anchor target="_blank" href="https://open-api-docs.guesty.com/docs/create-guest-and-payment-method#guest-payment-methods">Create a Guest and Payment Method</Anchor>

<br />

<Callout icon="🚧" theme="warn">
  ### Payment Automation and Reusability

  1. **Enable automation**: Include the `reservationId` when creating a payment method for payment automations availability.

  2. **Reuse payment method**: Set `reuse` to `true` to allow the guest's payment method for multiple reservations.
</Callout>

<br />

## Troubleshooting

<Accordion title="The reservation was created without a payment method" icon="fa-info-circle">
  This may be due to either of the following:

  <ol>
    <li>The credit card was tokenized in a different payment processor account than the one assigned to the listing. Determine the correct account using the <Anchor label="Get payment provider by listing" target="_blank" href="ref:getpaymentproviderbylisting">Get payment provider by listing</Anchor> and <Anchor label="Get provider stats" target="_blank" href="ref:getstats">Get provider stats</Anchor>.</li>
    <li>The payment processor or credit card issuer reported an issue. Check your payment processor extranet for error messages and see our <Anchor label="Help Center troubleshooting articles" target="_blank" href="https://help.guesty.com/hc/en-gb/sections/15631615610397">Help Center troubleshooting articles</Anchor>.</li>
  </ol>
</Accordion>

<Accordion title="How can I be sure the payment method succeeded?" icon="fa-info-circle">
  The reservation object payload will show the payment object, nested under the <code>money.payments</code> section.
</Accordion>

<Accordion title="Error 402: ERR\_BAD\_REQUEST" icon="fa-info-circle">
  When the data of your response contains the messages: <i>"Request contradicts clearing interface configuration"</i> and<i>"Bad Bin or Host Disconnect",</i> it means there is an issue with your GuestyPay account and it could be offline. To remedy this, contact <Anchor target="_blank" href="https://help.guesty.com/hc/en-gb/articles/9370047984413-Contacting-Customer-Experience">Customer Experience</Anchor>.
</Accordion>

<Accordion title="Does GuestyPay have a test environment?" icon="fa-info-circle">
  Currently, GuestyPay is only available as a live environment. You will need a valid real credit card to test payments.
</Accordion>