MagicPay Documentation
  • MagicPay Documentation
  • Testing Environments
  • Authentication
  • 1.Payments and Wallet
    • 1.1 Create Card Payment
    • 1.2 3D Secure Payment Initialization
    • 1.3 3D Secure Payment Completion
    • 1.4 Query Payment
    • 1.5 Reward Inquiry
    • 1.6 Create Wallet
    • 1.7 Get Member Wallet
    • 1.8 Make Deposit
    • 1.9 Search Wallet Transactions
    • 1.10 Send Remittance
    • 1.11 Receive Remittance
    • 1.12 Retrieve Remittance
    • 1.13 Get Refundable Amount
    • 1.14 Make Deposit (3D Init)
    • 1.15 Make Deposit (3D Complete)
    • 1.16 Retrieve Merchant Wallet
    • 1.17 Create Refund Transaction
    • 1.18 Get Refunds
    • 1.19 Reset Merchant Wallet Balance
    • 1.20 Refund Payment
    • 1.21 Get Refund By Id
    • 1.22 Get Refund Transaction By Id
    • 1.23 Refund Payment Transaction
  • 2.Users
    • 2.1 User Authenticate
    • 2.2 Create User
    • 2.3 Update User
  • 3. Members
    • 3.1 Create Member
    • 3.2 Update Member
    • 3.3 Get Member
    • 3.4 Query Member
  • 4. Installments
    • 4.1 Query Bins
    • 4.2 Installment Query
  • 5. Products
    • 5.1 Get Menu
    • 5.2 Get Products
    • 5.3 Get Campaigns
    • 5.4 Get Rules
    • 5.5 Get Story
    • 5.6 Get Category
    • 5.7 Get Category By Id
    • 5.8 Get Rules By Id
    • 5.9 Get Campaigns By Id
    • 5.10 Get Stories By Id
    • 5.11 Get Products By Id
    • 5.12 Create Products
    • 5.13 Create Campaigns
    • 5.14 Create Stories
    • 5.15 Create Rules
    • 5.16 Create Category
    • 5.17 Update Products
    • 5.18 Update Rules
    • 5.19 Update Stories
    • 5.20 Update Campaigns
    • 5.21 Update Category
  • 6. Links
    • 6.1 Create Custom Links
    • 6.2 Update Custom Links
    • 6.3 Get Custom Links By Id
    • 6.4 Delete Custom Links
    • 6.5 Get Custom Links
  • 7. Magic Links
    • 7.1 Create Magic Links
    • 7.2 Update Magic Links
    • 7.3 Get Magic Links
    • 7.4 Delete Magic Links
  • 8. Merchants
    • 8.1 Create Merchants
    • 8.2 Update Merchants
  • 9. Payment Facility
    • 9.1 Create PF
    • 9.2 Get PF
    • 9.3 Update PF
    • 9.4 Delete PF
  • 10. POS
    • 10.1 Create POS
    • 10.2 Update POS
    • 10.3 Get POS
    • 10.4 Update POS By Id
    • 10.5 Get POS Metadata
    • 10.6 Get Commission By Id
    • 10.7 Create Commission By Id
    • 10.8 Change POS Status
    • 10.9 Delete POS
    • 10.10 Get Merchant POS By Id
  • 11. Submerchants
    • 11.1 Get Submerchants
    • 11.2 Get Submerchants By Id
    • 11.3 Submerchant Transaction Approve
  • 12. Reports
    • 12.1 Get Report
    • 12.2 Export By Id
    • 12.3 Create Reports
    • 12.4 Get Daily POS Reports Daily Summaries
    • 12.5 Get Daily Apm Reports Daily Summaries
  • 13. Subscription
    • 13.1 Get Subscription
    • 13.2 Get Subscription By Id
    • 13.3 Get Subscription Products
  • 14. API Key
    • 14.1 Create API Key
    • 14.2 Get API Key By Id
    • 14.3 Create API Key By Permission
    • 14.4 Delete Permission By API Key
    • 14.5 Update API Key By Id
    • 14.6 Delete API Key By Id
Powered by GitBook
On this page
  1. 1.Payments and Wallet

1.1 Create Card Payment

Initiates a card payment transaction.

Request

Method

URL

POST

/payment/v1/card-payments

Post Data

{
  "price": 100.0,
  "paidPrice": 100.0,
  "walletPrice": 100.0,
  "installment": 1,
  "buyerMemberId": 1,
  "currency": "TRY",
  "paymentGroup": "PRODUCT",
  "paymentPhase": "AUTH",
  "paymentChannel": "Online",
  "callbackUrl": "http://example.com/callback",
  "bankOrderId": "111222333",
  "clientIp": "192.168.1.1",
  "card": {
    "cardAlias": "MyCard",
    "cardHolderName": "John Doe",
    "cardNumber": "4022780520669303",
    "expireYear": "50",
    "expireMonth": "01",
    "cvc": "988",
    "storeCardAfterSuccessPayment": false,
    "cardUserKey": "userkey123",
    "cardToken": "cardtoken123",
    "loyalty": null
  },
  "posAlias": "pos1",
  "retry": false,
  "items": [
    {
      "name": "Item1",
      "price": 50.0,
      "externalId": "123",
      "conservationID": "deneme",
      "subMerchantMemberId": null,
      "subMerchantMemberPrice": null
    },
    {
      "name": "Item2",
      "price": 50.0,
      "externalId": "item456",
      "subMerchantMemberId": null,
      "subMerchantMemberPrice": null
    }
  ],
  "additionalParams": "Your additional parameters here",
  "recurring": false,
  "fraudParams": {
    "buyerExternalId": "buyer123",
    "buyerPhoneNumber": "+123456789",
    "buyerEmail": "buyer@example.com"
  }
}

Response

Status

Response

200

{

"data": {

"createdDate": "2024-01-17T12:34:56",

"price": 50.0,

"paidPrice": 50.0,

"walletPrice": 0.0,

"currency": "USD",

"buyerMemberId": "buyer123",

"installment": 1,

"conversationId": "123456",

"externalId": "ext123",

"paymentType": "CARD_PAYMENT",

"paymentGroup": "GROUP1",

"paymentSource": "WEB",

"paymentStatus": "SUCCESS",

"paymentPhase": "PHASE1",

"paymentChannel": "WEB",

"isThreeDS": false,

"merchantCommissionRate": 0.03,

"merchantCommissionRateAmount": 1.5,

"bankCommissionRate": 0.02,

"bankCommissionRateAmount": 1.0,

"cardType": "VISA",

"cardAssociation": "Visa Inc.",

"cardBrand": "Visa",

"requestedPosAlias": "pos123",

"pos": "Your POS information here",

"loyalty": {},

"fraudId": "fraud123",

"fraudAction": "BLOCK",

"paymentTransactions": []

}

}

403

400

400

401

401

500

Previous1.Payments and WalletNext1.2 3D Secure Payment Initialization

Last updated 1 year ago