Softlemon API Documentation
  • Merchant API
  • Partner API
  • Guides
Information
Transactions
    Initiate TransactionpostCapture TransactionpostRefund TransactionpostTransaction StatusgetVoid Transactionpost
Payment Instruments
    List payment instrumentsgetRevoke a payment instrumentdelete
Payment Sessions
    Create a payment sessionpostGet a payment sessiongetList available payment methodsget
Card Verification
    Initiate Card Verificationpost
Webhook Management
    Get webhook configurationgetCreate or update the webhook endpointputDelete the webhook endpointdeleteRotate the webhook signing secretpostSend a test pingpostList webhook eventsgetGet a webhook eventgetReplay a webhook eventpost
API Operations
    Get API Key Informationget
Schemas
Softlemon Merchant API
Softlemon Merchant API

Transactions


Initiate Transaction

POST
https://api.sandbox.softlemons.com
/api/v1/transactions

Initiate a new transaction (sale or auth).

Merchant API keys can call this endpoint for their own account. Partner API keys can also call this endpoint, but they must include merchant_id for a merchant linked to that partner. Partner API keys can also capture, refund and void transactions for linked merchants under the same merchant_id rules.

Duplicate requests reusing an active reference are rejected with HTTP 409. See the duplicate protection guide.

Initiate Transaction › Request Body

amount
​number · required

Transaction amount in major units, for example 12.50 for EUR 12.50. Minimum 1.00. Responses and webhooks report amounts in minor units.

currency
​string · required

Transaction currency (3-letter ISO code).

transaction_type
​string · enum · required

Transaction type.

Enum values:
sale
auth
wallet
​object | null

Digital wallet payment. Mutually exclusive with card and vault_token.

vault_token
​string | null

Vault token of a stored card, returned in the payment_instrument object of a previous transaction response. Tokens are scoped to the merchant that stored the card. When provided, card number and expiry are not required. Only CVV is still needed.

​object

Card details object. Required unless vault_token or wallet is provided.

reference
​string | null

Merchant reference for this transaction.

merchant_id
​integer | null

Required for partner API keys. Omit for merchant API keys.

success_url
​string | null

URL to redirect to on successful payment (reserved for future use).

error_url
​string | null

URL to redirect to on failed payment (reserved for future use).

customer
​object | null

Customer details object.

card_verification_data
​object | null

Links a completed 3DS verification to this transaction. Pass the public_id returned from POST /api/v1/3ds/verify. The API retrieves stored CAVV, ECI and DS Transaction ID automatically. The verification must have ended in full_auth, attempt or unavailable; a failed or unfinished verification is refused with HTTP 422.

browser_data
​object | null

Browser fingerprint for provider-led 3DS (same shape as POST /api/v1/3ds/verify). Recommended for Paycent to reduce unnecessary 3DS challenges.

Initiate Transaction › Responses

