{ ... gatewayType: "BLC_STORE_CREDIT", type: "STORE_CREDIT", paymentMethodProperties: { "CREDIT_ACCOUNT_NUMBER": accountNumber }, isSingleUsePaymentMethod: false, ... }
To execute the transactions with Store Credit via PaymentTransactionServices, we must first create a Payment in PaymentTransactionServices. These Payments are most commonly created during the payment stage of your checkout flow.
The credit account number is required to create the Store Credit Payment in PaymentTransactionServices.
To get the credit account number, send the GET
request to /api/credit-account/customers/${customerId}/store-credit-accounts
endpoint.
It returns the list of credit accounts. We currently only support 1 credit account per customer, so you can get the first from the response.
For example, response[0].accountNumber
.
Specify the accountNumber
from the response in the paymentMethodProperties
to create a Payment:
{ ... gatewayType: "BLC_STORE_CREDIT", type: "STORE_CREDIT", paymentMethodProperties: { "CREDIT_ACCOUNT_NUMBER": accountNumber }, isSingleUsePaymentMethod: false, ... }
Note
|
|