---
updatedAt: 2026-07-10T16:02:52.000Z
---

Fetch the complete documentation index at: https://developers.deliverect.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Deliverect Pay - Payment Token Flow

<br />

| Platforms                 | Role                                                                                                                              |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Channel**               | The ordering platform integrating with Deliverect Pay <Glossary>Dpay</Glossary>. Initiates the tokenization and payment requests. |
| **BasisTheory Proxy**     | Token vault proxy. Receives PCI data from the channel, encrypts it, and forwards it to <Glossary>Dpay</Glossary>.                 |
| **Deliverect Pay (Dpay)** | Deliverect's payment orchestration layer. Manages tokens, verification, and fund acquisition.                                     |
| **PSP**                   | The underlying Payment Service Provider that verifies cards and acquires funds.                                                   |

<br />

```mermaid
%%{init: { "theme": "base", "themeVariables": { "fontSize": "18px", "background": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
sequenceDiagram
    autonumber
    participant CHANNEL as Channel
    participant PROXY as BasisTheory Proxy
    participant DPAY as Deliverect Pay
    participant PSP as PSP
    Note over CHANNEL,PSP: 𝟭 — 𝗧𝗼𝗸𝗲𝗻𝗶𝘇𝗲 𝗮 𝗰𝗮𝗿𝗱<br/>ℹ️ Deliverect uses BasisTheory as a token vault, surfacing a proxy<br/>to channels. The proxy securely receives PCI data and passes<br/>encrypted data to the PSP. Custom hostname:<br/>https://basistheory.staging.deliverect.com
    CHANNEL->>+PROXY: create token
    Note right of CHANNEL: POST https://basistheory.staging.deliverect.com<br/>{<br/>#160;#160;"gatewayProfileId": "gateway-1",<br/>#160;#160;"channelLinkId": "channelLink-1",<br/>#160;#160;"customerId": "customer-1",<br/>#160;#160;"payment_method": {<br/>#160;#160;#160;#160;"number": "4111111111111111",<br/>#160;#160;#160;#160;"expiration_month": 3,<br/>#160;#160;#160;#160;"expiration_year": 2030,<br/>#160;#160;#160;#160;"cvc": "737"<br/>#160;#160;}<br/>}
    PROXY->>+DPAY: create token
    DPAY->>+PSP: verify card
    PSP-->>-DPAY: Result
    DPAY-->>-CHANNEL: Token
    deactivate PROXY
    Note right of CHANNEL: 200 OK<br/>{<br/>#160;#160;"id": "token-1",<br/>#160;#160;"accountId": "account-1",<br/>#160;#160;"customerId": "customer-1",<br/>#160;#160;"card": {<br/>#160;#160;#160;#160;"brand": "visa",<br/>#160;#160;#160;#160;"last4": 1234,<br/>#160;#160;#160;#160;"expirationYear": 2030,<br/>#160;#160;#160;#160;"expirationMonth": 10<br/>#160;#160;},<br/>#160;#160;"provider": "basis_theory",<br/>#160;#160;"providerId": "provider-id",<br/>#160;#160;"status": "verified | failed",<br/>#160;#160;"verification": {<br/>#160;#160;#160;#160;"paymentId": "payment-1",<br/>#160;#160;#160;#160;"providerTokenIntentId": "token-intent-1"<br/>#160;#160;},<br/>#160;#160;"gateway": 1234,<br/>#160;#160;"paymentGatewayToken": "gateway-token"<br/>}
    Note over CHANNEL,PSP: 𝟮 — 𝗟𝗶𝘀𝘁 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝘁𝗼𝗸𝗲𝗻𝘀<br/>ℹ️ A customer may have multiple tokenized cards. An endpoint lists<br/>these tokens, allowing the customer to choose the card they<br/>want to use for payment.<br/>The customerId is the one sent when creating the token.
    CHANNEL->>+DPAY: list customer tokens
    Note right of CHANNEL: GET /pay/channel/{channelLinkId}/tokens/customer/{customerId}
    DPAY-->>-CHANNEL: Tokens
    Note right of CHANNEL: 200 OK<br/>{<br/>#160;#160;"total": 1,<br/>#160;#160;"page": 1,<br/>#160;#160;"size": 50,<br/>#160;#160;"items": [<br/>#160;#160;#160;#160;{<br/>#160;#160;#160;#160;#160;#160;"id": "token-1",<br/>#160;#160;#160;#160;#160;#160;"accountId": "account-1",<br/>#160;#160;#160;#160;#160;#160;"customerId": "customer-1",<br/>#160;#160;#160;#160;#160;#160;...<br/>#160;#160;#160;#160;}<br/>#160;#160;]<br/>}
    Note over CHANNEL,PSP: 𝟯 — 𝗥𝗲𝗾𝘂𝗲𝘀𝘁 𝗮 𝗽𝗮𝘆𝗺𝗲𝗻𝘁 𝘂𝘀𝗶𝗻𝗴 𝗮 𝘁𝗼𝗸𝗲𝗻<br/>ℹ️ Deliverect Pay surfaces an endpoint for channels to request a payment.<br/>It supports various modes, one being "token", where a verified<br/>token acquires funds. Capture modes:<br/>· immediate — capture funds instantly (default)<br/>· manual — pre-authorize now, capture later
    CHANNEL->>+DPAY: request payment
    Note right of CHANNEL: POST /pay/channel/{channelLinkId}/payments/request<br/>{<br/>#160;#160;"gatewayProfileId": "gateway-1",<br/>#160;#160;"mode": {<br/>#160;#160;#160;#160;"type": "token",<br/>#160;#160;#160;#160;"tokenId": "token-1"<br/>#160;#160;},<br/>#160;#160;"captureMode": "immediate",<br/>#160;#160;"amount": 1000,<br/>#160;#160;"currency": "USD",<br/>#160;#160;"payer": {<br/>#160;#160;#160;#160;"name": "John Doe",<br/>#160;#160;#160;#160;"reference": "customer-1"<br/>#160;#160;}<br/>}
    DPAY->>+PSP: acquire
    PSP-->>-DPAY: Result
    DPAY-->>-CHANNEL: Payment
    Note right of CHANNEL: 200 OK<br/>{<br/>#160;#160;"paymentId": "payment-1",<br/>#160;#160;"paymentStatus": "authorized"<br/>}
```

<br />