success
​boolean
message
​string
code
​string
​object
POST/api/v1/transactions
curl https://api.sandbox.softlemons.com/api/v1/transactions \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "amount": 12.5, "currency": "EUR", "transaction_type": "sale", "wallet": { "type": "apple_pay", "token": "{\"version\":\"EC_v1\",\"data\":\"...\"}" }, "vault_token": "vtok_a1b2c3d4e5f6", "card": { "number": "4111111111111111", "exp_month": "12", "exp_year": "2030", "cvv": "123", "name": "John Doe" }, "reference": "order-10001", "merchant_id": 123, "success_url": "https://yoursite.com/checkout/success", "error_url": "https://yoursite.com/checkout/error", "customer": { "merchant_customer_id": "cust-001", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+441234567890", "address": "1 High Street", "city": "London", "postal_code": "SW1A 1AA", "country_code": "GB", "ip_address": "198.51.100.5" }, "card_verification_data": { "id": "tds_01k0w3v9fcx2e8qz5m7h4n6j2p", "status": "architecto", "cavv": "architecto", "xid": "architecto", "ds_trans_id": "architecto", "three_ds_version": "architecto", "eci": "architecto" }, "browser_data": { "accept_header": "text/html", "color_depth": 24, "java_enabled": false, "java_script_enabled": true, "language": "en-US", "screen_height": 1080, "screen_width": 1920, "time_zone_offset_in_minutes": -60, "user_agent": "Mozilla/5.0" } }'
Example Request Body
{ "amount": 12.5, "currency": "EUR", "transaction_type": "sale", "wallet": { "type": "apple_pay", "token": "{\"version\":\"EC_v1\",\"data\":\"...\"}" }, "vault_token": "vtok_a1b2c3d4e5f6", "card": { "number": "4111111111111111", "exp_month": "12", "exp_year": "2030", "cvv": "123", "name": "John Doe" }, "reference": "order-10001", "merchant_id": 123, "success_url": "https://yoursite.com/checkout/success", "error_url": "https://yoursite.com/checkout/error", "customer": { "merchant_customer_id": "cust-001", "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+441234567890", "address": "1 High Street", "city": "London", "postal_code": "SW1A 1AA", "country_code": "GB", "ip_address": "198.51.100.5" }, "card_verification_data": { "id": "tds_01k0w3v9fcx2e8qz5m7h4n6j2p", "status": "architecto", "cavv": "architecto", "xid": "architecto", "ds_trans_id": "architecto", "three_ds_version": "architecto", "eci": "architecto" }, "browser_data": { "accept_header": "text/html", "color_depth": 24, "java_enabled": false, "java_script_enabled": true, "language": "en-US", "screen_height": 1080, "screen_width": 1920, "time_zone_offset_in_minutes": -60, "user_agent": "Mozilla/5.0" } }
json
Example Responses
{ "success": true, "message": "Transaction initiated", "code": "", "data": { "transaction": { "id": 2, "merchant_id": 1, "merchant_trans_id": "ORDER-912346", "amount": 1250, "amount_formatted": "12.50 EUR", "currency": "EUR", "status": "auth", "status_reason": null, "transaction_type": "auth", "payment_method": "card", "description": null, "acquirer_provider": null, "acquirer_trans_id": "514009741995", "acquirer_auth_code": "400066", "related_trans_id": null, "captured_amount": 0, "customer": null, "cardholder": { "card_last_four": "1111", "card_brand": "visa", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:47.000000Z" }, "payment_instrument": { "payment_instrument_id": "pi_01k24d5re8xh1v0c9jc0m8w3ns", "vault_token": "8ac7a4a29852f6f101985300a1b41c2f", "type": "card", "status": "active", "card_brand": "visa", "card_last_four": "1111", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:48.000000Z", "updated_at": "2025-05-20T09:18:48.000000Z" }, "ip_address": "203.0.113.10", "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:48.000000Z" } } }
json
application/json

Capture Transaction

POST
https://api.sandbox.softlemons.com
/api/v1/transactions/{transaction_id}/capture

Capture a previously authorized transaction.

Send an Idempotency-Key header to retry safely. A repeat with the same key returns the original response without capturing again. The API conventions page has the full contract.

This endpoint is intended for merchant API keys managing their own transactions. Do not expose this as a partner-facing operation in external integrations.

Capture Transaction › path Parameters

transaction_id
​integer · required

The ID of the transaction.

Capture Transaction › Headers

Idempotency-Key
​string

Optional key that makes retrying this request safe. A repeat with the same key within 24 hours replays the original response instead of executing again. See API conventions.

Capture Transaction › Request Body optional

amount
​number | null

Amount to capture in major units. Omit to capture the full authorized amount.

Capture Transaction › Responses

