Payments (Grow)

Process credit card payments and refunds through the Glance Grow payment gateway.

Use cases: Use the Payments API to charge customers directly, process refunds, and query transaction history.
POST/grow/payments/charge

Charge a credit card.

Body Parameters

NameTypeDescription
amount
numberrequiredAmount to charge.
currency
string3-letter currency code (default "ILS").
cardToken
stringrequiredTokenized card reference from the payment form.
description
stringCharge description.
clientId
numberClient visible ID to associate.
documentId
numberDocument visible ID to associate.

Request

curl -X POST "https://api.glance.co.il/grow/payments/charge" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 0,
  "currency": "example_currency",
  "cardToken": "example_cardToken",
  "description": "example_description",
  "clientId": 0,
  "documentId": 0
}'

Response

Response
{
  "data": {
    "transactionId": "txn_abc123def456",
    "amount": 5850,
    "currency": "ILS",
    "status": "approved",
    "last4": "4242",
    "createdAt": "2024-03-20T14:30:00Z"
  }
}
POST/grow/payments/refund

Refund a previous transaction.

Body Parameters

NameTypeDescription
transactionId
stringrequiredThe original transaction ID to refund.
amount
numberrequiredAmount to refund (can be partial).
reason
stringReason for the refund.

Request

curl -X POST "https://api.glance.co.il/grow/payments/refund" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "transactionId": "example_transactionId",
  "amount": 0,
  "reason": "example_reason"
}'

Response

Response
{
  "data": {
    "transactionId": "txn_ref_xyz789",
    "originalTransactionId": "txn_abc123def456",
    "amount": 2000,
    "currency": "ILS",
    "status": "refunded",
    "reason": "Partial service cancellation",
    "createdAt": "2024-03-20T15:00:00Z"
  }
}
GET/grow/payments/transactions

List payment transactions.

Query Parameters

NameTypeDescription
startDate
stringFilter from date (YYYY-MM-DD).
endDate
stringFilter to date (YYYY-MM-DD).
status
stringFilter by status (e.g. approved, refunded, declined).
page
numberPage number (default 1).
limit
numberItems per page (default 50).

Request

curl -X GET "https://api.glance.co.il/grow/payments/transactions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": [
    {
      "transactionId": "txn_abc123def456",
      "amount": 5850,
      "currency": "ILS",
      "status": "approved",
      "last4": "4242",
      "client": {
        "visibleId": 1,
        "name": "Acme Corp"
      },
      "createdAt": "2024-03-20T14:30:00Z"
    }
  ],
  "pagination": {
    "total": 320,
    "limit": 50,
    "offset": 0,
    "hasMore": true
  }
}
GET/grow/payments/transactions/:id

Get a single transaction by ID.

Path Parameters

NameTypeDescription
id
stringrequiredThe transaction ID.

Request

curl -X GET "https://api.glance.co.il/grow/payments/transactions/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": {
    "transactionId": "txn_abc123def456",
    "amount": 5850,
    "currency": "ILS",
    "status": "approved",
    "last4": "4242",
    "cardBrand": "Visa",
    "client": {
      "visibleId": 1,
      "name": "Acme Corp"
    },
    "document": {
      "visibleId": 1001,
      "type": "invoice"
    },
    "description": "Invoice #1001 payment",
    "createdAt": "2024-03-20T14:30:00Z"
  }
}