1. Card storage
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Card data encryption
      • Purchase
        • Overview
        • Pay by card
        • Pay by card: complete 3DS
        • 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
      • Card storage
        • Overview
        • Save card
          POST
        • Save card: complete 3DS
          POST
        • List saved cards
          POST
        • Remove saved card
          POST
        • Get payment status
          POST
      • Token
        • Overview
        • Token Pay
        • Apple Pay
        • Google Pay
        • Token Payout
        • 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
      • Card token
        • Overview
        • Tokenize card
        • Delete token
        • Card token list
        • Create payment (with CVC)
        • Confirm payment (with CVC)
        • Create payment
        • Confirm payment
      • Create payment
      • Any amount
      • Reccuring payment
      • Cancel payment
      • Clearing
      • Refund payment
      • Status
    • Payout
      • Overview
      • Card token
        • Tokenize card
        • Delete token
        • Card token list
        • Create payment
      • Create payment
      • IBAN
      • Balance status
      • 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
    • 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. Card storage

Save card: complete 3DS

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/g2g/cardstorage/payment_acs
Completes card saving after 3DS and returns the card token.
Call the method when Save card returned pg_3ds = 1 and the client has completed 3DS.
Sign the request with the secret key: see Sync API Overview.
Open pg_3d_acsurl for the client with an HTTP POST form: pass MD = pg_3d_md, PaReq = pg_3d_pareq and TermUrl.
The client is returned to TermUrl after 3DS.

3DS flow#

Errors#

The HTTP status is always 200; the error is returned in pg_error_code and pg_error_description.
pg_error_codeWhenWhat to do
94031pg_payment_id is not passed or not found.Pass pg_payment_id from the Save card response.
1100The signature is missing or invalid.Check the signature with the secret key.
1101pg_merchant_id is not found. The response is not signed.Check the merchant ID.
10004The client has not completed 3DS.Call the method after the client returns to TermUrl.
110691Card saving is not waiting for 3DS: 3DS is not required or is already completed.Get the card with List saved cards.
Other codesThe payment system declined the card, for example the client failed 3DS.See Error codes.

Request example#

Required fields only. pg_sig is calculated with the secret key test_secret_key.
Line breaks in the body are added for readability: send the body as one line.

Request

Body Params multipart/form-data

Responses

🟢200Success
application/xml
Bodyapplication/xml

Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>763</pg_payment_id>
    <pg_order_id>cs-1792492338</pg_order_id>
    <pg_status>ok</pg_status>
    <pg_card_mask>4400-44XX-XXXX-4444</pg_card_mask>
    <pg_card_token>ef58ff1a-d610-4344-ae6a-3f4d5af893d3</pg_card_token>
    <pg_datetime>2026-10-20T10:32:29+00:00</pg_datetime>
    <pg_salt>ZtpsQIFVMeHFOgsO</pg_salt>
    <pg_sig>21c42a82428c63ac85cb30cc342ef76c</pg_sig>
</response>
🟢200Error
Previous
Save card
Next
List saved cards