Payment Links
Payment Links
A Payment Link is a shareable, secure checkout session that allows your customers to pay by card or cryptocurrency on a hosted payment page with zero
frontend integration — just a single server-to-server API call.
Depasify handles the entire checkout experience, compliance, 3D Secure verification, and on-chain crypto flows, returning the customer directly to your
specified redirect URL upon completion.
Key Benefits
YOUR BACKEND ──POST /accounts/:id/widget_sessions ──▶ DEPASIFY
│
◀────────────────── (Single-use Checkout URL) ──────────┘
│
CUSTOMER ──Opens link (or embedded iframe) ────────────▶ HOSTED CHECKOUT
│
CUSTOMER ──Completes card or crypto payment ───────────▶ 3DS / ON-CHAIN VERIFICATION
│
DEPASIFY ──Redirects customer ─────────────────────────▶ YOUR REDIRECT URL
- Zero Frontend Code: Sell products, collect invoices, or fund accounts without embedding or maintaining client-side SDKs.
- Server-Defined Pricing: The payment terms (
amount,currency,method) are established directly from your backend, ensuring the checkout session
reflects your exact intent. - Single-Use & Secure: Every link generates a unique, tamper-proof, single-use token that automatically expires (default 60 minutes) or can be revoked
anytime. - Omnichannel: Share links via email, SMS, chat, invoice PDFs, or embed them directly inside your app's checkout modal.
- Real-Time Webhooks: Receive instant notifications when a payment completes or fails (
widget_session_completedandwidget_session_failed).
Integration Guide
Step 1: Set Default Checkout Preferences
Configure your organization's default checkout behavior once (language, expiration time, and fallback redirect URLs). You can also provide an account_id
to customize settings for specific accounts.
- Endpoint:
POST /api/v1/widget_configs
curl -X POST "https://sandbox.depasify.com/api/v1/widget_configs" \
-H "Authorization: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"default_lang": "en",
"expiry_minutes": 60,
"default_success_redirect_url": "https://merchant.example.com/checkout/success",
"default_failure_redirect_url": "https://merchant.example.com/checkout/failure"
}'─────────────────────────────────────────────────
Step 2: Generate a Payment Link
Whenever an order or invoice is generated on your system, request a Payment Link:
- Endpoint: POST /api/v1/accounts/{account_id}/widget_sessions
curl -X POST "https://sandbox.depasify.com/api/v1/accounts/bf8b9358-7523-4ea9-bc6a-65a25994a9bc/widget_sessions" \
-H "Authorization: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"amount": "10.50",
"currency": "EUR",
"method": "card",
"trx_uuid": "order_inv_98765",
"embeddable": false,
"description": "Order #98765 - Annual Subscription",
"full_name": "Jane Doe",
"address_line_1": "Paseo de la Castellana 45",
"city": "Madrid",
"postal_code": "28046",
"country_code": "ES"
}'Example Response (201 Created):
{
"uuid": "01a062c8-3c80-71fe-bdc8-f079ebae3fb2",
"status": "open",
"amount": "10.50",
"currency": "EUR",
"method": "card",
"trx_uuid": "order_inv_98765",
"embeddable": false,
"expires_at": "2026-09-04T12:30:00Z",
"url": "https://widget.depa.finance/pl/vvvW3UvbGgernIQB"
}─────────────────────────────────────────────────
Step 3: Direct Customer to Payment
Redirect your customer to the returned url:
- Standard Checkout (embeddable: false): Full-page hosted checkout with branding and navigation. Perfect for email, SMS, messaging, or web redirect.
- Embedded Modal (embeddable: true): Clean, transparent interface designed to render inside an iframe within your checkout modal:
<iframe src="https://widget.depa.finance/emb/pl/vvvW3UvbGgernIQB" width="100%" height="700" frameborder="0" allow="payment"></iframe>
─────────────────────────────────────────────────
Step 4: Audit & Lifecycle Management
- List Sessions: GET /api/v1/accounts/{account_id}/widget_sessions
- Session Details: GET /api/v1/accounts/{account_id}/widget_sessions/{uuid}
- Revoke Link: POST /api/v1/accounts/{account_id}/widget_sessions/{uuid}/revoke
Updated 1 day ago

