API Reference

Complete VINR API documentation with endpoints, parameters, and examples.

Base URL

Production: https://api.vinr.com/v1
Sandbox:    https://sandbox.api.vinr.com/v1

Authentication

All API requests require a Bearer token:

Authorization: Bearer sk_live_your_secret_key

Core Resources

Payments

MethodEndpointDescription
POST/paymentsCreate a payment
GET/payments/:idRetrieve a payment
GET/paymentsList payments
POST/payments/:id/captureCapture an authorized payment
POST/payments/:id/cancelCancel a payment

Refunds

MethodEndpointDescription
POST/refundsCreate a refund
GET/refunds/:idRetrieve a refund
GET/refundsList refunds

Webhooks

MethodEndpointDescription
POST/webhooksRegister a webhook endpoint
GET/webhooksList webhook endpoints
DELETE/webhooks/:idRemove a webhook endpoint

Settlements

MethodEndpointDescription
GET/settlementsList settlements
GET/settlements/:idRetrieve settlement details
GET/settlements/:id/transactionsList transactions in a settlement

Response Format

All responses follow a consistent structure:

{
  "id": "pay_1234567890",
  "object": "payment",
  "status": "completed",
  "amount": 1000,
  "currency": "EUR",
  "created_at": "2026-04-15T10:30:00Z",
  "metadata": {}
}

Payment Object

PropTypeDefault
id
string
-
object
string
-
status
'pending' | 'requires_authentication' | 'completed' | 'failed' | 'cancelled'
-
amount
number
-
currency
string
-
description
string
undefined
returnUrl
string
-
checkoutUrl
string
-
metadata
Record<string, string>
{}
created_at
string
-

Create Payment Parameters

PropTypeDefault
amount
number
-
currency
string
-
description
string
undefined
returnUrl
string
-
metadata
Record<string, string>
{}
idempotencyKey
string
auto-generated
capture
boolean
true

Error Codes

CodeMeaning
400Bad Request — Invalid parameters
401Unauthorized — Invalid API key
403Forbidden — Insufficient permissions
404Not Found — Resource doesn't exist
409Conflict — Idempotency conflict
429Rate Limited — Too many requests
500Server Error — Contact support

Full OpenAPI specification will be available for download when the spec is finalized. Auto-generated reference pages will replace this overview.

Съдържание

Редактиране в GitHub