younifyd
Menu

Create Customer Payment Instrument

Create Customer Payment Instrument

POST/organizations/{organizationId}/customers/{customerId}/payment-instruments

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Create Customer Payment Instrument action (under Shopper Customers).
  3. Fill in the fields below, then reference the result from later steps as {{createCustomerPaymentInstrument.response.data}}.

Request

Path parameters

customerIdstringrequired

The customer ID.

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

Request body

Enter the body as JSON in the step's Body field.

bankRoutingNumberstring

The bank routing number.

giftCertificateCodestring

The gift certificate code.

paymentBankAccountany

The payment bank account request data.

paymentCardany

The customer payment card.

paymentMethodIdstring

The payment method ID. Optional if a customer payment instrument ID is specified.

defaultboolean

The default payment instrument.

json
{
  "bankRoutingNumber": "AB123",
  "giftCertificateCode": "gift-code",
  "paymentBankAccount": null,
  "paymentCard": null,
  "paymentMethodId": "Credit Card",
  "default": true
}

Response

Returns 200 with an object. Read it in later steps with {{createCustomerPaymentInstrument.response.data.<field>}}.

bankRoutingNumberstring

The bank routing number.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

maskedGiftCertificateCodestring

The masked gift certificate code.

paymentCardany

The payment card.

paymentInstrumentIdstring

The payment instrument ID.

paymentMethodIdstring

The payment method ID. Optional if a customer payment instrument ID is specified.

defaultboolean

The default payment instrument.

json
{
  "bankRoutingNumber": "KDSJHKS",
  "creationDate": 253402214400,
  "lastModified": 253402214400,
  "maskedGiftCertificateCode": "gift-code",
  "paymentCard": null,
  "paymentInstrumentId": "Personal",
  "paymentMethodId": "Personal",
  "default": true
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Create Customer Payment Instrument — Salesforce Commerce Cloud — Documentation