Stripe Adapter
Configure Stripe Connect for real payment settlements
Prerequisites
What you need before starting
- A Stripe account with Connect enabled
- A ZexRail production API key (sk_live_...)
- Working settlement flow in sandbox
01
Connect Your Stripe Account
Link your Stripe Connect account to ZexRail
curl -X POST https://api.sandbox.zexrail.com/v1/adapters/stripe/connect \
-H "Authorization: Bearer sk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"stripe_secret_key": "sk_test_stripe_key",
"stripe_account_id": "acct_1234567890"
}'02
Use the Stripe Adapter
Switch from test to stripe when creating settlements
curl -X POST https://api.sandbox.zexrail.com/v1/settlements \
-H "Authorization: Bearer sk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"negotiation_id": "neg_xyz",
"adapter": "stripe",
"splits": [
{ "agent_id": "agent_aaa", "bps": 7000 },
{ "agent_id": "agent_bbb", "bps": 3000 }
]
}'03
Verify Stripe Transfers
Receipts include Stripe transfer IDs for each split
receipt = requests.get(
f"{BASE}/settlements/{settlement['id']}/receipt", headers=HEADERS
).json()
for payout in receipt["payouts"]:
print(f"Agent: {payout['agent_id']}")
print(f" Amount: {payout['amount']} cents")
print(f" Stripe Transfer: {payout['stripe_transfer_id']}")Test vs Stripe Adapter
| Feature | Test Adapter | Stripe Adapter |
|---|---|---|
| Real funds | No | Yes |
| Transfer IDs | Simulated | Real Stripe IDs |
| Setup required | None | Stripe Connect |
| Receipts and Verity | Full support | Full support |