TWINT for API only
Last updated: December 3, 2025
To accept TWINT payments, you must follow these steps:
- Request a payment.
- Redirect the customer.
- If you are using a manual capture payment, you must also capture the payment.
To send a payment request, call the Request a payment endpoint:
post
https://api.checkout.com/payments
1{2"source": {3"type": "twint"4},5"amount": 6540,6"currency": "CHF",7"reference": "ORD-5023-4E89",8"capture": true,9"success_url" : "abc.com/1234",10"failure_url" : "abc.com/2345",11"processing_channel_id": "pc_q4dbxom5jbgudnjzjpz7j2z6uq"12}
If you receive a 202 Accepted response with a payment id value and the status field set to Pending, your request was successful.
1{2"id": "pay_zsoov3umgscetdq66zkrxfijpu",3"status": "Pending",4"reference": "example_reference",5"payment_type": "Regular",6"_links": {7"self": {8"href": "https://gwc.ckotech.co/payments/pay_zsoov3umgscetdq66zkrxfijpu"9},10"redirect": {11"href": "https://pay-pat.twint.ch/static-page/?orderUUID=712f8d2d-3e54-4ed9-bd0e-52a4b7941e79&type=PAYMENT&jwt=eyJ4NXQiOiJqUXNnUlJFUGtuMlEtdWRHXzk2OVVUOUQyWG8iLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiI3ZmE1Yjg5Yi0yYzc5LTQyYzgtODA4OS1iYTg3YzliYWMxOGMiLCJqdGkiOiJrc3R4UlloMnZ0SEJnQmlNVmhPOWpRIiwiZXhwIjoxNzM3MTMwNzQ4LCJpYXQiOjE3MzcxMjk4NDgsIm5iZiI6MTczNzEyOTc4OCwic3ViIjoiUFNQLWNoZWNrb3V0IiwiT3JkZXJVVUlEIjoiNzEyZjhkMmQtM2U1NC00ZWQ5LWJkMGUtNTJhNGI3OTQxZTc5In0.k2YJFMgC2Jpq4F0foKKwhFJIi0RWhRPjI35gIiQfCA-IP_jyqtUR0M4NEWhAl6pUy7nP17iksPrhl4OucLmHTU5mZpQb4UrMBgrObP5TpT-zfiExtnnY-yMDCUstjUL93YmDgPaPt7qInfFHE-EKvO8MApJJSLykMdtnS5hAJ1UEY8D7ensDYVrP8DaNuYL-B8OX1iujVCVKVZHaH8nUvs-sqp3C31Ve-Rbr9Q4n2yWCPil7-0S5RUuNlhqtrNH0WHEl4A6yxJ5A5U8qLQ_7jv3URcXo_C3UvrJq5__d8XPhU_l4o1AGTGCmHL7FmRGDtRPXeNe18UguAtQUc0tJmw&redirectURL=https://gwc.ckotech.co/apms/twint/redirect/tok_YTZmNjg3MWMtZTgzZC00NTFiLWFkMDEtYjRhYTliYjViYzU5"12}13}14}
The redirection step varies depending on whether you request the payment from:
- A desktop browser
- A mobile browser
- Ensure that the TWINT App is installed on your customer's phone.
- Redirect your customer to the
_links.redirect.hrefURL provided in the response.
The URL displays a QR code. - Your customer must scan the code using their TWINT app and confirm the payment on their device.
- After confirming the payment, they are redirected to either your success or failure URL.
Information
The code becomes invalid after five minutes. The payment expires if the customer does not confirm the payment within this time frame.
To request a payment from a mobile browser:
- Ensure that the TWINT app is installed on your customer's phone.
- Redirect your customer to the
_links.redirect.hrefURL provided in the response.
The URL displays the various TWINT apps that your customer can choose from. - The chosen TWINT app opens on your customer's device for them to authorize the payment.
- After authorizing the payment, they are redirected to either your success or failure URL.
The manual capture flow enables you to manually trigger the capture of the authorized funds at a later time. For example, if you need to verify that the item is in stock.
TWINT only supports full captures. You must send a capture request for the full authorized amount including "capture_type": "Final".
The standard authorization validity period for TWINT is seven days. However, you can extend this period up to 30 days during your onboarding, or after going live by contacting your account manager or request support.
To retrieve details about the payment, call the Get payment details endpoint, setting the payment_id value from the payment response as the {id} path parameter:
get
https://api.checkout.com/payments/{id}
See Get payment details for more information.
TWINT supports both partial and full refunds.
You can refund the payment in the Dashboard or by calling the Refund a payment endpoint, setting the payment_id value from the payment response as the {id} path parameter:
post
https://api.checkout.com/payments/{id}/refunds
TWINT recommends that you also provide the original payment's reference ID:
1{2"amount": 20,3"reference": "ORD-5023-4E89"4}
1{2"action_id": "act_c4x2vjvnx4uelb4io72fa4e57a",3"_links": {4"payment": {5"href": "https://api.checkout.com/payments/pay_fzzdurog3squjj2ityho7x3o64"6}7}8}
If the customer does not complete the payment, it expires and you receive a payment_expired webhook within five minutes.
If the customer cancels their payment, you also receive a payment_expired webhook.
See Void a payment for more information.