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
Development:
https://id.teya.xyz/oauth/v2/oauth-token
Production:
https://id.teya.com/oauth/v2/oauth-token
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
- UUID Format: Transaction IDs and merchant IDs must be valid UUIDs where specified
- Amount Format: Amounts are in minor units (e.g., 100 for €1.00, 5000 for €50.00)
- Currency Format: All currencies must be in ISO-4217 format (3-letter codes: EUR, USD, GBP, etc.)
- Idempotency: Use Idempotency-Key headers to prevent duplicate transactions
- Authentication: All requests require valid OAuth 2.0 bearer tokens
- Transaction Types: Supported types include AUTHORISATION, CAPTURE, REFUND, REVERSAL
- Card Brands: Supported brands include VISA, MASTERCARD, MAESTRO, AMEX, JCB, DINERS, DISCOVER
- Terminal ID: The
terminal_idfield is optional and only required when the transaction is processed through a non-Teya terminal - Date Format: All timestamps use ISO-8601 format
Additional Resources
- API Reference: View complete API documentation
- Test Cards: Test card numbers for different scenarios