๐Ÿ’ณ Payment Server Examples

โ„น๏ธ Info: This page demonstrates how to use the credit card payment iframe with tokenization.
๐Ÿ” Tokenization Mode: All payments use tokenization (AK mode) by default to securely save card details.
๐Ÿ” One-Time Token Authentication

Secure your API requests with username/password authentication that generates one-time access tokens.


๐Ÿ“ Example 1: Basic Credit Card Payment (Tokenization)

Minimal configuration with auto-generated URLs:

Try Credit Card Payment (โ‚ช50)

๐Ÿ“ Example 2: Credit Card with Custom Notify URL

Specify a custom webhook URL for notifications:

Try Custom Notify URL (โ‚ช100)

๐Ÿ“ Example 3: Full Custom URLs

Specify custom success, failure, and notify URLs:

/payment/creditcard/iframe?
  id=CC-FULL789&
  sum=250&
  successUrl=http://localhost:3000/payment/creditcard/success&
  failureUrl=http://localhost:3000/payment/creditcard/failure&
  notifyUrl=http://localhost:3000/payment/creditcard/notify
Try Full Custom URLs (โ‚ช250)

๐Ÿ“ Example 4: JavaScript Dynamic Link Generation

Generate payment links programmatically:


๐Ÿ“š API Endpoints

Credit Card Payment (Tokenization):
  • Payment Iframe: GET /payment/creditcard/iframe
  • Success Handler: GET/POST /payment/creditcard/success
  • Failure Handler: GET/POST /payment/creditcard/failure
  • Webhook/Notify: POST /payment/creditcard/notify
Coming Soon:
  • Apple Pay: /payment/applepay/*
  • Bit Payment: /payment/bit/*
Other:
  • Health Check: GET /health

โš™๏ธ Query Parameters

Parameter Description Default
paymentSessionId Payment session ID for backend tracking -
id Payment identifier (fallback for session ID) Auto-generated
sum Payment amount 1
currency Currency code (1=ILS, 2=USD) 1 (ILS)
appSuccessUrl App URL to redirect on success -
appFailureUrl App URL to redirect on failure -
notifyUrl Webhook notification URL /payment/notify
successUrl Success redirect URL /payment/success
failureUrl Failure redirect URL /payment/failure
tranmode Transaction mode (AK=Tokenization, NK=Normal) AK (Tokenization)
supplierName Tranzila supplier name raanan
โš ๏ธ Important: Make sure to configure your .env file with your actual API base URL and API key before using in production!

๐Ÿงช Test Complete Payment Flow

Try the full payment flow with sample app return URLs:

๐Ÿš€ Test Payment with Session ID

This test uses paymentSessionId=test-session-123 and will call your backend APIs.
After payment, you'll be redirected to sample app pages.
Sample app pages: /app/dashboard | /app/payment-success | /app/payment-failure