Pay with token
curl -X POST "https://test-fep.kashier.io/v3/orders" \ -H "Kashier-Hash: string" \ -H "Content-Type: application/json" \ -d '{ "apiOperation": "PAY", "paymentMethod": { "type": "CARD", "card": { "cardToken": "123456789123456789", "securityCode": "", "enable3DS": true } }, "installments": { "plandId": "" }, "origin": { "id": "" }, "connectedAccount": { "merchantId": "" }, "order": { "reference": "", "amount": "1", "currency": "EGP", "description": "" }, "customer": { "reference": "" }, "interactionSource": "ECOMMERCE", "reconciliation": { "webhookUrl": "", "merchantRedirect": "", "redirect": true }, "metaData": {}, "merchantId": "", "timestamp": "" }'{ "response": { "apiOperation": "PAY", "operation": "pay", "currency": "EGP", "result": "SUCCESS", "status": "CAPTURED", "authenticationStatus": "AUTHENTICATION_NOT_IN_EFFECT", "amount": 100, "creationTime": "2023-10-16 12:00:49.746000+00:00", "lastUpdatedTime": "2023-10-16 12:00:50.137000+00:00", "merchantCurrency": "EGP", "reference": "1697457648576", "totalAuthorizedAmount": 100, "totalCapturedAmount": 100, "totalDisbursedAmount": 0, "totalRefundedAmount": 0, "authentication": {}, "paymentMethod": { "type": "CARD", "card": { "cardBrand": "Mastercard", "storedOnFile": "TO_BE_STORED", "number": "512345******2346", "nameOnCard": "Mohamed Khaled", "expiry": { "month": "12", "year": "25" }, "cardToken": "9d8332cb-6195-40ea-aed0-86c3aa60fbaa" } }, "metaData": { "customerName": "Noura Mosaad", "merchantWebhook": "http://40fb-156-210-144-77.ngrok.io/paymentWebhook", "redirect": true }, "customer": { "reference": "01163550555" }, "timestamp": "2022-12-15 13:54:01.606000+00:00", "reconciliation": { "webhookUrl": "https://your-call-back-url.com", "merchantRedirect": "https://your-call-back-url.com?paymentStatus=SUCCESS&cardDataToken=9d8332cb-6195-40ea-aed0-86c3aa60fbaa&maskedCard=512345******2346&merchantOrderId=1697457648576&orderId=27a86389-83be-4107-b51d-33ad767078a2&cardBrand=Mastercard&orderReference=TEST-ORD-96353&transactionId=TX-2498912113&amount=100¤cy=EGP&mode=test&signature=dde46b3a9b4fc05478f6a35dd62f82a2a3c0b6ace73997dfdcebda0abd7b8cc3", "redirect": true }, "merchantId": "MID-24-989", "order": { "amount": 100, "currency": "EGP", "callbackURL": "https://your-call-back-url.com", "systemOrderId": "27a86389-83be-4107-b51d-33ad767078a2" }, "merchantRedirectUrl": "https://your-call-back-url.com?paymentStatus=SUCCESS&cardDataToken=9d8332cb-6195-40ea-aed0-86c3aa60fbaa&maskedCard=512345******2346&merchantOrderId=1697457648576&orderId=27a86389-83be-4107-b51d-33ad767078a2&cardBrand=Mastercard&orderReference=TEST-ORD-96353&transactionId=TX-2498912113&amount=100¤cy=EGP&mode=test&signature=dde46b3a9b4fc05478f6a35dd62f82a2a3c0b6ace73997dfdcebda0abd7b8cc3", "apiKeyId": "5d0003fc77c68a0018b05a6f", "method": "card", "creationDate": "2023-10-16 15:00:48.946000+00:00", "orderId": "27a86389-83be-4107-b51d-33ad767078a2", "merchantOrderId": "1697457648576", "orderReference": "TEST-ORD-96353", "paymentType": "ext-default", "interactionSource": "MOTO", "transactionId": "TX-2498912113", "transactionResponseCode": "00", "transactionResponseMessage": { "en": "Approved", "ar": "تمت الموافقة" } }, "messages": { "en": "Approved", "ar": "تمت الموافقة" }, "status": "SUCCESS", "showCaptcha": false}Creates a new payment request using a saved card token. (The docs show the URL with a trailing slash: /v3/orders/.) The request is authenticated with a Kashier-Hash header (order hash generated with HMAC SHA256 from your backend). With interactionSource: ECOMMERCE and 3DS enabled, the response contains an authentication.redirectUrl you should redirect to for the 3DS page; the final transaction response after 3DS processing is received via webhook. With MOTO, the payment is processed directly.
Header Parameters
Order hash generated from your backend using the HMAC SHA256 crypto mechanism, as described in the Kashier hashing documentation.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
Reverse an order PUT
Reverses a transaction at the rail level. This is the card-present and BNPL undo — for an ordinary online card sale reach for void (before settlement) or refund (after) instead, which is almost alw…
Retrieve tokens GET
Retrieves a customer's saved card tokens and info. The request is validated with a Kashier-Hash header — an HMAC SHA256 of the path /?tokenization={mid}.{customerReference} keyed with your Payment…