1. Pay by saved card
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Card data encryption
      • Payments
        • Overview
        • Pay by card
        • Pay by card: complete 3DS
        • Pay with Apple Pay
        • Pay with Google Pay
        • Pay by recurring profile
        • Create payment page
        • Create payment page with any amount
        • Capture payment (clearing)
        • Cancel payment
        • Refund payment
        • Get payment status
      • Payout
        • Overview
        • Pay out to card
        • Pay out to IBAN
        • Get payout balance
        • Get payout status
      • Transfer
        • Overview
        • Transfer from card to card
        • Transfer from card to card: complete 3DS
        • Get exchange rates
        • Get transfer status
      • Saved cards
        • Overview
        • Save card
        • Save card: complete 3DS
        • List saved cards
        • Remove saved card
        • Pay by card token
        • Pay out to card token
        • Get payment status
    • Async API
      • Overview
      • Create
        • Create payment
      • Read
        • Get payment status
        • Get request result
      • Edit
        • Capture payment (clearing)
        • Cancel payment (reverse)
        • Refund payment
  • Merchant API
    • Overview
    • Purchase
      • Overview
      • Checkout
      • Pay by saved card
        • Overview
        • Create payment
          POST
        • Confirm payment with CVC
          POST
        • Confirm payment without the client
          POST
      • Create payment
        POST
      • Create payment with a payment page template
        POST
      • Create payment in a payment frame
        POST
      • Create payment with any amount
        POST
      • Create recurring payment
        POST
      • Cancel payment
        POST
      • Capture payment (clearing)
        POST
      • Refund payment
        POST
      • Get payment status
        POST
    • Payout
      • Overview
      • Create payout page
      • Pay out to IBAN
      • Get payout balance
      • Pay out to saved card
      • Get payout status
    • Mobile balance
      • Overview
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Invoice
      • Overview
      • Recurring profile
        • Overview
        • Create
        • Cancel
        • Info
        • Notify
      • Tips
        • Overview
        • Create
      • Create
      • Execute
      • Info
      • Refund
      • Status
      • Cancel
    • SDK
      • JS SDK
      • Merchant SDK
        • Google Pay
        • Android
        • IOS
    • CMS
      • Overview
      • Get Merchant ID and key
      • WordPress
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
        • Update
      • Tilda
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • InSales
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • Ecwid
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • Bitrix
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • PrestaShop
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • OpenCart
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
    • Installment
      • Overview
      • Status
        • Application Status
        • Application Callback Status
        • Application Change Status
      • Get partners
      • Create application
    • Saved cards
      • Get saved cards
      • Save card
      • Save card for payouts
      • Delete saved card
      • Save card without a charge
    • Redirect back
      POST
    • Result notify
      POST
    • Payout notify
      POST
    • Check request
      POST
  • Partner API
    • Rates
      • Overview
      • Rates
    • Products
      • Overview
      • Dictionaries
      • Add client with product
      • Client request status
      • Create terminal
      • Update terminal limits
      • Product request status
    • E-Money
      • Overview
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Device ID
      • Android SDK
      • iOS SDK
    • Implement SuperApp
      • Overview
      • Pay
      • Refund
      • Status
    • Account
      • Overview
      • Create payment
      • Payment status
      • Batch statuses
      • Statement
      • Statement status
      • Balance
      • Balance status
    • Invoices
      • Info
  1. Pay by saved card

Confirm payment with CVC

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/v1/merchant/{merchant_id}/card/pay
Confirms a payment created by Create payment when the client is on your site.
Send the request from the client's browser: submit an HTML form with method POST (see the example below). The response is an HTML page, not XML.
The page asks the client for the CVC. If 3DS is required, the client passes it. Then the client is redirected to pg_success_url or pg_failure_url.
The CVC is not asked for cards without CVC and for merchants for which Confirm payment without the client is enabled.
The payment result is also sent to pg_result_url: rely on it, not on the redirect.

Payment flow#

Result#

The client is redirected with method GET:
RedirectParametersMeaningNext step
pg_success_urlpg_order_id, pg_payment_id, pg_salt, pg_sigThe payment is successful.Check the final status with Get payment status or by the notification to pg_result_url.
pg_failure_urlpg_failure_code, pg_failure_descriptionThe payment is declined.See «Errors» below.

Errors#

A decline of the payment system comes in pg_failure_code and pg_failure_description of the redirect to pg_failure_url: see Error codes.

Request example#

The form is submitted from the client's browser. pg_sig is calculated with the secret key test_secret_key.

Request

Path Params

Body Params multipart/form-data

Responses

🟢200Success
text/html
Example
<!DOCTYPE html>
<html>
<body>
<form action="http://localhost/test/merchant/success_url" method="get" id="form">
            <input type="hidden" name="_token" value="nwe1ze39PBWpiOBFZz2gqYpYg1ZmfRnuftxbQWNd" autocomplete="off">
    <input type="hidden" name="pg_order_id" value="ct-init_pay-1792783335" />
<input type="hidden" name="pg_payment_id" value="1023122203685" />
<input type="hidden" name="pg_salt" value="DGmd6SjVMEc8xDT7" />
<input type="hidden" name="pg_sig" value="9e83e6215bca1bddac990efe466552b7" />
</form>
<script nonce="ODE3YmIyZmM4YzM2NWIwMWM3YjAzYWVjMWMwMDU4MjI=" type="text/javascript">
    var result = 'success';
    window.onload = function() {
        document.getElementById('form').submit();
    }
</script>
</body>
</html>
Previous
Create payment
Next
Confirm payment without the client