# Payment API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Payment product's sections: https://developers.eu.ovhcloud.com/reference/payment/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 36 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/payment/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/payment.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/payment.json?format=openapi3

## Operations

- `GET /me/payment/availableMethods` — Retrieve available payment method
- `GET /me/payment/method` — Retrieve payment method list
- `POST /me/payment/method` — Register a new payment method
- `GET /me/payment/method/{paymentMethodId}` — Retrieve a payment method
- `PUT /me/payment/method/{paymentMethodId}` — Edit payment method
- `DELETE /me/payment/method/{paymentMethodId}` — Delete a payment method
- `POST /me/payment/method/{paymentMethodId}/challenge` — Challenge your payment method
- `POST /me/payment/method/{paymentMethodId}/details` — Add details to your payment method challenge
- `POST /me/payment/method/{paymentMethodId}/finalize` — Finalize a payment method registration
- `GET /me/payment/transaction` — Retrieve payment transaction list
- `GET /me/payment/transaction/{transactionId}` — Retrieve a transaction
- `GET /me/paymentMean/bankAccount` — List of bank accounts
- `POST /me/paymentMean/bankAccount` — Add a new payment mean bank account
- `GET /me/paymentMean/bankAccount/{id}` — Get bank account properties
- `PUT /me/paymentMean/bankAccount/{id}` — Alter this object properties
- `DELETE /me/paymentMean/bankAccount/{id}` — Disable payment through this account
- `POST /me/paymentMean/bankAccount/{id}/challenge` — Challenge your bank account
- `POST /me/paymentMean/bankAccount/{id}/chooseAsDefaultPaymentMean` — Choose this bank account as your default payment mean. Will cancel the previous choice.
- `GET /me/paymentMean/creditCard` — List of payment mean credit cards
- `POST /me/paymentMean/creditCard` — Add a new payment mean credit card
- `GET /me/paymentMean/creditCard/{id}` — Get credit card properties
- `PUT /me/paymentMean/creditCard/{id}` — Alter this object properties
- `DELETE /me/paymentMean/creditCard/{id}` — Disable payment through this credit card
- `POST /me/paymentMean/creditCard/{id}/challenge` — Challenge your credit card
- `POST /me/paymentMean/creditCard/{id}/chooseAsDefaultPaymentMean` — Choose this credit card as your default payment mean. Will cancel the previous choice.
- `GET /me/paymentMean/deferredPaymentAccount` — List of payment mean deferred accounts
- `GET /me/paymentMean/deferredPaymentAccount/{id}` — Get this object properties
- `PUT /me/paymentMean/deferredPaymentAccount/{id}` — Alter this object properties
- `POST /me/paymentMean/deferredPaymentAccount/{id}/chooseAsDefaultPaymentMean` — Choose this deferred account as your default payment mean. Will cancel the previous choice.
- `GET /me/paymentMean/paypal` — List of payment mean paypals
- `POST /me/paymentMean/paypal` — Add a new payment mean paypal
- `GET /me/paymentMean/paypal/{id}` — Get paypal properties
- `PUT /me/paymentMean/paypal/{id}` — Alter this object properties
- `DELETE /me/paymentMean/paypal/{id}` — Disable payment through this paypal
- `POST /me/paymentMean/paypal/{id}/challenge` — Challenge your paypal
- `POST /me/paymentMean/paypal/{id}/chooseAsDefaultPaymentMean` — Choose this paypal as your default payment mean. Will cancel the previous choice.

## Retrieve available payment method

`GET /1.0/me/payment/availableMethods`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-payment-availablemethods

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/availableMethods/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.AvailablePaymentMethod[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `merchantId` | string | read-only | Merchant ID |
| `oneshot` | boolean | read-only | Indicates if payment method type allows to process oneshot payment |
| `organizationId` | string | read-only | Organization ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `registerable` | boolean | read-only | Indicates if payment method type is registerable ? |
| `registerableWithTransaction` | boolean | read-only | Indicates if payment method type allows payment and registration at the same time |

```json
[
  {
    "formSessionId": "string",
    "icon": {
      "data": "string",
      "name": "string",
      "url": "string"
    },
    "integration": "BANK_TRANSFER",
    "merchantId": "string",
    "oneshot": true,
    "organizationId": "string",
    "paymentSubType": "30_DAYS",
    "paymentType": "string",
    "registerable": true,
    "registerableWithTransaction": true
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/payment/availableMethods" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/payment/availableMethods")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/payment/availableMethods");

print_r($result);
?>
```

## Retrieve payment method list

`GET /1.0/me/payment/method`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-payment-method

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `default` | query | boolean |  | Filter on 'default' property |
| `paymentType` | query | string |  | Filter on 'paymentType' property |
| `status` | query | me.payment.method.StatusEnum |  | Filter on 'status' property — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/payment/method")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/payment/method");

print_r($result);
?>
```

## Register a new payment method

`POST /1.0/me/payment/method`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-payment-method

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/create`

### Request body (required)

