> For the complete documentation index, see [llms.txt](https://tri.gitbook.io/tri-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tri.gitbook.io/tri-doc/liquidity-pool/add-credit-card-for-individual-consumption.md).

# Add Credit Card For Individual Consumption

### Liquidity Pool

<mark style="color:green;">`POST`</mark> <https://sandbox.triangle.digital/api/v2/liquidity\\_pool/clients/{client\\_id}/individual\\_consumptions/{individual\\_consumption\\_id}/add\\_credit\\_card>

Creates a checkout link where the Individual Consumption's card is entered; open it in a browser. The card attaches automatically once the checkout is completed. Business accounts only; a record with a card attached is refused.

**Path parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="260">Name</th><th width="110">Type</th><th>Description</th><th width="260">Where to take it from</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>integer</td><td><strong>Required.</strong> The client the record belongs to.</td><td><a href="/tri-doc/liquidity-pool/get-clients.md">Get Clients</a> — <code>client_id</code></td></tr><tr><td><code>individual_consumption_id</code></td><td>uuid</td><td><strong>Required.</strong> The Individual Consumption the card is attached to.</td><td><a href="/tri-doc/liquidity-pool/get-individual-consumptions.md">Get Individual Consumptions</a> — <code>individual_consumption_id</code></td></tr></tbody></table>

**Headers**

<table data-full-width="true"><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr></tbody></table>

**Body**

<table data-full-width="true" data-search="false"><thead><tr><th width="200">Name</th><th width="110">Type</th><th>Description</th><th width="260">Example</th></tr></thead><tbody><tr><td><code>hash</code></td><td>string</td><td><strong>Required.</strong> API key.</td><td>fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1</td></tr></tbody></table>

```json
{
    "hash": "fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1"
}
```

**Response fields**

<table data-full-width="true" data-search="false"><thead><tr><th width="260">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td>string</td><td>Human-readable result of the call.</td></tr><tr><td><code>success</code></td><td>boolean</td><td>Whether the link was created; a refused call answers HTTP 400.</td></tr><tr><td><code>data.url</code></td><td>string</td><td>Checkout page where the card is entered.</td></tr><tr><td><code>data.expires_at</code></td><td>string</td><td>When the link expires, MM/DD/YYYY HH:MM:SS UTC +00:00.</td></tr><tr><td><code>operations_count</code></td><td>integer</td><td>Always <code>1</code>.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}
{% code fullWidth="false" %}

```json
{
    "message": "Credit card setup link created successfully.",
    "success": true,
    "data": {
        "url": "https://checkout.stripe.com/c/pay/cs_test_c1UKo5SqYHNKNTbyfzxkgaqTUC05OMznIANnoGfJ6UBgAfPx4tq5koInp6",
        "expires_at": "07/18/2026 16:39:37 UTC +00:00"
    },
    "operations_count": 1
}
```

{% endcode %}
{% endtab %}

{% tab title="400" %}
The card is already set, the record is unknown for this client, or the client is not a Business account; the message says what exactly.

```json
{
    "message": "Credit card already set.",
    "success": false,
    "data": [],
    "operations_count": 1
}
```

{% endtab %}
{% endtabs %}
