# Get assigned payment method

get ` https://app.mk.io/api/v1/projects/:project_name/paymentMethod`

Returns the currently assigned payment method for this project.

RBAC Capability Required: `core.subscription.get`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Path parameters

project_name string Required

## Response

### 200 OK

metadata object [PaymentMethodMetadata](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodmetadata) Optional

Metadata.

Show 6 properties  
Hide 6 properties

- created string Optional format: date-time  
  The time when the resource was created
- createdBy string Optional format: uuid  
  ID of the user who created the resource
- createdByEmail string Optional  
  Email of the user who created the resource
- displayName string Optional  
  The display name of the resource
- id string Required format: uuid  
  The ID of the resource
- organizationId string or null Required format: uuid  
  The ID of the organization this Payment Method belongs to.

related object [PaymentMethodRelated](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodrelated) Optional

Related data.

Show 1 property  
Hide 1 property

- projects list of strings Required  
  List of project names which are billed using this payment method.

spec object Required

Specification.

Show 3 variants  
Hide 3 variants

Discriminated by `type`. Select one variant:

#### azure object [PaymentMethodAzureSpec](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodazurespec)

- allowedOrganizations list of strings or null Optional  
  If set, only these organization IDs are allowed to use this payment method.
- autoPurchaseBeamLicenses boolean Required  
  Specifies whether Beam usage should be billed through monthly charges (true) or by the minute (false).
- azureOfferId string or null Optional  
  The Azure offer ID.
- azurePlanName string or null Optional  
  The Azure plan name.
- azurePrivateOfferId string Optional format: uuid  
  The Partner Center private offer UUID. Present only for azure_private_offer payment methods.
- azureSaasSubscriptionAutoRenew boolean or null Optional
- azureSaasSubscriptionEnd string or null Optional
- azureSaasSubscriptionId string or null Optional
- azureSaasSubscriptionName string or null Optional
- azureSaasSubscriptionStart string or null Optional
- azureSaasSubscriptionStatus string or null Optional
- endDate string or null Required format: date  
  The date this payment method expires, in yyyy-mm-dd format. It is not valid on this day. If not set, this payment method never expires. If startDate is also set, endDate must be after startDate.
- notes string Optional <=256 characters  
  Note to the customer.
- productPublicationName string Required  
  The name of the product publication that details the pricing for this payment method.
- startDate string or null Required format: date  
  The date this payment method becomes eligible to be active, in yyyy-mm-dd format. It is valid on this day. If not set, there is no lower bound. If both startDate and endDate are set, endDate must be after startDate.
- type string Required  
  Payment method type. Defaults to `direct` if not specified.

#### aws object [PaymentMethodAWSSpec](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodawsspec)

- allowedOrganizations list of strings or null Optional  
  If set, only these organization IDs are allowed to use this payment method.
- autoPurchaseBeamLicenses boolean Required  
  Specifies whether Beam usage should be billed through monthly charges (true) or by the minute (false).
- awsAccountId string Optional
- awsCustomerId string or null Optional  
  Unique AWS account identifier specific to AWS SaaS Marketplace.
- awsOfferId string Optional  
  Unique AWS private offer identifier.
- awsProductCode string Optional  
  The MK.IO product code in the AWS SaaS Marketplace.
- awsStatus string or null Optional
- endDate string or null Required format: date  
  The date this payment method expires, in yyyy-mm-dd format. It is not valid on this day. If not set, this payment method never expires. If startDate is also set, endDate must be after startDate.
- notes string Optional <=256 characters  
  Note to the customer.
- productPublicationName string Required  
  The name of the product publication that details the pricing for this payment method.
- startDate string or null Required format: date  
  The date this payment method becomes eligible to be active, in yyyy-mm-dd format. It is valid on this day. If not set, there is no lower bound. If both startDate and endDate are set, endDate must be after startDate.
- type string Required  
  Payment method type. Defaults to `direct` if not specified.

#### direct object [PaymentMethodDirectSpec](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethoddirectspec)

- allowedOrganizations list of strings or null Optional  
  If set, only these organization IDs are allowed to use this payment method.
- autoPurchaseBeamLicenses boolean Required  
  Specifies whether Beam usage should be billed through monthly charges (true) or by the minute (false).
- endDate string or null Required format: date  
  The date this payment method expires, in yyyy-mm-dd format. It is not valid on this day. If not set, this payment method never expires. If startDate is also set, endDate must be after startDate.
- notes string Optional <=256 characters  
  Note to the customer.
- productPublicationName string Required  
  The name of the product publication that details the pricing for this payment method.
- redeemedBy string or null Optional  
  The email of the user who redeemed this sales order.
- salesOrderNumber string Optional  
  The document number from NetSuite, SOxxx
- startDate string or null Required format: date  
  The date this payment method becomes eligible to be active, in yyyy-mm-dd format. It is valid on this day. If not set, there is no lower bound. If both startDate and endDate are set, endDate must be after startDate.
- status string Optional  
  The status of the purchase order in MediaKind's systems.
- type string Required  
  Payment method type. Defaults to `direct` if not specified.

### status object [PaymentMethodStatus](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodstatus) Optional

- isActive boolean Required  
  Is payment method active
- termsAndConditionsAccepted boolean Required  
  Whether the Terms & Conditions of this payment method have been accepted.

## Errors

### 400 Bad Request

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

- code string Required  
  The error code.
- detail string Required  
  The error message.
- extraDetail map from strings to any Optional  
  Extra information regarding this error.

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code

### 401 Unauthorized

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code

### 403 Forbidden

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code

### 404 Not Found

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code

### 429 Too Many Requests

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code

### 500 Internal Server Error

error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

Pertinent information about the error

Show 3 properties  
Hide 3 properties

Show value schema  
Hide value schema

`[any key]` any
- ref string Required  
  A reference to the request that caused the error.
- status integer Required  
  The HTTP status code
