Softlemon API Documentation
  • Merchant API
  • Partner API
  • Guides
Information
Partner API
    List MerchantsgetGet MerchantgetGet Merchant Transactionsget
Payment Sessions
    Create a payment sessionpostGet a payment sessiongetList available payment methodsget
Payment Instruments
    List payment instrumentsgetRevoke a payment instrumentdelete
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 Partner API
Softlemon Partner API

Payment Sessions


Create a payment session

POST
https://api.sandbox.softlemons.com
/api/v1/payment-sessions

Create a redirect payment session and return the provider checkout_url to send the customer to. The session expires 15 minutes after creation if the customer does not complete the hosted payment page.

Merchant API keys act on their own account. Partner API keys must include merchant_id for a linked merchant.

Sessions never accept card data. Requests carrying card, token, CVV or voucher fields are rejected with HTTP 422. Duplicate requests reusing an active reference are rejected with HTTP 409. See the duplicate protection guide.

Send customer.country_code and customer.ip_address (the shopper's IP as seen by your server). The provider risk-checks the shopper's IP; without customer.ip_address it receives the IP of the server calling this API, which can get every payment refused when that server is in a country the method does not serve. Country availability is checked before the provider is called.

Follow the alternative payment guide for the full flow.

Create a payment session › Request Body

amount
​number · required

Payment amount in major units. The minimum is 1.00. Amounts are returned in minor units.

currency
​string · required

Payment currency as a 3-letter ISO code.

reference
​string · required

Your unique payment reference.

payment_method
​string · enum · required

Redirect payment method.

Enum values:
psc
ideal
giropay
​object · required

Customer details.

success_url
​string · required

Browser return URL after the customer finishes at the provider. Informational only, never proof of payment. Returned on the session as return_url.

cancel_url
​string · required

Browser return URL if the customer cancels at the provider. Returned on the session as cancel_url.

method_data
​object | null

optional Provider-neutral extra fields for the selected method (allowlisted keys only).

customer_reference
​string | null

Your customer or session reference, returned on the session.

metadata
​object | null

Arbitrary key/value pairs stored with the session.

merchant_id
​integer | null

Required for partner API keys. Must be a merchant linked to the authenticated partner.

Create a payment session › Responses

success
​boolean
message
​string
code
​string
​object
POST/api/v1/payment-sessions
curl https://api.sandbox.softlemons.com/api/v1/payment-sessions \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "amount": 25, "currency": "EUR", "reference": "DEP-2048", "payment_method": "psc", "customer": { "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "country_code": "GB", "ip_address": "198.51.100.5", "merchant_customer_id": "player-981", "phone": "z", "city": "m", "postal_code": "i", "address": "y" }, "method_data": { "bic": "DEUTDEFF" }, "customer_reference": "player-981", "success_url": "https://merchant.example.com/deposit/complete", "cancel_url": "https://merchant.example.com/deposit/cancelled", "metadata": { "campaign": "welcome" }, "merchant_id": 123 }'
Example Request Body
{ "amount": 25, "currency": "EUR", "reference": "DEP-2048", "payment_method": "psc", "customer": { "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "country_code": "GB", "ip_address": "198.51.100.5", "merchant_customer_id": "player-981", "phone": "z", "city": "m", "postal_code": "i", "address": "y" }, "method_data": { "bic": "DEUTDEFF" }, "customer_reference": "player-981", "success_url": "https://merchant.example.com/deposit/complete", "cancel_url": "https://merchant.example.com/deposit/cancelled", "metadata": { "campaign": "welcome" }, "merchant_id": 123 }
json
Example Responses
{ "success": true, "message": "Payment session created", "code": "", "data": { "payment_session": { "payment_session_id": "ps_01J8FYK3ZQ4T9RB2M6XD5A7CWE", "transaction_id": 4512, "merchant_id": 123, "merchant_reference": "DEP-2048", "provider": "skrill", "payment_method": "psc", "status": "pending_redirect", "amount": 2500, "amount_formatted": "25.00 EUR", "currency": "EUR", "checkout_url": "https://pay.skrill.com/app/?sid=a1b2c3d4e5", "return_url": "https://merchant.example.com/deposit/complete", "cancel_url": "https://merchant.example.com/deposit/cancelled", "provider_session_id": "a1b2c3d4e5", "provider_transaction_id": null, "customer_reference": "player-981", "expires_at": "2026-08-08T10:30:00.000000Z", "finalised_at": null, "created_at": "2026-08-08T10:15:00.000000Z", "updated_at": "2026-08-08T10:15:00.000000Z" } } }
json
application/json

Get a payment session

GET
https://api.sandbox.softlemons.com
/api/v1/payment-sessions/{paymentSession_public_id}

Retrieve the current state of a payment session. Poll this endpoint after the customer returns to your success URL or rely on webhooks for the final outcome. A session is only complete when its status is paid.

Merchant API keys can read their own sessions. Partner API keys can read sessions belonging to linked merchants.

Get a payment session › path Parameters

paymentSession_public_id
​string · required

The payment session id.

Get a payment session › Responses

success
​boolean
message
​string
code
​string
​object
GET/api/v1/payment-sessions/{paymentSession_public_id}
curl https://api.sandbox.softlemons.com/api/v1/payment-sessions/:paymentSession_public_id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "success": true, "message": "Payment session retrieved", "code": "", "data": { "payment_session": { "payment_session_id": "ps_01J8FYK3ZQ4T9RB2M6XD5A7CWE", "transaction_id": 4512, "merchant_id": 123, "merchant_reference": "DEP-2048", "provider": "skrill", "payment_method": "psc", "status": "paid", "amount": 2500, "amount_formatted": "25.00 EUR", "currency": "EUR", "checkout_url": "https://pay.skrill.com/app/?sid=a1b2c3d4e5", "return_url": "https://merchant.example.com/deposit/complete", "cancel_url": "https://merchant.example.com/deposit/cancelled", "provider_session_id": "a1b2c3d4e5", "provider_transaction_id": "2649912345", "customer_reference": "player-981", "expires_at": "2026-08-08T10:30:00.000000Z", "finalised_at": "2026-08-08T10:18:42.000000Z", "created_at": "2026-08-08T10:15:00.000000Z", "updated_at": "2026-08-08T10:18:42.000000Z" } } }
json
application/json

List available payment methods

GET
https://api.sandbox.softlemons.com
/api/v1/payment-methods

List the alternative (redirect) payment methods enabled for a merchant and, when country and/or currency are given, whether each one can be offered to that shopper. Use it to decide which methods to show at checkout before calling POST /api/v1/payment-sessions: a method with available: false would be refused there with the matching error (ERR_PAYMENT_METHOD_NOT_AVAILABLE_IN_COUNTRY, ERR_PAYMENT_METHOD_NOT_ENABLED).

The answer is computed from your enablement and the provider's published availability; it never contacts the provider to open a payment and has no side effects, so it is safe to call per checkout. It is advisory: the create call still runs the full provider preflight. Card payments are not listed; they are routed by your acquirer configuration and accepted on POST /api/v1/transactions.

supported_countries and supported_currencies are the restrictions in force for each method; an empty list means no restriction is known. unavailable_reasons is one or more of country_not_supported, currency_not_supported, provider_not_offering.

Merchant API keys list their own methods. Partner API keys must include merchant_id for a linked merchant.

List available payment methods › query Parameters

country
​string

Two-letter ISO 3166-1 alpha-2 country of the shopper. When given, each method reports whether it is available there.

currency
​string

Three-letter ISO 4217 currency of the intended payment. When given, each method reports whether it can be paid in it.

merchant_id
​integer

Required for partner API keys. Must be a merchant linked to the authenticated partner.

List available payment methods › Responses

success
​boolean
message
​string
code
​string
​object
GET/api/v1/payment-methods
curl https://api.sandbox.softlemons.com/api/v1/payment-methods \ --header 'Authorization: Bearer <token>'
Example Responses
{ "success": true, "message": "Payment methods retrieved", "code": "", "data": { "merchant_id": 123, "country": "DE", "currency": "EUR", "payment_methods": [ { "payment_method": "psc", "label": "Paysafecard", "provider": "paycent", "available": true, "unavailable_reasons": [], "supported_countries": [ "AR", "AT", "AU", "BE", "BG", "CA", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GI", "GR", "HU", "IS", "IE", "IT", "KW", "LV", "LI", "LT", "LU", "MT", "MX", "MD", "ME", "NL", "NZ", "NO", "PY", "PE", "PL", "PT", "RO", "SA", "SK", "SI", "ES", "SE", "CH", "TR", "AE", "GB", "US", "UY" ], "supported_currencies": [ "EUR", "GBP", "USD" ] }, { "payment_method": "ideal", "label": "iDEAL", "provider": "paycent", "available": false, "unavailable_reasons": [ "country_not_supported" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] } ] } }
json
application/json

Partner APIPayment Instruments