# Payment Methods

Card objects represent your customer's payment instruments.

## Add New Card

<mark style="color:green;">`POST`</mark> `https://api.berymo.com/api/schedule/v1/payment/cards`

This endpoint allows you to add new card. The payment form should be integrated with Stripe.js. A token which is generated from Stripe.js should be sent to server.

#### Request Body

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| card  | object | Card details     |
| token | string | Stripe.js token. |

{% tabs %}
{% tab title="200 Card successfully added." %}

```
{
    "status": true,
    "message": "Your payment method added successfully.",
    "card": [CardObject]
}
```

{% endtab %}
{% endtabs %}

```
{
	"token": "tok_visa_debit",
	"card": {
		"last4": "1213",
		"brand": "Visa",
		"funding": "credit",
		"addressCountry": "TR",
		"addressZip": "35330",
		"isApplePayCard": false,
		"expMonth": "12",
		"expYear": "2022"
	}
}
```

{% hint style="warning" %}
At some conditions you will get **200: OK** response but with the key of status is false. This is related to internal card errors. You should control it also.
{% endhint %}

## Remove A Card

<mark style="color:red;">`DELETE`</mark> `https://api.berymo.com/api/schedule/v1/payment/cards/:uuid`

Remove a card from customer.

#### Path Parameters

| Name | Type    | Description         |
| ---- | ------- | ------------------- |
| uuid | integer | UUID of an customer |

{% tabs %}
{% tab title="200 Card successfully removed." %}

```
{
    "status": true,
    "message": "Your payment method removed successfully.",
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.berymo.com/rest-api-v1/payment-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
