---
schema_version: "1"
id: 0202e8b1331884eaf9e507ad27b9411e443c76f2225e3bdc4460842bf628ef6d
title: "Example: Create Saved Payment Method for Wallet"
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-wallet.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-spm-client-side-example-for-wallet.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f94a9ae83a17255617414d7886751fd25771b1a0d10c843b7673f2ac00376cd7
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Example: Create Saved Payment Method for Wallet

Set the type field to `extd_wallet` and provide the exact wallet payment type expected by your payment gateway in the `extendedPaymentMethodType` field to create Saved Payment Method (SPM) for a wallet payment method.

**Sample JSON request**

```json
{
  "merchantAccountId": "8zbSM0000000F8jYAE",
  "referenceOwnerId": "001SM00000FwMhEYAV",
  "paymentGatewayId": "0b0SM0000002oLhYAI",
  "Status": "Active",
  "usageType": "OFFSESSION",
  "Name": "AmazonPay...001",
  "GatewayReference": "cus_TEGn3J3WI5onpb",
  "gatewayToken": "pm_1SHoagRO2MG01L0jLSbc4sdm",
  "last4": "1234",
  "type": "extd_wallet",
  "Checksum": "UNIQUE_GATEWAY_HASH_Wallet_10001",
  "ExtendedPaymentMethodType": "amazon_pay"
}
```

**Sample JSON response**

```json
{
  "id": "12qSM000000qfS6YAI",
  "success": true,
  "errors": []
}
```
