Fritidskortet
This guide covers everything you need to know to integrate Swedish eHealth Agency Fritidskortet payments through the Ping Payments API.
Supported Currency
SEK — Fritidskortet only supports Swedish Krona.
The Designated Merchant
Every Swedish eHealth Agency Fritidskortet payment requires a designated_merchant_id in the provider_method_parameters.
This is the Ping Payments Merchant ID (UUID) of the merchant whose organization the payment is processed through. The merchant must be an organization and be registered with Fritidskortet.
Key points:
-
The designated merchant must be registered with Fritidskortet.
Registration with Fritidskortet is an external process handled outside of Ping Payments. Organizations that want to receive Fritidskortet payments must apply to be included in the official Fritidskortet register. This registration requires the bankgiro number of the tenant's deposit bank account.
Ping Payments does not manage or approve this registration.
For information about eligibility and how organizations can apply, see: https://fritidskortet.se/foreningar
-
The designated merchant must appear in at least one of the payment's
order_items(i.e. themerchant_idof at least one order item must match thedesignated_merchant_id). -
For payments involving multiple merchants, only one merchant can be designated. This merchant determines which Fritidskortet organization the payment session is created under.
Initiating a Payment
Use provider: "swedish_ehealth_agency" and method: "fritidskortet" in the initiate payment request.
Required Parameters
| Parameter | Type | Description |
|---|---|---|
designated_merchant_id | string (uuid) | The Fritidskortet-approved Ping Payments Merchant ID |
guardian_personal_number | string | 12-digit personal identity number without hyphen. Must match ^(19|20)\d{10}$. |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
child_personal_number | string | 12-digit personal identity number without hyphen. Must match ^(19|20)\d{10}$. |
return_url | string | URL to redirect the customer to after they complete the payment on https://fritidskortet.ehalsomyndigheten.se/ |
Example Request
{
"currency": "SEK",
"method": "fritidskortet",
"provider": "swedish_ehealth_agency",
"order_items": [
{
"amount": 10000,
"merchant_id": "{{merchantId}}",
"name": "Membership",
"vat_rate": 25.0
}
],
"total_amount": 10000,
"provider_method_parameters": {
"designated_merchant_id": "{{merchantId}}",
"guardian_personal_number": "197607012395",
"child_personal_number": "201502022385",
"return_url": "https://www.example.com/return"
}
}
}Example Response
{
"id": "4477a18b-03ef-43a1-a4ab-4b8743d7eb58",
"provider_method_response": {}
}Payment Flow
- Initiate a payment with
provider: "swedish_ehealth_agency"andmethod: "fritidskortet". - The customer logs in at https://fritidskortet.ehalsomyndigheten.se/ and confirms the payment.
- The payment result is delivered through the standard Ping Payments callback.
Payment Status Flow
After initiation, the payment status transitions depend on the amount granted by Fritidskortet.
A successful payment can result in three different statuses:
PENDING
│
├── partial amount granted ──► UNDERFUNDED
│
│
├── exact amount granted ────► COMPLETED
│
│
└── excess amount granted ──► OVERFUNDED
Payments with the status UNDERFUNDED or OVERFUNDED require reconciliation before the payment can be COMPLETED.
Sandbox Behavior
In the sandbox environment, Fritidskortet always grants a fixed amount of 500 SEK. Use this to test the different status flows:
| Payment amount | Granted amount | Resulting status |
|---|---|---|
| Less than 500 SEK | 500 SEK | OVERFUNDED |
| Exactly 500 SEK | 500 SEK | COMPLETED |
| More than 500 SEK | 500 SEK | UNDERFUNDED |
Updated 4 days ago