1. Gateway API
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
        • Card
        • IBAN
        • Balance
        • Status
      • Transfer
        • Overview
        • Card
        • 3DSecure
        • Rates
        • Status
      • Card
        • Overview
        • Add
        • 3DSecure
        • List
        • Remove
        • Get payment status
      • 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. Gateway API

Overview

General information#

Gateway API is a direct server-to-server connection between the merchant and Freedom Pay: the merchant collects card data on its side and sends it to the API, without the Freedom Pay payment page.
If you have any questions, please contact your manager.
Attention!
Connection requires a PCI DSS certificate!

Sync API and Async API#

Gateway API has two independent APIs. Start with the Overview of the API you use: it describes request format, signature and errors.
Sync API (API v3)Async API (API v5)
URL{domain}/g2g/<method>, a separate URL per operation{domain}/v5/g2g/create, /read, /edit; the operation is set by the X-Action header
Resultin the response to the requestthe request is accepted with status process; the result is available via the status request
Request and responseform data, JSON or XML; the response is XMLJSON
SignatureMD5 pg_sigJWS X-JWS-Signature (HS256)
Operationspayments by card and wallet token, 3DS, clearing, cancel, refund, recurrent payments, payouts, transfers, card storagepayments by card, saved card, wallet token and recurrent profile; 3DS; clearing, reverse, refund

About service#

 Freedom Pay is a universal payment acceptance tool for businesses.
 The service enables payment processing, payouts to bank cards, and card saving:
Payment acceptance: Freedom Pay collects payments on behalf of the merchant and transfers the funds to the merchant's bank account.
Payouts: Freedom Pay transfers funds to the user's bank card (Sync API).
Saving cards: a saved card can be used for subsequent payments without entering card data.

Test cards#

Test cards work only in test mode. The results below were obtained with cardholder name IVAN IVANOV, CVC 123 and expiry date 12/30.
— the operation succeeds, — the operation is declined.

Payment cards: successful payment#

Card numberBrand3DSClearingReverse (cancel)Refund
4400444400004440Visa
4400444400004444Visa
4458444400004448Visa
4716047261941981Visa
4916307416334310Visa
5367654276102126Mastercard
4939770956154989Visa
4799150896081734Visa
5218487962459752Mastercard
4446763125813623Visa
5200190005138652Mastercard
5269737320050521Mastercard
5377193762823307Mastercard
5200190059838710Mastercard
5163103002982563Mastercard
5486742060635314Mastercard
5200190011811433Mastercard
4090700100360047Visa
5167400000496745Mastercard
4256691944867646Visa
4284624140544525Visa
4985170000702810Visa
4356292313685179Visa
6200000000000013UnionPay
62000000000000018UnionPay
620000000000000013UnionPay
6200000000000000018UnionPay
6200000011111114UnionPay
62000000111111118UnionPay
620000001111111111UnionPay
6200000011111111115UnionPay
6224466455690681278UnionPay
62528733472390953UnionPay
623275279933273424UnionPay
4111111111111111Visa
5555555555555599Mastercard
4671593866478252Visa
For cards with 3DS the payment returns pg_3ds = 1: complete the 3DS step (/g2g/paymentAcs) to get the final result.
A card from this table can be saved with /g2g/cardstorage/add (cards with 3DS — after /g2g/cardstorage/payment_acs).

Payment cards: declined payment#

Card numberBrand3DSResult
4400444400004441VisaPayment system error
4400444400004442VisaLimit exceeded
4400444400004443VisaInsufficient funds
4400444400004445VisaSystem error
4400444400004446VisaPayment system error
4400444400004447Visa3DS authentication failed
5335215945367703MastercardPayment system error
4916109830832246VisaLimit exceeded
5548398681700148MastercardInsufficient funds
5475102935853613MastercardSystem error
5484458131482832Mastercard3DS session error
6200000022222215UnionPayPayment system error
62000000222222226UnionPayPayment system error
620000002222222227UnionPayPayment system error
6200000022222222220UnionPayPayment system error
6200000033333316UnionPayLimit exceeded
62000000333333334UnionPayLimit exceeded
620000003333333333UnionPayLimit exceeded
6200000033333333335UnionPayLimit exceeded
6200000044444417UnionPayInsufficient funds
62000000444444442UnionPayInsufficient funds
620000004444444449UnionPayInsufficient funds
6200000044444444440UnionPayInsufficient funds
4444444444446666VisaPayment system error
4563960122001999VisaLimit exceeded
5555555555555557MastercardSystem error
4444444444444422VisaSystem error
4444444411111111VisaSystem error
4444444499999999VisaSystem error
A card from this table is not saved by /g2g/cardstorage/add.

Payout cards#

Card numberResult
4400444444444440Success
4671593866478252Success
4860515915886350Success
4860371715886350Success
4860169115886354Success
4860502915886358Success
4860041015886356Success
4860050615886351Success
4860518515886358Success
4860967315886359Success
4860862015886355Success
6204500338419360939Success
62861819783765929Success
629656013969216940Success
4400444400004440Success
4458444400004448Success
4400444444444441Declined
4400444444444442Declined
4400444444444443Declined
5325349472901311Declined
4556046085041740Declined
5543974702876045Declined
4400444444444444Stays in status process
4400444444444445Stays in status process
5507841999732294Stays in status process
4532676596620704Stays in status process

Error codes#

The error format of each API is described in its Overview.
Error code reference

Support#

If you found an inaccuracy or need help, feel free to reach out! 👋
Email: support@freedompay.kz
Previous
Overview
Next
Overview