# Pay with token

*<mark style="color:orange;">Only apply for Domestic or International card.</mark>*

APIOperation = <mark style="color:red;">PAY</mark>; sourceOfFund = <mark style="color:red;">TOKEN</mark>

Use Token created in [Pay with create token](/upc/payment-gateway/api-specification/payment/pay-with-create-token.md) and apiOperation = <mark style="color:red;">PAY</mark> to pay

## Benefits of Pay with token

1. **High Security**: Uses tokenization instead of card data to protect sensitive information and reduce data breach risks.
2. **Streamlined Payments**: Customers don’t need to re-enter card details, making transactions faster.
3. **Reduced Declines**: Network Tokens can auto-update when card changed (only apply for International Card), ensuring more stable transactions.
4. **Supports Recurring Payments**: Easily handles recurring transactions without re-verifying card details.
5. **PCI DSS Compliance**: Lowers compliance burdens, saving time and costs on security requirements.

## Customer journey

The following sample of customer journey is for Integration method = MERCHANT HOSTED CHECKOUT and payment method = DOMESTIC CARD:

{% hint style="info" %}
View information about terms/definitions in [Glossary](/upc/payment-gateway/appendix/glossary.md)
{% endhint %}

### Step 1: Pay with create token&#x20;

1. Customer completes order information and initiates a transaction with a payment method (for example, DOMESTIC Card). API Operation = PAY\_WITH\_CREATE\_TOKEN
2. Customer enters card information: Card number, Card holder name, card issue date/expired date. Then clicks "Submit" to proceeds to complete  the payment.

<figure><img src="/files/58qbRbJ4U13jhWp8wxph" alt=""><figcaption></figcaption></figure>

3. After the credentials are entered, and the payment flow is launched, the user is navigated through a secured Galaxy Pay environment that reflects the transaction ID.

<figure><img src="/files/kEStzgoVIZIuxKrXaarr" alt=""><figcaption></figcaption></figure>

4. The flow takes the user to the login ACS page of the bank, where the user needs to complete the transaction by using the OTP sent by the bank to the registered mobile number.

<figure><img src="/files/grlvS8032VbMXBdqYMQ7" alt=""><figcaption></figcaption></figure>

5. The customer is shown (failed/successful) on merchant website based on the transaction status from Galaxy Pay

<figure><img src="/files/k7kksZXTdpjV0GDaunPb" alt=""><figcaption></figcaption></figure>

6. Save Token from IPN callback

<figure><img src="/files/kv4vGWNM9Git6GSXIejD" alt=""><figcaption></figcaption></figure>

### Step 2: Pay with token

1. Customer completes order information and initiates a transaction with a payment method (for example, DOMESTIC Card). API Operation = Pay, SourceOfFund = Token
2. Customer enters token (created in Step 1) and clicks "Submit" to proceeds to complete  the payment.

<figure><img src="/files/iRiMzHTSskCgYzBhAhYT" alt=""><figcaption></figcaption></figure>

3. After the credentials are entered, and the payment flow is launched, the user is navigated through a secured Galaxy Pay environment that reflects the transaction ID.

<figure><img src="/files/kEStzgoVIZIuxKrXaarr" alt=""><figcaption></figcaption></figure>

4. The flow takes the user to the login ACS page of the bank, where the user needs to complete the transaction by using the OTP sent by the bank to the registered mobile number.

<figure><img src="/files/QguyoaVlHPPBSkB1tYgM" alt=""><figcaption></figcaption></figure>

5. The customer is shown (failed/successful) on merchant website based on the transaction status from Galaxy Pay

<figure><img src="/files/z04oMpJ5Tj56K0uUP343" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3nTK72YNffBKhMp4ixZE" alt=""><figcaption></figcaption></figure>

## Integration&#x20;

See integration detail in [General integration steps](/upc/payment-gateway/payment-solution/general-integration-steps.md)&#x20;

* Step 1: Use API [Pay with create token](/upc/payment-gateway/api-specification/payment/pay-with-create-token.md) to create token
* Step 2: Use Token created in step 1 and API [Pay](/upc/payment-gateway/api-specification/payment/pay-with-token.md) (Pay with token) to pay


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.galaxypay.vn/upc/payment-gateway/payment-solution/pay-with-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
