Skip to content

PostFinance Beta

Last updated: 31st August 2022

Start accepting payments using PostFinance, a favorite payment method in Switzerland.

To learn more, reach out to your Customer Success Manager or support@checkout.com.

Model

Gateway

Payment flow

Redirect

Payment method type

Bank transfer

One-step payment

Authorization

Capture

Refund

Partial refund

Chargeback

Recurring payment


Overview

PostFinance payments follow a two-step process:


Request a payment

For the full API specification, see the API reference.

    post

    https://api.checkout.com/payments

    Request example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    {
    "amount": 100,
    "currency": "CHF",
    "source": {
    "type": "postfinance",
    "account_holder_name": "Bruce Wayne",
    "payment_country": "CH",
    "billing_descriptor": "CKO Demo - postfinance"
    }
    }

    Response example

    If you receive a 202 Success response containing a status field set to Pending, your request was successful.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    {
    "id": "pay_yizk6w262b3ejpk2yxnd6g5hom",
    "status": "Pending",
    "_links": {
    "self": {
    "href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom"
    },
    "redirect": {
    "href": "https://r3.girogate.de/ti/simpostfinance?tx=1052658901&rs=YJ7WAoq2nooe2LVCzw0PXDHQozk9rqTw&cs=f10c350844cea17cdda8c88ae10a28bda0be6f315cf70a03de8bd778daec3545"
    }
    }
    }

    Redirect the customer

    Redirect your customer to the redirect link’s href in the response. This will allow the customer to authorize the payment, before they are transferred to your predefined success or failure URL.


    Get details about a payment

    For the full API specification, see the API reference.

      get

      https://api.checkout.com/payments/{id}

      Response example

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      {
      "id": "pay_yizk6w262b3ejpk2yxnd6g5hom",
      "requested_on": "2021-12-09T12:50:51.021737Z",
      "source": {
      "type": "postfinance"
      },
      "amount": 1000,
      "balances": {
      "total_authorized": 1000,
      "total_voided": 0,
      "available_to_void": 0,
      "total_captured": 1000,
      "available_to_capture": 0,
      "total_refunded": 0,
      "available_to_refund": 1000
      },
      "currency": "CHF",
      "payment_type": "Regular",
      "status": "Captured",
      "approved": true,
      "_links": {
      "self": {
      "href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom"
      },
      "actions": {
      "href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom/actions"
      },
      "refund": {
      "href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom/refunds"
      }
      }
      }

      Refund a payment

      PostFinance supports both partial and full refunds. You can refund a payment through the Dashboard or by using the refund API.


      Cancel a payment

      If the customer fails to complete their payment, we will automatically void the payment and send a payment_expired webhook.

      If the customer cancels their payment, we will send a payment_canceled webhook.


      Testing PostFinance

      To start testing, you'll need to contact your Customer Success Manager or Implementation Engineer to activate PostFinance payments in the sandbox environment.

      1. Create a PostFinance transaction as above, following the redirect link in the response to PostFinance's website.
      2. Set the payment response and payment delay as necessary.
      3. Select Submit. You should then be redirected to your predefined success URL.