Overview
The Payment endpoints enable you to accept online and mobile payments, process refunds, and retrieve transaction information. Digitzs supports card payments, ACH transfers, and split payments for marketplace applications.All payment amounts must be specified in cents (smallest currency unit). For example, $10.00 = 1000 cents.
Payment Types
Card Payments
Accept credit and debit card payments with instant authorization
ACH Payments
Process bank transfers via the Automated Clearing House network
Split Payments
Automatically distribute funds between merchants and your platform
Available Endpoints
Create and Process
Create Payment - Card
Process a credit or debit card payment
POST /paymentsCreate Payment - ACH
Process an ACH bank transfer
POST /paymentsSplit Payments
Create Split Payment
Split payment between multiple recipients
POST /paymentsAdd Additional Split
Add another split to an existing payment
POST /paymentsRefunds and Voids
Refund or Void Payment
Refund a completed payment or void a pending one
POST /paymentsRefund Split
Refund a portion of a split payment
POST /paymentsRetrieve Information
Get Payment by ID
Retrieve payment details
GET /payments/{id}Get Payment Status
Check payment processing status
GET /payments/status/{id}List Payments
Get all payments for a merchant
GET /paymentsQuick Start
Process a Card Payment
Process an ACH Payment
Payment Flow
Common Use Cases
Single Payment
Single Payment
Process a one-time payment from a customer to a merchant using a card or ACH.Best for: E-commerce checkouts, subscription billing, invoices
Split Payment (Marketplace)
Split Payment (Marketplace)
Distribute payment between merchant and platform fee automatically.Best for: Marketplaces, platforms, booking servicesExample: 90 to merchant + $10 platform fee
Multiple Splits
Multiple Splits
Split payment among multiple recipients (merchant, platform, referral partner).Best for: Multi-vendor platforms, affiliate programsExample: 85 merchant + 5 affiliate
Refunds and Voids
Refunds and Voids
Return funds to customer for canceled orders or disputes.Void: Cancel payment before settlement
Refund: Return funds after settlement
Payment Method Tokens
For security, card details should be tokenized before sending to the API. Digitzs provides a secure tokenization service:Use the Digitzs payment form or tokenization SDK to securely collect and tokenize payment methods on the client side.
Transaction States
| State | Description |
|---|---|
pending | Payment initiated but not yet processed |
authorized | Payment authorized but not captured |
completed | Payment successfully processed |
failed | Payment failed to process |
refunded | Payment refunded to customer |
voided | Payment canceled before settlement |
Testing
Test Card Numbers
| Card Number | Result |
|---|---|
4111111111111111 | Successful charge |
4000000000000002 | Card declined |
4000000000009995 | Insufficient funds |
4000000000000069 | Expired card |
Test ACH Accounts
Use any valid routing number with these account numbers:| Account Number | Result |
|---|---|
1234567 | Successful payment |
9876543 | Insufficient funds |
Best Practices
Idempotency
Use
requestId (UUID v4) to prevent duplicate chargesError Handling
Always check response codes and handle errors gracefully
Amount Validation
Validate amounts on client side before submitting
Status Checks
Verify payment status before fulfilling orders
Security Considerations
Never store raw card data. Always use tokenized payment methods and comply with PCI DSS requirements.
- Use HTTPS for all API requests
- Tokenize payment methods on the client side
- Implement fraud detection and velocity checks
- Log all payment transactions for audit trails
- Monitor for suspicious activity patterns
Next Steps
1
Set Up Merchant Account
Create a merchant account to receive payments
2
Integrate Payment Form
Add payment collection to your application
3
Test Payments
Use test cards to verify your integration
4
Go Live
Switch to production credentials and start processing real payments

