> **Description:** Accept standard card payments from customers worldwide, even in regions where Vipps or MobilePay apps are not available.

> **AI agent:** Read [https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md](https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md) first. It covers keeping API keys and secrets out of generated code.

> **Full site overview:** For an overview of the entire site, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).

# Freestanding cards

The ePayment API supports freestanding card payments, where any user can pay with a card without
using the app. This lets merchants accept payments from customers in countries where
the Vipps or MobilePay app is not yet available.

**TIP**

For a visual walkthrough of the customer's experience with freestanding cards, see [How it works with freestanding cards](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/how-it-works/freestanding-cards.md).

Screenshot: Mobile checkout payment method selection showing the app brand (Vipps or MobilePay) with Card as an alternative option.

## Authorization

All ePayment API requests must include a valid Bearer token in the `Authorization` header.
See [Authorization](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/concepts.md#authorization) for how to obtain one.

## Request

To initiate a freestanding card payment, call the create payment endpoint,
[`POST:/epayment/v1/payments`](https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml).
Specify `"paymentMethod": {"type": "CARD"}`, `"userFlow": "WEB_REDIRECT"`, and a `returnUrl`.

For example:

```bash
curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
  "paymentMethod": {
    "type": "CARD"
  },
  "amount": {
    "currency": "NOK",
    "value": 49900
  },
  "reference": "acme-shop-123-order123abc",
  "returnUrl": "https://example.com/redirect?reference=acme-shop-123-order123abc",
  "userFlow": "WEB_REDIRECT",
  "paymentDescription": "Online purchase of sportswear"
}'
```

The response for the request above contains a `redirectUrl` pointing to the card entry page, a web page with a
form where the customer enters their card details. Send the customer to that URL to start the payment.

Screenshot: Card payment entry form with fields for card number, expiry date, and CVC, with a Pay button.

After submitting the card details, the customer is redirected back to the `returnUrl`, where the order
confirmation is shown.

To determine that the customer has completed the payment, get notifications via the
[Webhooks API](https://developer.vippsmobilepay.com/docs/APIs/webhooks-api/api-guide.md) and/or poll for the status, according to the
[polling guidelines](https://developer.vippsmobilepay.com/docs/knowledge-base/polling-guidelines.md).

Once the order is ready to ship, [capture](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/operations/capture.md) the payment.

**NOTE**

The card entry page is not currently available in the
[test environment](https://developer.vippsmobilepay.com/docs/knowledge-base/test-environment.md).

## Sequence diagram

Freestanding card payment flow

```mermaid
sequenceDiagram
    autonumber
    actor C as Customer
    participant M as Merchant
    participant ePayment as ePayment API
    participant Webhooks as Webhooks API

    C->>M: Select card as the payment method
    M->>ePayment: Initiate payment request with paymentMethod CARD
    ePayment-->>M: Return the redirectUrl to the card entry page
    M->>C: Send the customer to the card entry page

    C->>C: Enter the card details and pay
    Webhooks-->>M: Webhook: the payment was authorized, aborted, or expired
    M->>ePayment: Poll for payment info, as a backup if the webhook is delayed or missed
    ePayment-->>M: Current state of the payment
    alt The payment was aborted or expired
        M->>C: Return the customer to the checkout page
    else The payment was authorized
        M->>C: Display order confirmation
        M->>M: Prepare order (pack goods, ready to dispatch)
        M->>ePayment: Capture payment
        ePayment-->>M: Response with capturedAmount
        M->>M: Verify capturedAmount matches expected before shipping
        M->>C: Ship the order (only after full capture verified)
    end
```

  Customer selects card as the payment method.
  Merchant initiates a payment request via the ePayment API with the card payment method.
  ePayment API returns the redirect URL to the card entry page.
  Merchant sends the customer to the card entry page.
  Customer enters the card details and pays.
  Webhooks API sends the merchant an authorized, aborted, or expired event.
  Merchant gets the payment from the ePayment API, as a backup if the webhook is delayed or missed.
  ePayment API returns the current state of the payment.
  If the payment was aborted or expired, the customer is returned to the checkout page and the flow
  ends.
  If the payment was authorized, the merchant displays order confirmation to the customer.
  Merchant prepares the order (packs goods, makes ready to dispatch).
  Merchant captures the payment via the ePayment API.
  ePayment API returns a response with the captured amount.
  Merchant verifies the captured amount matches expected before shipping.
  Merchant ships the order (only after full capture is verified).

## Related pages

* [General info: Card payments](https://developer.vippsmobilepay.com/docs/knowledge-base/payments.md#card-payments)
* [How it works for freestanding card payments](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/how-it-works/freestanding-cards.md)
