---
schema_version: "1"
id: 2ac9d85dabbf986320b9c77c60d8841d38b7e9cb73e7e4561e3cea97a3bbcaeb
title: "Example: Create a Saved Payment Method for Alternative Payment Method"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-comm-spm-client-side-example-for-bankorapm.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-spm-client-side-example-for-bankorapm.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9497b5dcb429011666de111a5bcbfbba2383b183a8ef08f3533f3cbdf7c1c377
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Example: Create a Saved Payment Method for Alternative Payment Method

Create Saved Payment Methods for bank or alternative payment methods in one of two ways:

- Salesforce-Supported Types: Use supported types, such as `sepa_debit`, `bancontact`, `ideal`, `us_bank_account` (ACH), `bacs_debit`, and `au_becs_debit`

  Or

- Extended Payment Method Types: If the `type` isn’t supported by Salesforce, set `type` to `extd_apm_type` and provide the exact payment method type recognized by your payment gateway in the `extendedPaymentMethodType` field.

**note:** The `ExtendedPaymentMethodType` field and extended types (`extd_apm_type`, `extd_wallet`) are supported only for third-party gateways.

**Sample JSON request**

```json
{
  "merchantAccountId": "8zbSM0000000EkXYAU",
  "referenceOwnerId": "001SM00000GPtUqYAL",
  "paymentGatewayId": "0b0SM0000002nsfYAA",
  "status": "Active",
  "usageType": "OFFSESSION",
  "name": "AmazonPay...001",
  "gatewayReference": "cus_TS4IZLLrrbsYce",
  "gatewayToken": "pm_1SVA9qIQmmvzCzdJsQb2fogA",
  "last4": "1234",
  "type": "extd_apm_type",
  "checksum": "UNIQUE_GATEWAY_HASH_Wallet_1090901",
  "extendedPaymentMethodType": "klarna"
}
```

**Sample JSON response**

```json
{
  "id": "12qSM000000qKx7YAE",
  "success": true,
  "errors": []
}
```
