---
schema_version: "1"
id: ee4c18c16b454bb1a19a40d3de9285da5aeb33dabea09d855475db91b0157b4b
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-import-tokens-create-example-for-wallet.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-spm-import-tokens-create-example-for-wallet.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 14855f1cef1a59a309697d398b629c6fa9f44f179d3f27c402b7cd001e03e78b
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": []
}
```

Here’s a sample UI showing example records created for `extd_wallet`.
**note:** In this example, `ExtendedPaymentMethodType` is set to amazon_pay for testing. You can use any value not supported by Salesforce and customize your implementation as needed.

![Example of a saved payment method record for a wallet payment type showing field values and status](https://developer.salesforce.com/media/d2c-commerce/example_spm_wallet.png '{"class": "image-lg", "title": "Saved Payment Method for Wallet"}')
