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. the merchant_id of at least one order item must match the designated_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

ParameterTypeDescription
designated_merchant_idstring (uuid)The Fritidskortet-approved Ping Payments Merchant ID
guardian_personal_numberstring12-digit personal identity number without hyphen. Must match ^(19|20)\d{10}$.

Optional Parameters

ParameterTypeDescription
child_personal_numberstring12-digit personal identity number without hyphen. Must match ^(19|20)\d{10}$.
return_urlstringURL 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

  1. Initiate a payment with provider: "swedish_ehealth_agency" and method: "fritidskortet".
  2. The customer logs in at https://fritidskortet.ehalsomyndigheten.se/ and confirms the payment.
  3. 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 amountGranted amountResulting status
Less than 500 SEK500 SEKOVERFUNDED
Exactly 500 SEK500 SEKCOMPLETED
More than 500 SEK500 SEKUNDERFUNDED