Related Documents
Document Properties
Kbid254B84
Last Modified23-Jun-2020
Added to KB13-Jan-2014
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Update payment from customer profile


Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

/customers/-/payments/<payment-id>

Http Method

PUT

Short Description

Updates a payment (with attributes) from customer profile

Query Parameters

none

Example Requests

/customers/-/payments/JF8KDgAbbaYAAAFDThqSqBAE

HTTP Status Codes

200 OK
400 Bad Request

Possible values for header 'error-key':

  • shopping_cart.payment.paymentdata.error (e.g. wrong giftcard number)
  • shopping_cart.payment.missing_fields.error
  • shopping_cart.payment.invalid_fields.error

401 Unauthorized

Description

Updates a payment (with attributes) from customer profile for the logged in user.
The request has to contain all attributes even if they are not changed.

Payments without further attributes can not be updated. 

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.4

Product To Version

 

Status

final

JSON

Request Data Format

application/json

Request related java object

com.intershop.sellside.rest.common.capi.resource.customer.payment.CustomerPaymentItemResource
com.intershop.sellside.rest.common.capi.resourceobject.basket.PaymentRO

Request Example

Example for gift cards:

{
	"name": "BPS_GIFT_CARD",
	"type": "Payment",
	"giftCardNumber": "11111111111",
	"giftCardPIN": "1111"
}

or

{
	"name": "BPS_DEBIT_TRANSFER",
	"type": "Payment",
	"accountNumber": "123456789",
	"accountHolder": "Patricia Miller",
	"bankCode": "83053030"
}

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.customer.payment.CustomerPaymentItemResource
com.intershop.sellside.rest.common.capi.resourceobject.basket.PaymentRO

Response Example

Example for gift cards:

{
    "name": "BPS_GIFT_CARD",
    "type": "Payment",
    "attributes": [
        {
            "name": "GiftCardNumber",
            "type": "String",
            "value": "11111111111"
        },
        {
            "name": "GiftCardPIN",
            "type": "String",
            "value": "1111"
        },
        {
            "name": "GiftCardType",
            "type": "String",
            "value": "PHYSICAL"
        },
        {
            "name": "GiftCardID",
            "type": "String",
            "value": "rfMKDgAb4QQAAAFClcidbNbm"
        }
    ]
}

Example for debit transfer account:

{
    "name": "BPS_DEBIT_TRANSFER",
    "type": "Payment",
    "attributes": [
        {
            "name": "AccountNumber",
            "type": "String",
            "value": "123456789"
        },
        {
            "name": "AccountHolder",
            "type": "String",
            "value": "Patricia Miller"
        },
        {
            "name": "BankCode",
            "type": "String",
            "value": "83053030"
        }
    ]
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.payment.CustomerPaymentItemResource
com.intershop.sellside.rest.common.capi.resourceobject.basket.PaymentRO

XML Request Example

<Payment name="BPS_GIFT_CARD" type="Payment">
	<giftCardNumber>11111111111</giftCardNumber>
	<giftCardPIN>1111</giftCardPIN>
</Payment>

or

<Payment name="BPS_DEBIT_TRANSFER" type="Payment">
	<accountNumber>123456789</accountNumber>
	<accountHolder>Patricia Miller</accountHolder>
	<bankCode>83053030</bankCode>
</Payment>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.payment.CustomerPaymentItemResource
com.intershop.sellside.rest.common.capi.resourceobject.basket.PaymentRO

XML Response Example

Example for gift cards:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payment name="BPS_GIFT_CARD" type="Payment">
    <attributes>
        <ResourceAttribute name="GiftCardNumber" type="String">
            <value>11111111111</value>
        </ResourceAttribute>
        <ResourceAttribute name="GiftCardPIN" type="String">
            <value>1111</value>
        </ResourceAttribute>
        <ResourceAttribute name="GiftCardType" type="String">
            <value>PHYSICAL</value>
        </ResourceAttribute>
        <ResourceAttribute name="GiftCardID" type="String">
            <value>rfMKDgAb4QQAAAFClcidbNbm</value>
        </ResourceAttribute>
    </attributes>
</Payment>

Example for debit transfer account:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payment name="BPS_DEBIT_TRANSFER" type="Payment">
    <attributes>
        <ResourceAttribute name="AccountNumber" type="String">
            <value>123456789</value>
        </ResourceAttribute>
        <ResourceAttribute name="AccountHolder" type="String">
            <value>Patricia Miller</value>
        </ResourceAttribute>
        <ResourceAttribute name="BankCode" type="String">
            <value>83053030</value>
        </ResourceAttribute>
    </attributes>
</Payment>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Tickets