> For the complete documentation index, see [llms.txt](https://magicpay.gitbook.io/magicpay-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://magicpay.gitbook.io/magicpay-documentation/payments-and-wallet/create-card-payment.md).

# Create Card Payment

## 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    | <p>{</p><p>"data": {</p><p>"createdDate": "2024-01-17T12:34:56",</p><p>"price": 50.0,</p><p>"paidPrice": 50.0,</p><p>"walletPrice": 0.0,</p><p>"currency": "USD",</p><p>"buyerMemberId": "buyer123",</p><p>"installment": 1,</p><p>"conversationId": "123456",</p><p>"externalId": "ext123",</p><p>"paymentType": "CARD\_PAYMENT",</p><p>"paymentGroup": "GROUP1",</p><p>"paymentSource": "WEB",</p><p>"paymentStatus": "SUCCESS",</p><p>"paymentPhase": "PHASE1",</p><p>"paymentChannel": "WEB",</p><p>"isThreeDS": false,</p><p>"merchantCommissionRate": 0.03,</p><p>"merchantCommissionRateAmount": 1.5,</p><p>"bankCommissionRate": 0.02,</p><p>"bankCommissionRateAmount": 1.0,</p><p>"cardType": "VISA",</p><p>"cardAssociation": "Visa Inc.",</p><p>"cardBrand": "Visa",</p><p>"requestedPosAlias": "pos123",</p><p>"pos": "Your POS information here",</p><p>"loyalty": {},</p><p>"fraudId": "fraud123",</p><p>"fraudAction": "BLOCK",</p><p>"paymentTransactions": \[]</p><p>}</p><p>}</p> |
| 403    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 400    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 400    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 401    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 401    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 500    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

[<br>](https://hilals-organization.gitbook.io/magicpay-documentation/1.payments-and-wallet)
