<div id="integration-guide">

<div class="ig-section">
<div class="ig-section-header">
<div class="ig-section-icon hosted"><i class="fas fa-paint-brush"></i></div>
<h2>Customize Pay By Link</h2>
</div>
<p class="ig-section-desc">Configure the payment link and hosted payment page to match your brand and business needs.</p>

<div class="ig-subsection">
<h3>Branding</h3>
<p>The hosted payment page automatically displays your store branding as configured in the <a href="https://business.teya.com/settings" target="_blank" rel="noopener">Teya Business Portal</a>. This includes your store name and logo.</p>
</div>

<div class="ig-subsection">
<h3>Checkout &amp; receipt customisation</h3>
<p>The following options can be configured in the <strong>Pay By Link</strong> settings in the Teya Business Portal. These settings apply across all payment links created for your store.</p>

<table class="ig-comparison">
<thead>
<tr><th>Setting</th><th>Description</th><th>Where it appears</th><th>Required</th></tr>
</thead>
<tbody>
<tr><td><strong>Message on checkout</strong></td><td>A custom message shown to the customer before they pay. Use this for order context, instructions, or any terms the customer should see.</td><td>Hosted payment page</td><td>No</td></tr>
<tr><td><strong>Message on receipt</strong></td><td>A custom message shown after a successful payment. Use this for confirmation notes, next steps, or contact details.</td><td>Receipt page</td><td>No</td></tr>
<tr><td><strong>Privacy policy URL</strong></td><td>A link to your privacy policy. Customers can review how their data is handled before completing payment.</td><td>Hosted payment page</td><td>No</td></tr>
<tr><td><strong>Terms &amp; conditions URL</strong></td><td>A link to your terms and conditions, displayed alongside the privacy policy link.</td><td>Hosted payment page</td><td>No</td></tr>
</tbody>
</table>
</div>

<div class="ig-subsection">
<h3>Saving a payment method</h3>

```admonition
icon: fas fa-exclamation-triangle
title: Consent comes first
content: Before you store a card, you must obtain and record the customer's agreement to save it and charge it again. That agreement — often called a mandate — defines when, how often, and for how much you can charge the card. It is what makes the later merchant-initiated payments valid.
```

<p>A payment link can store the customer's card as well as take payment, which makes it a way to put a card on file for a customer who has no account on your site &mdash; or when you have no website at all.</p>

<p>Set <code>save_payment_method</code> to <code>true</code> when you create the link. The customer enters their card on the Teya-hosted payment page, so 3D Secure runs there and the card number never touches your systems.</p>

<p>Two fields work together on the link. <code>save_payment_method</code> is what mints the token; <code>transaction_type</code> decides what the customer sees:</p>

<table class="ig-comparison">
<thead>
<tr><th><code>transaction_type</code></th><th><code>amount.value</code></th><th>What the payment page shows</th></tr>
</thead>
<tbody>
<tr><td><code>ACCOUNT_VERIFICATION</code></td><td><code>0</code></td><td>Saves the card without charging it. The pay button shows no price.</td></tr>
<tr><td><code>SALE</code> (default)</td><td>The real amount</td><td>Saves the card alongside a real payment.</td></tr>
</tbody>
</table>

<p>If you send <code>transaction_type: ACCOUNT_VERIFICATION</code> with <code>save_payment_method: false</code>, Teya verifies the card but saves nothing.</p>

<p><code>amount</code> is still required on the request &mdash; send a zero value so the customer is not charged:</p>

```json
{
  "transaction_type": "ACCOUNT_VERIFICATION",
  "save_payment_method": true,
  "amount": { "value": 0, "currency": "GBP" },
  "merchant_reference": "save-card-cust-4821",
  "customer": { "email": "john.doe@example.com" },
  "success_url": "https://mywebsite.com/account/cards/saved"
}
```

<p>The token arrives on the <code>payment.succeeded.v1</code> webhook as <code>data.token_response.token_id</code>. Store it alongside <code>data.payment_method.brand</code> and <code>last4</code> so you can render &ldquo;Mastercard &bull;&bull;&bull;&bull;4065&rdquo; in your UI.</p>

<p>See <a href="/partners/online-payments/saved-payments/overview">Card on File</a> for the consent rules and the wider flow, and <a href="/partners/online-payments/saved-payments/charge">Charge a Saved Payment Method</a> for charging the token.</p>
</div>

<div class="ig-subsection">
<h3>Link Expiry</h3>
<p>Payment links remain active until they are either paid or explicitly cancelled. To cancel an active link:</p>
<ul>
<li><strong>Via the portal:</strong> Go to <strong>Payment Links</strong> in the Teya Business Portal and select Cancel on the relevant link.</li>
<li><strong>Via the API:</strong> Use the Update Payment Link API endpoint.</li>
</ul>
</div>

</div>
</div>
