Payments Gateway Service Overviewbeta

The Payments Gateway Service API is a comprehensive RESTful API that processes payment transactions, handles refunds and reversals, and manages captures for the Teya Platform. This API enables secure payment processing for various transaction types including card-present, MOTO, and SoftPOS transactions.

For online and e-commerce payment processing, see the Online Payments API.

Authentication

The API uses OAuth 2.0 authentication with the following flows:

  • Authorization Code flow for external access

Use Cases and Workflows

The Payments Gateway Service API supports different types of payment processing workflows. Understanding these patterns will help you choose the right endpoints for your specific payment requirements.

Card Present

Endpoint: POST /v1/transactions/card-present

When to use:

  • Physical terminal/POS transactions
  • Card is physically present and inserted/tapped
  • EMV chip card transactions
  • Contactless payments

Example Scenario:
Processing a €25 card present transaction at a retail terminal:

# Process card present transaction
curl -X POST "https://base-url.salt/api/v1/transactions/card-present" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: terminal-txn-12345" \
  -d '{
    "type": "SALE",
    "entry_mode": "CONTACT_EMV",
    "verification_method": "ONLINE_PIN",
    "amounts": {
      "amount": 2500,
      "currency": "EUR"
    },
    "terminal_id": "12345678",
    "emv_data": "5F2A020978820200009F3602...",
    "track_data": {
      "encryption_key_id": "5EE0",
      "encrypted_track": "5188340000000011D241212099999999",
      "encryption_ksn": "123456789012"
    },
    "transacted_at": "2024-01-15T10:30:00.000Z"
  }'

Usage Notes

  1. UUID Format: Transaction IDs and merchant IDs must be valid UUIDs where specified
  2. Amount Format: Amounts are in minor units (e.g., 100 for €1.00, 5000 for €50.00)
  3. Currency Format: All currencies must be in ISO-4217 format (3-letter codes: EUR, USD, GBP, etc.)
  4. Idempotency: Use Idempotency-Key headers to prevent duplicate transactions
  5. Authentication: All requests require valid OAuth 2.0 bearer tokens
  6. Transaction Types: Supported types include AUTHORISATION, CAPTURE, REFUND, REVERSAL
  7. Card Brands: Supported brands include VISA, MASTERCARD, MAESTRO, AMEX, JCB, DINERS, DISCOVER
  8. Terminal ID: The terminal_id field is optional and only required when the transaction is processed through a non-Teya terminal
  9. Date Format: All timestamps use ISO-8601 format

Additional Resources