Retrieve payment methods
Before rendering the checkout UI, call the eligibility endpoint to get the list of payment methods available for the order. This prevents displaying options the PSP cannot fulfill and lets you tailor the UI to each customer.
Endpoint
curl -X POST 'https://api.purse-sandbox.com/payment/v2/eligible-solutions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--data-raw '{
"entity_id": "${ENTITY_ID}",
"amount": 4999,
"currency": "EUR",
"order": {
"reference": "order-456",
"net_amount": 4999,
"tax_amount": 833,
"billing_address": {
"first_name": "Emily",
"last_name": "Parker",
"address_lines": ["67 Rue de Luxembourg"],
"city": "Lille",
"postal_code": "59777",
"country_code": "FR"
}
},
"customer": {
"reference": "customer-123",
"type": "PERSON",
"email": "[email protected]",
"ip_address": "203.0.113.195",
"locale": "fr-FR"
}
}'
API Endpoint
- Endpoint:
/payment/v2/eligible-solutions - Method:
POST - API Reference
Request fields
| Field | Required | Description |
|---|---|---|
entity_id | Yes | Your merchant entity UUID |
amount | Yes | Amount in currency minor units (e.g. 4999 = 49.99 EUR) |
currency | Yes | ISO 4217 code (e.g. EUR) |
order | Yes | Order details — reference, amounts, billing address |
customer | No | Customer profile — improves PSP-level eligibility filtering |
allow_future_usage | No | true if this is the first payment of a recurring series |
customer field
Passing customer is optional but recommended. Some PSPs restrict certain payment methods based on customer locale, country, or account history. Without it, the response may include methods that the PSP will later reject.
Response
{
"amount": 4999,
"currency": "EUR",
"eligible_solutions": [
{ "partner": "dalenys", "method": "creditcard" },
{ "partner": "oney", "method": "cb3x" },
{ "partner": "paypal", "method": "wallet" }
]
}
Each item in eligible_solutions has:
partner— the PSP that will process this methodmethod— the payment method type (e.g.creditcard,cb3x,wallet,giftcard)
Using the response
Iterate over eligible_solutions to decide which payment method buttons to render:
const { eligible_solutions } = await fetchEligibleSolutions(order, customer);
const hasCreditCard = eligible_solutions.some(s => s.method === 'creditcard');
const hasInstalment = eligible_solutions.some(s => s.method === 'cb3x');
if (hasCreditCard) renderCardForm();
if (hasInstalment) renderInstalmentOption();
Don't cache results
Eligibility depends on the order amount, currency, and customer profile. Always call this endpoint at checkout time — do not reuse results across sessions or orders.
Next steps
- Complete payment flow — end-to-end flow from eligibility to payment
- Token payment — pay with a saved card