Type: `me.payment.method.Creation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer |  | Associated billing contact ID |
| `callbackUrl` | me.payment.method.CallbackUrl | yes | Callback URL's necessary to register |
| `callbackUrl.cancel` | string | yes | URL when customer cancels the action |
| `callbackUrl.error` | string | yes | URL when registration encounters an error |
| `callbackUrl.failure` | string | yes | URL when registration failed |
| `callbackUrl.pending` | string | yes | URL when payment method is in validation |
| `callbackUrl.success` | string | yes | URL when payment method registration success |
| `default` | boolean |  | Indicates if this payment method will be set as the default one |
| `description` | string |  | Personalized description |
| `formData` | string |  | Additional payment information |
| `orderId` | integer |  | Order ID to pay it if it's possible (in oneshot transaction or while registration) |
| `paymentSubType` | me.payment.CreationSubTypeEnum |  | Payment sub-type — one of `CHORUS`, `NONE` |
| `paymentType` | string | yes | Payment type |
| `register` | boolean |  | Register this payment method if it's possible (default value is false and will proceed a oneshot transaction) |

```json
{
  "billingContactId": 0,
  "callbackUrl": {
    "cancel": "string",
    "error": "string",
    "failure": "string",
    "pending": "string",
    "success": "string"
  },
  "default": true,
  "description": "string",
  "formData": "string",
  "orderId": 0,
  "paymentSubType": "CHORUS",
  "paymentType": "string",
  "register": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.method.Validation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `formSessionId` | string | read-only | Form session ID |
| `merchantId` | string | read-only | Merchant ID |
| `organizationId` | string | read-only | Organization ID |
| `paymentMethodId` | integer | read-only | Registered new payment method ID |
| `transactionId` | integer | read-only | Registered new transaction ID |
| `url` | string | read-only | Registration validation URL to redirect |
| `validationType` | me.payment.IntegrationEnum | read-only | Registration validation type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |

```json
{
  "formSessionId": "string",
  "merchantId": "string",
  "organizationId": "string",
  "paymentMethodId": 0,
  "transactionId": 0,
  "url": "string",
  "validationType": "BANK_TRANSFER"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.payment.method.Creation
result = client.post("/me/payment/method",
	billingContactId = None, # Associated billing contact ID (type: integer, nullable)
	callbackUrl = None, # Callback URL's necessary to register (type: me.payment.method.CallbackUrl)
	default = None, # Indicates if this payment method will be set as the default one (type: boolean)
	description = None, # Personalized description (type: string, nullable)
	formData = None, # Additional payment information (type: string, nullable)
	orderId = None, # Order ID to pay it if it's possible (in oneshot transaction or while registration) (type: integer, nullable)
	paymentSubType = None, # Payment sub-type (type: me.payment.CreationSubTypeEnum, nullable)
	paymentType = None, # Payment type (type: string)
	register = None, # Register this payment method if it's possible (default value is false and will proceed a oneshot transaction) (type: boolean)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.payment.method.Creation
$result = $ovh->post("/me/payment/method", array(
	billingContactId => null, // Associated billing contact ID (type: integer, nullable)
	callbackUrl => null, // Callback URL's necessary to register (type: me.payment.method.CallbackUrl)
	default => null, // Indicates if this payment method will be set as the default one (type: boolean)
	description => null, // Personalized description (type: string, nullable)
	formData => null, // Additional payment information (type: string, nullable)
	orderId => null, // Order ID to pay it if it's possible (in oneshot transaction or while registration) (type: integer, nullable)
	paymentSubType => null, // Payment sub-type (type: me.payment.CreationSubTypeEnum, nullable)
	paymentType => null, // Payment type (type: string)
	register => null, // Register this payment method if it's possible (default value is false and will proceed a oneshot transaction) (type: boolean)
));

print_r($result);
?>
```

## Retrieve a payment method

`GET /1.0/me/payment/method/{paymentMethodId}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-payment-method-paymentmethodid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.PaymentMethod | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer | read-only | Associated billing contact ID |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean |  | Indicates if payment method is the default one for this account |
| `description` | string |  | Custom customer description |
| `expirationDate` | string (date-time) | read-only | Expiration date |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `label` | string | read-only | Payment method public label |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `merchantId` | string | read-only | Merchant ID |
| `oneclick` | boolean | read-only | Indicates if payment method support the oneclick functionality |
| `paymentMeanId` | integer | read-only | Payment mean ID associated to this payment method |
| `paymentMethodId` | integer | read-only | Payment method ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `status` | me.payment.method.StatusEnum | read-only | Payment method status — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

```json
{
  "billingContactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "default": true,
  "description": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "formSessionId": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "integration": "BANK_TRANSFER",
  "label": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "merchantId": "string",
  "oneclick": true,
  "paymentMeanId": 0,
  "paymentMethodId": 0,
  "paymentSubType": "30_DAYS",
  "paymentType": "string",
  "status": "CANCELED"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/payment/method/{paymentMethodId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/payment/method/{paymentMethodId}");

print_r($result);
?>
```

## Edit payment method

`PUT /1.0/me/payment/method/{paymentMethodId}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#put-me-payment-method-paymentmethodid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Request body (required)

Type: `me.payment.PaymentMethod`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer | read-only | Associated billing contact ID |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean |  | Indicates if payment method is the default one for this account |
| `description` | string |  | Custom customer description |
| `expirationDate` | string (date-time) | read-only | Expiration date |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `label` | string | read-only | Payment method public label |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `merchantId` | string | read-only | Merchant ID |
| `oneclick` | boolean | read-only | Indicates if payment method support the oneclick functionality |
| `paymentMeanId` | integer | read-only | Payment mean ID associated to this payment method |
| `paymentMethodId` | integer | read-only | Payment method ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `status` | me.payment.method.StatusEnum | read-only | Payment method status — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

```json
{
  "default": true,
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.PaymentMethod | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer | read-only | Associated billing contact ID |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean |  | Indicates if payment method is the default one for this account |
| `description` | string |  | Custom customer description |
| `expirationDate` | string (date-time) | read-only | Expiration date |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `label` | string | read-only | Payment method public label |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `merchantId` | string | read-only | Merchant ID |
| `oneclick` | boolean | read-only | Indicates if payment method support the oneclick functionality |
| `paymentMeanId` | integer | read-only | Payment mean ID associated to this payment method |
| `paymentMethodId` | integer | read-only | Payment method ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `status` | me.payment.method.StatusEnum | read-only | Payment method status — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

```json
{
  "billingContactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "default": true,
  "description": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "formSessionId": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "integration": "BANK_TRANSFER",
  "label": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "merchantId": "string",
  "oneclick": true,
  "paymentMeanId": 0,
  "paymentMethodId": 0,
  "paymentSubType": "30_DAYS",
  "paymentType": "string",
  "status": "CANCELED"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.payment.PaymentMethod
result = client.put("/me/payment/method/{paymentMethodId}",
	default = None, # Indicates if payment method is the default one for this account (type: boolean)
	description = None, # Custom customer description (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.payment.PaymentMethod
$result = $ovh->put("/me/payment/method/{paymentMethodId}", array(
	default => null, // Indicates if payment method is the default one for this account (type: boolean)
	description => null, // Custom customer description (type: string, nullable)
));

print_r($result);
?>
```

## Delete a payment method

`DELETE /1.0/me/payment/method/{paymentMethodId}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#delete-me-payment-method-paymentmethodid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.PaymentMethod | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer | read-only | Associated billing contact ID |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean |  | Indicates if payment method is the default one for this account |
| `description` | string |  | Custom customer description |
| `expirationDate` | string (date-time) | read-only | Expiration date |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `label` | string | read-only | Payment method public label |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `merchantId` | string | read-only | Merchant ID |
| `oneclick` | boolean | read-only | Indicates if payment method support the oneclick functionality |
| `paymentMeanId` | integer | read-only | Payment mean ID associated to this payment method |
| `paymentMethodId` | integer | read-only | Payment method ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `status` | me.payment.method.StatusEnum | read-only | Payment method status — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

```json
{
  "billingContactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "default": true,
  "description": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "formSessionId": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "integration": "BANK_TRANSFER",
  "label": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "merchantId": "string",
  "oneclick": true,
  "paymentMeanId": 0,
  "paymentMethodId": 0,
  "paymentSubType": "30_DAYS",
  "paymentType": "string",
  "status": "CANCELED"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/payment/method/{paymentMethodId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/payment/method/{paymentMethodId}");

print_r($result);
?>
```

## Challenge your payment method

`POST /1.0/me/payment/method/{paymentMethodId}/challenge`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-payment-method-paymentmethodid-challenge

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/challenge`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Request body (required)

Type: `me.payment.method.Challenge`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `challenge` | string | yes | Challenge |

```json
{
  "challenge": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}/challenge" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.payment.method.Challenge
result = client.post("/me/payment/method/{paymentMethodId}/challenge",
	challenge = None, # Challenge (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.payment.method.Challenge
$result = $ovh->post("/me/payment/method/{paymentMethodId}/challenge", array(
	challenge => null, // Challenge (type: string)
));

print_r($result);
?>
```

## Add details to your payment method challenge

`POST /1.0/me/payment/method/{paymentMethodId}/details`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-payment-method-paymentmethodid-details

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/details/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Request body (required)

Type: `me.payment.method.Details`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `details` | string |  | Details data |
| `transactionId` | integer |  | Transaction ID |

```json
{
  "details": "string",
  "transactionId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.method.Validation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `formSessionId` | string | read-only | Form session ID |
| `merchantId` | string | read-only | Merchant ID |
| `organizationId` | string | read-only | Organization ID |
| `paymentMethodId` | integer | read-only | Registered new payment method ID |
| `transactionId` | integer | read-only | Registered new transaction ID |
| `url` | string | read-only | Registration validation URL to redirect |
| `validationType` | me.payment.IntegrationEnum | read-only | Registration validation type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |

```json
{
  "formSessionId": "string",
  "merchantId": "string",
  "organizationId": "string",
  "paymentMethodId": 0,
  "transactionId": 0,
  "url": "string",
  "validationType": "BANK_TRANSFER"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}/details" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.payment.method.Details
result = client.post("/me/payment/method/{paymentMethodId}/details",
	details = None, # Details data (type: string)
	transactionId = None, # Transaction ID (type: integer)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.payment.method.Details
$result = $ovh->post("/me/payment/method/{paymentMethodId}/details", array(
	details => null, // Details data (type: string)
	transactionId => null, // Transaction ID (type: integer)
));

print_r($result);
?>
```

## Finalize a payment method registration

`POST /1.0/me/payment/method/{paymentMethodId}/finalize`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-payment-method-paymentmethodid-finalize

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/method/finalize`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | path | integer | yes | Payment method ID |

### Request body (required)

Type: `me.payment.method.Finalize`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expirationMonth` | integer |  | Expiration month |
| `expirationYear` | integer |  | Expiration year |
| `formSessionId` | string |  | Form session ID |
| `registrationId` | string |  | Registration ID |

```json
{
  "expirationMonth": 0,
  "expirationYear": 0,
  "formSessionId": "string",
  "registrationId": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.PaymentMethod | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `billingContactId` | integer | read-only | Associated billing contact ID |
| `creationDate` | string (date-time) | read-only | Creation date |
| `default` | boolean |  | Indicates if payment method is the default one for this account |
| `description` | string |  | Custom customer description |
| `expirationDate` | string (date-time) | read-only | Expiration date |
| `formSessionId` | string | read-only | Form session ID |
| `icon` | me.payment.Icon | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `integration` | me.payment.IntegrationEnum | read-only | Payment method integration type — one of `BANK_TRANSFER`, `COMPONENT`, `IFRAME_VANTIV`, `IN_CONTEXT`, `NONE`, `OSP`, `POST_FORM`, `REDIRECT` |
| `label` | string | read-only | Payment method public label |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `merchantId` | string | read-only | Merchant ID |
| `oneclick` | boolean | read-only | Indicates if payment method support the oneclick functionality |
| `paymentMeanId` | integer | read-only | Payment mean ID associated to this payment method |
| `paymentMethodId` | integer | read-only | Payment method ID |
| `paymentSubType` | me.payment.AvailableSubTypeEnum | read-only | Payment method sub-type — one of `30_DAYS`, `45_DAYS`, `60_DAYS`, `AMERICAN_EXPRESS`, `AURA`, `CARTE_BANCAIRE`, `CARTE_BLEUE`, `CHORUS`, `DINERS_CLUB`, `DISCOVER`, `JCB`, `MAESTRO`, … |
| `paymentType` | string | read-only | Payment method type |
| `status` | me.payment.method.StatusEnum | read-only | Payment method status — one of `CANCELED`, `CANCELING`, `CREATED`, `CREATING`, `ERROR`, `EXPIRED`, `FAILED`, `MAINTENANCE`, `PAUSED`, `REJECTED`, `REPLACED`, `VALID`, … |

```json
{
  "billingContactId": 0,
  "creationDate": "2024-01-01T12:00:00Z",
  "default": true,
  "description": "string",
  "expirationDate": "2024-01-01T12:00:00Z",
  "formSessionId": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "integration": "BANK_TRANSFER",
  "label": "string",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "merchantId": "string",
  "oneclick": true,
  "paymentMeanId": 0,
  "paymentMethodId": 0,
  "paymentSubType": "30_DAYS",
  "paymentType": "string",
  "status": "CANCELED"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/payment/method/{paymentMethodId}/finalize" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.payment.method.Finalize
result = client.post("/me/payment/method/{paymentMethodId}/finalize",
	expirationMonth = None, # Expiration month (type: integer, nullable)
	expirationYear = None, # Expiration year (type: integer, nullable)
	formSessionId = None, # Form session ID (type: string, nullable)
	registrationId = None, # Registration ID (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.payment.method.Finalize
$result = $ovh->post("/me/payment/method/{paymentMethodId}/finalize", array(
	expirationMonth => null, // Expiration month (type: integer, nullable)
	expirationYear => null, // Expiration year (type: integer, nullable)
	formSessionId => null, // Form session ID (type: string, nullable)
	registrationId => null, // Registration ID (type: string, nullable)
));

print_r($result);
?>
```

## Retrieve payment transaction list

`GET /1.0/me/payment/transaction`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-payment-transaction

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/transaction/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `paymentMethodId` | query | integer |  | Payment method ID |
| `status` | query | me.payment.transaction.StatusEnum |  | Status — one of `CANCELED`, `CANCELING`, `CONFIRMING`, `ERROR`, `EXPIRED`, `FAILED`, `READY`, `SUCCESS` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/payment/transaction" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/payment/transaction")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/payment/transaction");

print_r($result);
?>
```

## Retrieve a transaction

`GET /1.0/me/payment/transaction/{transactionId}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-payment-transaction-transactionid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/payment/transaction/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `transactionId` | path | integer | yes | Transaction ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.payment.Transaction | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | order.Price | read-only | Transaction amount |
| `amount.currencyCode` | order.CurrencyCodeEnum | read-only | Currency code — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `N/A`, `PLN`, `SGD`, `TND`, … |
| `amount.priceInUcents` | integer | read-only | Price in microcents |
| `amount.text` | string | read-only | Textual representation |
| `amount.value` | number | read-only | The effective price |
| `creationDate` | string (date-time) | read-only | Creation date |
| `lastUpdate` | string (date-time) | read-only | Last update date |
| `paymentMethodId` | integer | read-only | Associated payment method ID |
| `status` | me.payment.transaction.StatusEnum | read-only | Transaction status — one of `CANCELED`, `CANCELING`, `CONFIRMING`, `ERROR`, `EXPIRED`, `FAILED`, `READY`, `SUCCESS` |
| `transactionId` | integer | read-only | Transaction ID |
| `type` | me.payment.transaction.TypeEnum | read-only | Transaction type — one of `CREDIT`, `DEBIT` |

```json
{
  "amount": {
    "currencyCode": "AUD",
    "priceInUcents": 0,
    "text": "string",
    "value": 0
  },
  "creationDate": "2024-01-01T12:00:00Z",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "paymentMethodId": 0,
  "status": "CANCELED",
  "transactionId": 0,
  "type": "CREDIT"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/payment/transaction/{transactionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/payment/transaction/{transactionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/payment/transaction/{transactionId}");

print_r($result);
?>
```

## List of bank accounts

`GET /1.0/me/paymentMean/bankAccount`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-bankaccount

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `state` | query | me.paymentMean.BankAccountStateEnum |  | Filter on 'status' property — one of `blockedForIncidents`, `pendingValidation`, `replaced`, `valid` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/bankAccount")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/bankAccount");

print_r($result);
?>
```

## Add a new payment mean bank account

`POST /1.0/me/paymentMean/bankAccount`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-bankaccount

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/create`

### Request body (required)

Type: `me.paymentMean.BankAccountCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bic` | string | yes | Bank account BIC |
| `description` | string |  | Custom description of this account |
| `iban` | string | yes | Bank account IBAN |
| `ownerAddress` | string | yes | Bank account owner's address |
| `ownerName` | string | yes | Bank account owner's name |
| `setDefault` | boolean |  | Set as default payment mean once validated |

```json
{
  "bic": "string",
  "description": "string",
  "iban": "string",
  "ownerAddress": "string",
  "ownerName": "string",
  "setDefault": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.BankAccountValidation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only |  |
| `submitUrl` | string | read-only |  |
| `url` | string | read-only | URL where redirect for registration process |
| `validationType` | me.paymentMean.ValidationTypeEnum | read-only | Kind of registration validation — one of `creditAccount`, `documentToSend`, `simpleValidation` |

```json
{
  "id": 0,
  "submitUrl": "string",
  "url": "string",
  "validationType": "creditAccount"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.BankAccountCreation
result = client.post("/me/paymentMean/bankAccount",
	bic = None, # Bank account BIC (type: string)
	description = None, # Custom description of this account (type: string, nullable)
	iban = None, # Bank account IBAN (type: string)
	ownerAddress = None, # Bank account owner's address (type: string)
	ownerName = None, # Bank account owner's name (type: string)
	setDefault = None, # Set as default payment mean once validated (type: boolean, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.BankAccountCreation
$result = $ovh->post("/me/paymentMean/bankAccount", array(
	bic => null, // Bank account BIC (type: string)
	description => null, // Custom description of this account (type: string, nullable)
	iban => null, // Bank account IBAN (type: string)
	ownerAddress => null, // Bank account owner's address (type: string)
	ownerName => null, // Bank account owner's name (type: string)
	setDefault => null, // Set as default payment mean once validated (type: boolean, nullable)
));

print_r($result);
?>
```

## Get bank account properties

`GET /1.0/me/paymentMean/bankAccount/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-bankaccount-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.BankAccount | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bic` | string | read-only |  |
| `creationDate` | string (date) | read-only |  |
| `defaultPaymentMean` | boolean | read-only | This credit card is the default payment mean? |
| `description` | string |  | Custom description of this bank account |
| `iban` | string | read-only |  |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `mandateSignatureDate` | string (date) | read-only |  |
| `ownerAddress` | string | read-only | Bank account owner's address |
| `ownerName` | string | read-only | Bank account owner's name |
| `state` | me.paymentMean.BankAccountStateEnum | read-only | Bank account state — one of `blockedForIncidents`, `pendingValidation`, `replaced`, `valid` |
| `uniqueReference` | string | read-only |  |
| `validationDocumentLink` | string | read-only |  |

```json
{
  "bic": "string",
  "creationDate": "2024-01-01",
  "defaultPaymentMean": true,
  "description": "string",
  "iban": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "id": 0,
  "mandateSignatureDate": "2024-01-01",
  "ownerAddress": "string",
  "ownerName": "string",
  "state": "blockedForIncidents",
  "uniqueReference": "string",
  "validationDocumentLink": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/bankAccount/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/bankAccount/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/me/paymentMean/bankAccount/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#put-me-paymentmean-bankaccount-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.BankAccount`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bic` | string | read-only |  |
| `creationDate` | string (date) | read-only |  |
| `defaultPaymentMean` | boolean | read-only | This credit card is the default payment mean? |
| `description` | string |  | Custom description of this bank account |
| `iban` | string | read-only |  |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `mandateSignatureDate` | string (date) | read-only |  |
| `ownerAddress` | string | read-only | Bank account owner's address |
| `ownerName` | string | read-only | Bank account owner's name |
| `state` | me.paymentMean.BankAccountStateEnum | read-only | Bank account state — one of `blockedForIncidents`, `pendingValidation`, `replaced`, `valid` |
| `uniqueReference` | string | read-only |  |
| `validationDocumentLink` | string | read-only |  |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.BankAccount
result = client.put("/me/paymentMean/bankAccount/{id}",
	description = None, # Custom description of this bank account (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.BankAccount
$result = $ovh->put("/me/paymentMean/bankAccount/{id}", array(
	description => null, // Custom description of this bank account (type: string, nullable)
));

print_r($result);
?>
```

## Disable payment through this account

`DELETE /1.0/me/paymentMean/bankAccount/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#delete-me-paymentmean-bankaccount-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/paymentMean/bankAccount/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/paymentMean/bankAccount/{id}");

print_r($result);
?>
```

## Challenge your bank account

`POST /1.0/me/paymentMean/bankAccount/{id}/challenge`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-bankaccount-id-challenge

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/challenge`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.BankAccountChallengeCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `challenge` | string | yes | Payload to answer the challenge |

```json
{
  "challenge": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount/{id}/challenge" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.BankAccountChallengeCreation
result = client.post("/me/paymentMean/bankAccount/{id}/challenge",
	challenge = None, # Payload to answer the challenge (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.BankAccountChallengeCreation
$result = $ovh->post("/me/paymentMean/bankAccount/{id}/challenge", array(
	challenge => null, // Payload to answer the challenge (type: string)
));

print_r($result);
?>
```

## Choose this bank account as your default payment mean. Will cancel the previous choice.

`POST /1.0/me/paymentMean/bankAccount/{id}/chooseAsDefaultPaymentMean`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-bankaccount-id-chooseasdefaultpaymentmean

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/bankAccount/chooseAsDefaultPaymentMean`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/bankAccount/{id}/chooseAsDefaultPaymentMean" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/paymentMean/bankAccount/{id}/chooseAsDefaultPaymentMean")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/paymentMean/bankAccount/{id}/chooseAsDefaultPaymentMean");

print_r($result);
?>
```

## List of payment mean credit cards

`GET /1.0/me/paymentMean/creditCard`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-creditcard

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/creditCard")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/creditCard");

print_r($result);
?>
```

## Add a new payment mean credit card

`POST /1.0/me/paymentMean/creditCard`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-creditcard

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/create`

### Request body (required)

Type: `me.paymentMean.CreditCardCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Custom description of this account |
| `returnUrl` | string |  | Callback URL where the customer will be redirected to after validation |
| `setDefault` | boolean |  | Set as default payment mean once validated |

```json
{
  "description": "string",
  "returnUrl": "string",
  "setDefault": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.CreditCardValidation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only |  |
| `submitUrl` | string | read-only |  |
| `url` | string | read-only | URL where redirect for registration process |
| `validationType` | me.paymentMean.ValidationTypeEnum | read-only | Kind of registration validation — one of `creditAccount`, `documentToSend`, `simpleValidation` |

```json
{
  "id": 0,
  "submitUrl": "string",
  "url": "string",
  "validationType": "creditAccount"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.CreditCardCreation
result = client.post("/me/paymentMean/creditCard",
	description = None, # Custom description of this account (type: string, nullable)
	returnUrl = None, # Callback URL where the customer will be redirected to after validation (type: string, nullable)
	setDefault = None, # Set as default payment mean once validated (type: boolean, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.CreditCardCreation
$result = $ovh->post("/me/paymentMean/creditCard", array(
	description => null, // Custom description of this account (type: string, nullable)
	returnUrl => null, // Callback URL where the customer will be redirected to after validation (type: string, nullable)
	setDefault => null, // Set as default payment mean once validated (type: boolean, nullable)
));

print_r($result);
?>
```

## Get credit card properties

`GET /1.0/me/paymentMean/creditCard/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-creditcard-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.CreditCard | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `defaultPaymentMean` | boolean | read-only | This credit card is the default payment mean? |
| `description` | string |  | Custom description of this credit card |
| `expirationDate` | string (date) | read-only |  |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `number` | string | read-only | Credit card BIN |
| `state` | me.paymentMean.CreditCardStateEnum | read-only | Credit card state — one of `expired`, `tooManyFailures`, `valid` |
| `threeDsValidated` | boolean | read-only | True if this credit card has been registered with a successful 3DSecure challenge |
| `type` | string | read-only | Kind of credit card |

```json
{
  "defaultPaymentMean": true,
  "description": "string",
  "expirationDate": "2024-01-01",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "id": 0,
  "number": "string",
  "state": "expired",
  "threeDsValidated": true,
  "type": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/creditCard/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/creditCard/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/me/paymentMean/creditCard/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#put-me-paymentmean-creditcard-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.CreditCard`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `defaultPaymentMean` | boolean | read-only | This credit card is the default payment mean? |
| `description` | string |  | Custom description of this credit card |
| `expirationDate` | string (date) | read-only |  |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `number` | string | read-only | Credit card BIN |
| `state` | me.paymentMean.CreditCardStateEnum | read-only | Credit card state — one of `expired`, `tooManyFailures`, `valid` |
| `threeDsValidated` | boolean | read-only | True if this credit card has been registered with a successful 3DSecure challenge |
| `type` | string | read-only | Kind of credit card |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.CreditCard
result = client.put("/me/paymentMean/creditCard/{id}",
	description = None, # Custom description of this credit card (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.CreditCard
$result = $ovh->put("/me/paymentMean/creditCard/{id}", array(
	description => null, // Custom description of this credit card (type: string, nullable)
));

print_r($result);
?>
```

## Disable payment through this credit card

`DELETE /1.0/me/paymentMean/creditCard/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#delete-me-paymentmean-creditcard-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/paymentMean/creditCard/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/paymentMean/creditCard/{id}");

print_r($result);
?>
```

## Challenge your credit card

`POST /1.0/me/paymentMean/creditCard/{id}/challenge`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-creditcard-id-challenge

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/challenge`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.CreditCardChallengeCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `challenge` | string | yes | Payload to answer the challenge |

```json
{
  "challenge": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard/{id}/challenge" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.CreditCardChallengeCreation
result = client.post("/me/paymentMean/creditCard/{id}/challenge",
	challenge = None, # Payload to answer the challenge (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.CreditCardChallengeCreation
$result = $ovh->post("/me/paymentMean/creditCard/{id}/challenge", array(
	challenge => null, // Payload to answer the challenge (type: string)
));

print_r($result);
?>
```

## Choose this credit card as your default payment mean. Will cancel the previous choice.

`POST /1.0/me/paymentMean/creditCard/{id}/chooseAsDefaultPaymentMean`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-creditcard-id-chooseasdefaultpaymentmean

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/creditCard/chooseAsDefaultPaymentMean`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/creditCard/{id}/chooseAsDefaultPaymentMean" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/paymentMean/creditCard/{id}/chooseAsDefaultPaymentMean")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/paymentMean/creditCard/{id}/chooseAsDefaultPaymentMean");

print_r($result);
?>
```

## List of payment mean deferred accounts

`GET /1.0/me/paymentMean/deferredPaymentAccount`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-deferredpaymentaccount

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/paymentMean/deferredPaymentAccount/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/deferredPaymentAccount" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/deferredPaymentAccount")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/deferredPaymentAccount");

print_r($result);
?>
```

## Get this object properties

`GET /1.0/me/paymentMean/deferredPaymentAccount/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-deferredpaymentaccount-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/paymentMean/deferredPaymentAccount/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.Deferred | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date of this deferred account |
| `defaultPaymentMean` | boolean | read-only | This deferred account is the default payment mean? |
| `description` | string |  | Custom description of this deferred account |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `label` | string | read-only | Deferred account type |
| `state` | me.paymentMean.DeferredStateEnum | read-only | Deferred account state — one of `failed`, `valid` |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "defaultPaymentMean": true,
  "description": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "id": 0,
  "label": "string",
  "state": "failed"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/deferredPaymentAccount/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/deferredPaymentAccount/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/deferredPaymentAccount/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/me/paymentMean/deferredPaymentAccount/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#put-me-paymentmean-deferredpaymentaccount-id

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/paymentMean/deferredPaymentAccount/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.Deferred`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Creation date of this deferred account |
| `defaultPaymentMean` | boolean | read-only | This deferred account is the default payment mean? |
| `description` | string |  | Custom description of this deferred account |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `label` | string | read-only | Deferred account type |
| `state` | me.paymentMean.DeferredStateEnum | read-only | Deferred account state — one of `failed`, `valid` |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/deferredPaymentAccount/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.Deferred
result = client.put("/me/paymentMean/deferredPaymentAccount/{id}",
	description = None, # Custom description of this deferred account (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.Deferred
$result = $ovh->put("/me/paymentMean/deferredPaymentAccount/{id}", array(
	description => null, // Custom description of this deferred account (type: string, nullable)
));

print_r($result);
?>
```

## Choose this deferred account as your default payment mean. Will cancel the previous choice.

`POST /1.0/me/paymentMean/deferredPaymentAccount/{id}/chooseAsDefaultPaymentMean`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-deferredpaymentaccount-id-chooseasdefaultpaymentmean

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/paymentMean/deferredPaymentAccount/chooseAsDefaultPaymentMean`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/deferredPaymentAccount/{id}/chooseAsDefaultPaymentMean" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/paymentMean/deferredPaymentAccount/{id}/chooseAsDefaultPaymentMean")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/paymentMean/deferredPaymentAccount/{id}/chooseAsDefaultPaymentMean");

print_r($result);
?>
```

## List of payment mean paypals

`GET /1.0/me/paymentMean/paypal`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-paypal

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/paypal")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/paypal");

print_r($result);
?>
```

## Add a new payment mean paypal

`POST /1.0/me/paymentMean/paypal`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-paypal

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/create`

### Request body (required)

Type: `me.paymentMean.PaypalCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Custom description of this account |
| `returnUrl` | string |  | Callback URL where the customer will be redirected to after validation |
| `setDefault` | boolean |  | Set as default payment mean once validated |

```json
{
  "description": "string",
  "returnUrl": "string",
  "setDefault": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.PaypalValidation | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | read-only |  |
| `submitUrl` | string | read-only |  |
| `url` | string | read-only | URL where redirect for registration process |
| `validationType` | me.paymentMean.ValidationTypeEnum | read-only | Kind of registration validation — one of `creditAccount`, `documentToSend`, `simpleValidation` |

```json
{
  "id": 0,
  "submitUrl": "string",
  "url": "string",
  "validationType": "creditAccount"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.PaypalCreation
result = client.post("/me/paymentMean/paypal",
	description = None, # Custom description of this account (type: string, nullable)
	returnUrl = None, # Callback URL where the customer will be redirected to after validation (type: string, nullable)
	setDefault = None, # Set as default payment mean once validated (type: boolean, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.PaypalCreation
$result = $ovh->post("/me/paymentMean/paypal", array(
	description => null, // Custom description of this account (type: string, nullable)
	returnUrl => null, // Callback URL where the customer will be redirected to after validation (type: string, nullable)
	setDefault => null, // Set as default payment mean once validated (type: boolean, nullable)
));

print_r($result);
?>
```

## Get paypal properties

`GET /1.0/me/paymentMean/paypal/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#get-me-paymentmean-paypal-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | me.paymentMean.Paypal | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agreementId` | string | read-only | Paypal agreement |
| `creationDate` | string (date-time) | read-only | Paypal creation date |
| `defaultPaymentMean` | boolean | read-only | This paypal is the default payment mean? |
| `description` | string |  | Custom description of this paypal |
| `email` | string | read-only | Paypal associated email |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `state` | me.paymentMean.PaypalStateEnum | read-only | Paypal state — one of `failing`, `tooManyFailures`, `valid` |

```json
{
  "agreementId": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "defaultPaymentMean": true,
  "description": "string",
  "email": "string",
  "icon": {
    "data": "string",
    "name": "string",
    "url": "string"
  },
  "id": 0,
  "state": "failing"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/paymentMean/paypal/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/paymentMean/paypal/{id}");

print_r($result);
?>
```

## Alter this object properties

`PUT /1.0/me/paymentMean/paypal/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#put-me-paymentmean-paypal-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.Paypal`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agreementId` | string | read-only | Paypal agreement |
| `creationDate` | string (date-time) | read-only | Paypal creation date |
| `defaultPaymentMean` | boolean | read-only | This paypal is the default payment mean? |
| `description` | string |  | Custom description of this paypal |
| `email` | string | read-only | Paypal associated email |
| `icon` | me.paymentMean.IconData | read-only | Payment method type icon |
| `icon.data` | string | read-only | Icon in base64 |
| `icon.name` | string | read-only | Icon name |
| `icon.url` | string | read-only | Icon URL |
| `id` | integer | read-only |  |
| `state` | me.paymentMean.PaypalStateEnum | read-only | Paypal state — one of `failing`, `tooManyFailures`, `valid` |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.Paypal
result = client.put("/me/paymentMean/paypal/{id}",
	description = None, # Custom description of this paypal (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.Paypal
$result = $ovh->put("/me/paymentMean/paypal/{id}", array(
	description => null, // Custom description of this paypal (type: string, nullable)
));

print_r($result);
?>
```

## Disable payment through this paypal

`DELETE /1.0/me/paymentMean/paypal/{id}`

Link: https://developers.eu.ovhcloud.com/reference/payment/#delete-me-paymentmean-paypal-id

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal/{id}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/paymentMean/paypal/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/paymentMean/paypal/{id}");

print_r($result);
?>
```

## Challenge your paypal

`POST /1.0/me/paymentMean/paypal/{id}/challenge`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-paypal-id-challenge

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/challenge`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Request body (required)

Type: `me.paymentMean.PaypalChallengeCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `challenge` | string | yes | Payload to answer the challenge |

```json
{
  "challenge": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal/{id}/challenge" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: me.paymentMean.PaypalChallengeCreation
result = client.post("/me/paymentMean/paypal/{id}/challenge",
	challenge = None, # Payload to answer the challenge (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: me.paymentMean.PaypalChallengeCreation
$result = $ovh->post("/me/paymentMean/paypal/{id}/challenge", array(
	challenge => null, // Payload to answer the challenge (type: string)
));

print_r($result);
?>
```

## Choose this paypal as your default payment mean. Will cancel the previous choice.

`POST /1.0/me/paymentMean/paypal/{id}/chooseAsDefaultPaymentMean`

Link: https://developers.eu.ovhcloud.com/reference/payment/#post-me-paymentmean-paypal-id-chooseasdefaultpaymentmean

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-03-07, removed on 2023-09-07; use `/me/payment/method` instead.  
**IAM actions:** `account:apiovh:me/paymentMean/paypal/chooseAsDefaultPaymentMean`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/paymentMean/paypal/{id}/chooseAsDefaultPaymentMean" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/me/paymentMean/paypal/{id}/chooseAsDefaultPaymentMean")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/me/paymentMean/paypal/{id}/chooseAsDefaultPaymentMean");

print_r($result);
?>
```
