---
search:
  tags:
    - billing
    - POST
seo:
  description: >-
    Grant prepaid customer balance from a… Reference for the POST
    /v1/customers/{customerId}/balance/grant-from-payment endpoint in the Vortex
    Payments API.
sidebar:
  label: Grant prepaid customer balance from a captured payment
  badge: POST
title: Grant prepaid customer balance from a captured payment
type: openapi-operation
---
`POST /v1/customers/{customerId}/balance/grant-from-payment`

**curl**

```bash
curl "https://api.vortex.nyc/v1/customers/{customerId}/balance/grant-from-payment?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entryId":"cbal_payment_123","paymentId":"pay_123","description":"Wallet top-up","effectiveAt":"2026-06-01T00:00:00.000Z"}'
```

**TypeScript**

```ts
import { grantCustomerBalanceFromPayment, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await grantCustomerBalanceFromPayment({
  client: vortex,
  path: { customerId: "..." },
  query: { environment: "sandbox", merchantAccountId: "..." },
  body: {"entryId":"cbal_payment_123","paymentId":"pay_123","description":"Wallet top-up","effectiveAt":"2026-06-01T00:00:00.000Z"},
});
```

**Request body** (`application/json`, required)

- `entryId` (string)
- `paymentId` (string, required)
- `targets` (CustomerBalanceTargets)
- `description` (string)
- `effectiveAt` (string<date-time>)
- `expiresAt` (string<date-time>)
- `metadata` (Metadata)

Request body example:

```json
{
  "entryId": "cbal_payment_123",
  "paymentId": "pay_123",
  "description": "Wallet top-up",
  "effectiveAt": "2026-06-01T00:00:00.000Z"
}
```

**Responses**

- `201` — Created
- `400` — Bad request, including malformed JSON
- `401` — Missing or invalid API key
- `409` — Conflict, including idempotency body drift
- `422` — Validation failed
- `429` — API key rate limit exceeded
- `default` — Error

Response example, 201:

```json
{
  "data": {},
  "requestId": "string"
}
```
