Skip to main content

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

FieldRequiredDescription
entity_idYesYour merchant entity UUID
amountYesAmount in currency minor units (e.g. 4999 = 49.99 EUR)
currencyYesISO 4217 code (e.g. EUR)
orderYesOrder details — reference, amounts, billing address
customerNoCustomer profile — improves PSP-level eligibility filtering
allow_future_usageNotrue 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 method
  • method — 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