> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getPaymentMethodResource

Call this method to retrieve resources for a given `paymentMethodType`.

```typescript TYPESCRIPT theme={"dark"}
async getPaymentMethodResource(paymentMethodType: string): Promise<Resource>
```

## Parameters

**Parameters**

**paymentMethodType** `String` *required*

The payment method type to return a resource for

## Returns

**Returns**

**Promise**

**Resource**

**AssetResource**

**paymentMethodType** `string` *required*

A unique string identifier for the payment method. Supported payment methods for current client session are returned in `onAvailablePaymentMethodLoad` callback.

**paymentMethodName** `string` *required*

A user friendly English localized string identifier for the payment method

**paymentMethodLogo** `object`

**colored?** `string`

**dark?** `string`

**light?** `string`

**paymentMethodBackgroundColor** `object`

**colored?** `string`

**dark?** `string`

**light?** `string`

**NativeViewResource**

**paymentMethodType** `string` *required*

A unique string identifier for the payment method. Supported payment methods for current client session are returned in `onAvailablePaymentMethodLoad` callback.

**paymentMethodName** `string` *required*

A user friendly English localized string identifier for the payment method.

**nativeViewName** `string` *required*

The name of the native view. Pass this to NativeResourceView when rendering.

```typescript TYPESCRIPT theme={"dark"}
<NativeResourceView
  onPress={() => {
    // Handle tap
  }}
  nativeViewName={nativeViewResource.nativeViewName}
  style={{
    marginHorizontal: 20,
    marginVertical: 8,
    justifyContent: "center",
    alignItems: "center",
  }}
/>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.