# Add store credit by payment (/api/customers/create-customer-balance-payment)

`POST https://api.comecero.com/api/v1/customers/{customer_id}/balance/payments`

Takes a payment from the customer and adds it to their store credit. This is the same as Create a payment: the body is a payment, and Comecero reads the customer from the body, not from the URL. To add the money to the balance, send `apply_to_balance: true` and the customer (`customer_id` or `customer`) in the body. The credit is added when the payment is captured, in the payment's currency converted to the balance currency. The payment cannot use `customer_account_balance` as its payment method. Money moves and the usual payment events fire. Secret tokens, and limited tokens. The id in the URL may be `me` only with a token from a customer login.

## Parameters

- `customer_id` (path, required): The id of the customer. With a limited token from a customer login you can send `me` instead.

Request body: the `payment_request` schema.

Responses: 201, 400, 401, 403, 404, 409, 422.

Full schemas: operation `create_customer_balance_payment` in /openapi.json.