PostFinance
Last updated: October 4, 2023
Start accepting payments using PostFinance, a favorite payment method in Switzerland.
Information
To learn more, reach out to your Account Manager or [email protected].
Model | Gateway |
---|---|
Payment flow | Redirect |
Payment method type | Bank transfer |
One-step payment | |
Authorization | |
Capture | |
Refund | |
Partial refund | |
Chargeback | |
Recurring payment |
PostFinance payments follow a two-step process:
For the full API specification, see the API reference.
post
https://api.checkout.com/payments
1{2"amount": 100,3"currency": "CHF",4"source": {5"type": "postfinance",6"account_holder_name": "John Smith",7"payment_country": "CH",8"billing_descriptor": "test payment"9}10}
If you receive a 202 Success
response containing a status
field set to Pending
, your request was successful.
1{2"id": "pay_yizk6w262b3ejpk2yxnd6g5hom",3"status": "Pending",4"_links": {5"self": {6"href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom"7},8"redirect": {9"href": "https://r3.girogate.de/ti/simpostfinance?tx=1052658901&rs=YJ7WAoq2nooe2LVCzw0PXDHQozk9rqTw&cs=f10c350844cea17cdda8c88ae10a28bda0be6f315cf70a03de8bd778daec3545"10}11}12}
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.
For the full API specification, see the API reference.
get
https://api.checkout.com/payments/{id}
1{2"id": "pay_yizk6w262b3ejpk2yxnd6g5hom",3"requested_on": "2021-12-09T12:50:51.021737Z",4"source": {5"type": "postfinance"6},7"amount": 1000,8"balances": {9"total_authorized": 1000,10"total_voided": 0,11"available_to_void": 0,12"total_captured": 1000,13"available_to_capture": 0,14"total_refunded": 0,15"available_to_refund": 100016},17"currency": "CHF",18"payment_type": "Regular",19"status": "Captured",20"approved": true,21"_links": {22"self": {23"href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom"24},25"actions": {26"href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom/actions"27},28"refund": {29"href": "https://gwc-sbox.ckotech.co/payments/pay_yizk6w262b3ejpk2yxnd6g5hom/refunds"30}31}32}
PostFinance supports both partial and full refunds. You can refund a payment through the Dashboard or by using the refund API.
If the customer fails to complete their payment within 30 minutes of payment creation, we'll automatically void the payment and send a payment_expired
webhook.
If the customer explicitly cancels their payment, we'll send a payment_canceled
webhook instead.
To start testing, you'll need to contact your Account Manager or Implementation Engineer to activate PostFinance payments in the sandbox environment.
- Create a PostFinance transaction as above, following the redirect link in the response to PostFinance's website.
- Set the payment response and payment delay as necessary.
- Select Submit. You should then be redirected to your predefined success URL.