# Card Information Saving

It is the service that allows to save your card information without receiving payment via Paynet. You need to pay attention to the informations given below while using the card storage service.

* If you want to save your card during the transaction, you need a unique information of your customer. (userid , gsm no , e\_mail etc. )
* When you make transaction of saving card informations for the first time , you must send this value to the parameter of user\_unique\_id .
* Then Paynet will generate a unique card\_owner\_id belongs to your customer.
* You need to also associate and store your own customer unique value and card\_owner\_id in your system.
* You will use “card\_owner\_id” for all of your later transactions. Once you have made a card save transaction to your customer, you will use card\_owner\_id parameter for saving card information or request to transactions from the saved card.

{% hint style="warning" %}
Note that you will need to do basic authentication with secret\_key for using this service. [expr.](https://doc.paynet.com.tr/authentication#secret-key)
{% endhint %}

{% hint style="success" %}
<https://api.paynet.com.tr/v1/card/save>
{% endhint %}

{% tabs %}
{% tab title="Request Parameters" %}

| Parameter Name       | Type   | Required | Description                                                                                                                                                                                |
| -------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **card\_desc**       | string | Yes      | The name will be given to stored card.                                                                                                                                                     |
| **card\_holder**     | string | Yes      | The name on the card.                                                                                                                                                                      |
| **card\_number**     | string | Yes      | Card number.                                                                                                                                                                               |
| **expire\_month**    | string | Yes      | Month on the card.                                                                                                                                                                         |
| **expire\_year**     | string | Yes      | Year on the card.                                                                                                                                                                          |
| **cvv**              | string | No       | &#xD;CVV Code. If you send a CVV code, the bank will take pre-provision of 1 TL to check the accuracy of the card during card saving , then it will be canceled.                           |
| **user\_unique\_id** | string | No       | Unique id that given to user by member workplace. It’s necessary if card saving will be perform at first time.                                                                             |
| **card\_owner\_id**  | string | No       | Unique card holder information that has been generated by Paynet residing on user\_unique\_id after first card saving process. This value is also used in subsequent card saving services. |
| **otp\_code**        | string | No       | Number that will be send to last user’s send\_otp service as a parameter. Please contact our support team for more information.                                                            |
| **otp\_session\_id** | string | No       | The value that will be associated with OTP. This value will be associated with the card information that will be saved. Please contact our support team for more information.              |
| **user\_gsm**        | string | No       | The phone number that will received otp\_code from send\_otp service when OTP Verification is required. Please contact our support team for more information.                              |
| {% endtab %}         |        |          |                                                                                                                                                                                            |

{% tab title="Response Parameters" %}

| Parameter Name        | Type   | Description                                                                                              |
| --------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| **card\_desc**        | string | The name given to stored card.                                                                           |
| **card\_hash**        | string | Hash value of card number.                                                                               |
| **card\_no**          | string | Tokenized version of the first 6 and last 4 numbers of the card number.                                  |
| **card\_bin**         | string | First six digits of the card.                                                                            |
| **card\_type**        | string | Type of the card. [Expr](https://doc.paynet.com.tr/genel-bilgiler/veri-tipleri/kart-tipi)                |
| **card\_bank\_name**  | string | The bank name of the card.(Bonus,Axess,etc.)                                                             |
| **card\_logo\_url**   | string | Logo image of the card.                                                                                  |
| **card\_brand\_name** | string | VISA,MASTERCARD,AMEX                                                                                     |
| **card\_owner\_id**   | string | The unique value which is generated by Paynet for the owner of the card.                                 |
| **user\_unique\_id**  | string | The unique id of user which is given by member workplace. The value that sent in the first save process. |
| **object\_name**      | string | Name of Response API.                                                                                    |
| **code**              | string | Code of Response Result. [Expr](https://doc.paynet.com.tr/genel-bilgiler/hata-kodlari/doenues-kodlari)   |
| **message**           | string | Description of Code.                                                                                     |

{% endtab %}

{% tab title="Request" %}

```
{  
   "user_gsm":"5xxxyyzz",
   "otp_session_id":"otp_session_id",
   "otp_code":"ART2",
   "card_desc":"Kart aciklamasi",
   "card_holder":"Onur Ozdemir",
   "card_number":"435508xxxxxxxx",
   "expire_month":"12",
   "expire_year":"18",
   "cvv":"000",
   "user_unique_id":"benzersiz deger"
}
```

{% endtab %}

{% tab title="Response" %}

```
{  
   "card_owner_id":"abc45adc20-91ba-4a29-a599-0eb18177247e",
   "user_unique_id":"benzersiz deger",
   "card_desc":"test",
   "card_hash":"abcdef-8014-435e-8bcc-daf4592f3431",
   "card_no":"455508********8053",
   "card_bin":"435508",
   "card_type":"cc",
   "card_bank_name":"WorldCard",
   "card_logo_url":"https://pts-statics.paynet.com.tr/img/banklogo/small/AXSS.png",
   "card_brand_name":"VISA",
   "object_name":"card_save",
   "code":0,
   "message":"Başarılı İşlem"
}
```

{% endtab %}

{% tab title="Service URL" %}

| System          | URL                                                                                                                                                                                 |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Live System** | [https://api.paynet.com.tr\[/v1/card/save](https://doc.paynet.com.tr/english/card-save/https:/api.paynet.com.tr\[/v1/card/save)]\(<https://api.paynet.com.tr/v1/card/save>)         |
| **Test System** | [https://pts-api.paynet.com.tr\[/v1/card/save](https://doc.paynet.com.tr/english/card-save/https:/pts-api.paynet.com.tr\[/v1/card/save)]\(<https://api.paynet.com.tr/v1/card/save>) |
| {% endtab %}    |                                                                                                                                                                                     |
| {% endtabs %}   |                                                                                                                                                                                     |