success
​boolean
message
​string
code
​string
​object
POST/api/v1/transactions/{transaction_id}/capture
curl https://api.sandbox.softlemons.com/api/v1/transactions/:transaction_id/capture \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "amount": 12.5 }'
Example Request Body
{ "amount": 12.5 }
json
Example Responses
{ "success": true, "message": "Transaction captured", "code": "", "data": { "id": 3, "merchant_id": 1, "merchant_trans_id": "ORDER-912346", "amount": 1250, "amount_formatted": "12.50 EUR", "currency": "EUR", "status": "captured", "status_reason": null, "transaction_type": "capture", "payment_method": "card", "description": null, "acquirer_provider": null, "acquirer_trans_id": "995140741995", "acquirer_auth_code": "400066", "related_trans_id": 2, "refunded_amount": 0, "cardholder": { "card_last_four": "1111", "card_brand": "visa", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:47.000000Z" }, "ip_address": "203.0.113.10", "created_at": "2025-05-20T10:04:12.000000Z", "updated_at": "2025-05-20T10:04:13.000000Z" } }
json
application/json

Refund Transaction

POST
https://api.sandbox.softlemons.com
/api/v1/transactions/{transaction_id}/refund

Refund a previously captured transaction.

Send an Idempotency-Key header to retry safely. A repeat with the same key returns the original response without refunding again. The API conventions page has the full contract.

This endpoint is intended for merchant API keys managing their own transactions. Do not expose this as a partner-facing operation in external integrations.

Refund Transaction › path Parameters

transaction_id
​integer · required

The ID of the transaction.

Refund Transaction › Headers

Idempotency-Key
​string

Optional key that makes retrying this request safe. A repeat with the same key within 24 hours replays the original response instead of executing again. See API conventions.

Refund Transaction › Request Body optional

amount
​number | null

Amount to refund in major units. Omit to refund the full amount.

reason
​string | null

Reason for refund.

Refund Transaction › Responses

success
​boolean
message
​string
code
​string
​object
POST/api/v1/transactions/{transaction_id}/refund
curl https://api.sandbox.softlemons.com/api/v1/transactions/:transaction_id/refund \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "amount": 12.5, "reason": "architecto" }'
Example Request Body
{ "amount": 12.5, "reason": "architecto" }
json
Example Responses
{ "success": true, "message": "Transaction refunded", "code": "", "data": { "id": 4, "merchant_id": 1, "merchant_trans_id": "ORDER-912346", "amount": 1250, "amount_formatted": "12.50 EUR", "currency": "EUR", "status": "refunded", "status_reason": null, "transaction_type": "refund", "payment_method": "card", "description": null, "acquirer_provider": null, "acquirer_trans_id": "514009741995", "acquirer_auth_code": "400066", "related_trans_id": 3, "cardholder": { "card_last_four": "1111", "card_brand": "visa", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:47.000000Z" }, "ip_address": "203.0.113.10", "created_at": "2025-05-21T14:30:02.000000Z", "updated_at": "2025-05-21T14:30:03.000000Z" } }
json
application/json

Transaction Status

GET
https://api.sandbox.softlemons.com
/api/v1/transactions/{transaction_id}/status

Get the status of a transaction.

Merchant API keys can check their own transactions. Partner API keys can check, capture, refund and void transactions belonging to linked merchants they are allowed to access. Ownership is enforced by the request layer.

Transaction Status › path Parameters

transaction_id
​integer · required

The ID of the transaction.

Transaction Status › Responses

success
​boolean
message
​string
code
​string
​object
GET/api/v1/transactions/{transaction_id}/status
curl https://api.sandbox.softlemons.com/api/v1/transactions/:transaction_id/status \ --header 'Authorization: Bearer <token>'
Example Responses
{ "success": true, "message": "Transaction status", "code": "", "data": { "id": 2, "merchant_id": 1, "merchant_trans_id": "ORDER-912346", "amount": 1250, "amount_formatted": "12.50 EUR", "currency": "EUR", "status": "auth", "status_reason": null, "transaction_type": "auth", "payment_method": "card", "description": null, "acquirer_provider": null, "acquirer_trans_id": "514009741995", "acquirer_auth_code": "400066", "related_trans_id": null, "captured_amount": 0, "cardholder": { "card_last_four": "1111", "card_brand": "visa", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:47.000000Z" }, "ip_address": "203.0.113.10", "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:48.000000Z" } }
json
application/json

Void Transaction

POST
https://api.sandbox.softlemons.com
/api/v1/transactions/{transaction_id}/void

Void a previously initiated auth transaction.

Send an Idempotency-Key header to retry safely. A repeat with the same key returns the original response without voiding again. The API conventions page has the full contract.

This endpoint is intended for merchant API keys managing their own transactions. Do not expose this as a partner-facing operation in external integrations.

Void Transaction › path Parameters

transaction_id
​integer · required

The ID of the transaction.

Void Transaction › Headers

Idempotency-Key
​string

Optional key that makes retrying this request safe. A repeat with the same key within 24 hours replays the original response instead of executing again. See API conventions.

Void Transaction › Request Body optional

amount
​number | null

Amount to void in major units. Omit to void the full amount.

reason
​string | null

Reason for void.

Void Transaction › Responses

success
​boolean
message
​string
code
​string
​object
POST/api/v1/transactions/{transaction_id}/void
curl https://api.sandbox.softlemons.com/api/v1/transactions/:transaction_id/void \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "amount": 12.5, "reason": "architecto" }'
Example Request Body
{ "amount": 12.5, "reason": "architecto" }
json
Example Responses
{ "success": true, "message": "Transaction voided", "code": "", "data": { "id": 3, "merchant_id": 1, "merchant_trans_id": "ORDER-912346", "amount": 1250, "amount_formatted": "12.50 EUR", "currency": "EUR", "status": "voided", "status_reason": null, "transaction_type": "void", "payment_method": "card", "description": null, "acquirer_provider": null, "acquirer_trans_id": "514009741995", "acquirer_auth_code": "400066", "related_trans_id": 2, "cardholder": { "card_last_four": "1111", "card_brand": "visa", "card_expiry_month": 12, "card_expiry_year": 2030, "created_at": "2025-05-20T09:18:47.000000Z", "updated_at": "2025-05-20T09:18:47.000000Z" }, "ip_address": "203.0.113.10", "created_at": "2025-05-20T11:15:40.000000Z", "updated_at": "2025-05-20T11:15:41.000000Z" } }
json
application/json

Payment Instruments