Depa LogoDocsv1
API Reference

Payment Links

A payment link is a single-use, hosted checkout page where your customer pays by card or crypto. You create it with one server-side call; Depa runs the checkout, compliance checks, 3-D Secure and on-chain flows.

  1. Configure checkout once with POST /widget_configs: language, colour mode, link lifetime and default redirect URLs. Send account_id to override the defaults for one account.
  2. Create a link for each order with POST /accounts/{account_id}/widget_sessions, setting amount, currency, method (card or crypto) and your trx_uuid.
  3. Send your customer to the url in the response. With embeddable: true (the default) the page is built for an iframe or modal; with false it's a standalone page you can link to from an email, SMS or invoice.
  4. Get the result. Depa redirects the customer to your success or failure URL and sends a widget_session_completed or widget_session_failed webhook.

Each link accepts one payment attempt, and both success and failure use it up. Links expire after the configured lifetime (60 minutes by default), and you can revoke an unpaid link at any time. Set customer_ip_address to lock a link to one customer's IP address.

GET/widget_configs

Returns the checkout settings in effect. With account_id, you get that account's override if it has an active one, otherwise your organization's defaults.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Query Parameters

account_id?string

Account to check. Leave it out for your organization's defaults.

Response Body

application/json

application/json

curl -X GET "https://example.com/widget_configs?account_id=bf8b9358-7523-4ea9-bc6a-65a25994a9bc"
{  "data": {    "id": 12,    "name": "Default Checkout Config",    "customer_id": 594,    "account_id": null,    "mode": "light",    "default_lang": "en",    "default_success_redirect_url": "https://merchant.example.com/checkout/success",    "default_failure_redirect_url": "https://merchant.example.com/checkout/failure",    "expiry_minutes": 60,    "enabled": true,    "created_at": "2026-03-02T09:15:00Z",    "updated_at": "2026-03-02T09:15:00Z"  }}

Configure checkout

POST/widget_configs

Creates or updates the checkout settings used for new payment links: language, colour mode, link lifetime and default redirect URLs.

  • Leave out account_id to set your organization's defaults.
  • Send account_id to override them for one account.

Returns 201 when a configuration is created and 200 when an existing one is updated.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Checkout settings. Omit account_id to set your organization's defaults.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/widget_configs" \  -H "Content-Type: application/json" \  -d '{    "name": "Default checkout",    "mode": "light",    "default_lang": "en",    "default_success_redirect_url": "https://shop.example.com/checkout/success",    "default_failure_redirect_url": "https://shop.example.com/checkout/failure",    "expiry_minutes": 60,    "enabled": true  }'
{  "data": {    "id": 12,    "name": "Default Checkout Config",    "customer_id": 594,    "account_id": null,    "mode": "light",    "default_lang": "en",    "default_success_redirect_url": "https://merchant.example.com/checkout/success",    "default_failure_redirect_url": "https://merchant.example.com/checkout/failure",    "expiry_minutes": 60,    "enabled": true,    "created_at": "2026-03-02T09:15:00Z",    "updated_at": "2026-03-02T09:15:00Z"  }}
GET/accounts/{account_id}/widget_sessions

Returns the payment links of an account, newest first. Filter by status.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

UUID of the account.

Formatuuid

Query Parameters

status?string

Return only links with this status.

Value in

  • "open"
  • "paid"
  • "failed"
  • "expired"
  • "revoked"
page?integer

Page number, starting at 1.

Range1 <= value
Default1
per_page?integer

Number of results per page. Defaults to 20.

Range1 <= value
Default20

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/bf8b9358-7523-4ea9-bc6a-65a25994a9bc/widget_sessions?page=1"
{  "data": [    {      "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",      "widget_variant": "new"    }  ],  "pagination": {    "current_page": 1,    "per_page": 80,    "total_pages": 1,    "total_count": 2  }}
POST/accounts/{account_id}/widget_sessions

Creates a single-use checkout link for an amount, currency and payment method, and returns its url. The checkout settings in effect for the account are applied and frozen with the link, so later configuration changes don't affect it.

A link accepts one payment attempt: success and failure both use it up. Returns 422 if the currency isn't enabled, a required field is missing, no checkout configuration exists, or customer_ip_address is invalid.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account that receives the payment.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/bf8b9358-7523-4ea9-bc6a-65a25994a9bc/widget_sessions" \  -H "Content-Type: application/json" \  -d '{    "amount": "49.90",    "currency": "EUR",    "method": "card",    "trx_uuid": "order-98765",    "description": "Order 98765 – annual subscription",    "full_name": "Jane Doe",    "country_code": "ES",    "redirect_url": "https://shop.example.com/orders/98765/paid",    "redirect_failure_url": "https://shop.example.com/orders/98765/failed"  }'
{  "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",  "widget_variant": "new",  "url": "https://widget2.depasify.com/pl/vvvW3UvbGgernIQB"}
GET/accounts/{account_id}/widget_sessions/{uuid}

Returns a payment link and its current status.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

UUID of the account.

Formatuuid
uuid*string

ID of the payment link.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/bf8b9358-7523-4ea9-bc6a-65a25994a9bc/widget_sessions/01a062c8-3c80-71fe-bdc8-f079ebae3fb2"
{  "data": {    "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",    "widget_variant": "new"  }}
POST/accounts/{account_id}/widget_sessions/{uuid}/revoke

Revokes an open payment link immediately. Customers who open it see that it's no longer available and can't pay. Links in any other status return 422.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

UUID of the account.

Formatuuid
uuid*string

ID of the payment link to revoke.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/bf8b9358-7523-4ea9-bc6a-65a25994a9bc/widget_sessions/01a062c8-3c80-71fe-bdc8-f079ebae3fb2/revoke"
{  "data": {    "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",    "widget_variant": "new"  }}
🍪 We do not track your behaviour or use any cookie on this site.