POST v1/Customers/{customerId}/Payments
Replace payment methods from a customer profile
URI template
v1/Customers/{customerId}/PaymentsRequest Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| customerId |
The customer that we are updating the payments for |
globally unique identifier |
Required |
Body Parameters
InPayment object containing an account number, expiration date and a payment type
InPayment| Name | Description | Type | Additional information |
|---|---|---|---|
| AccountNumber | string |
Required |
|
| ExpirationDate | string |
Required |
|
| PaymentMethodType | CustomerPaymentMethodType |
Required |
Request Formats
application/json, text/json
Sample:
{
"AccountNumber": "sample string 1",
"ExpirationDate": "sample string 2",
"PaymentMethodType": 0
}
application/xml, text/xml
Sample:
<InPayment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound"> <AccountNumber>sample string 1</AccountNumber> <ExpirationDate>sample string 2</ExpirationDate> <PaymentMethodType>Amex</PaymentMethodType> </InPayment>
Response Information
Resource Description
Returns the account id of the payment method. Known internal errors are BadRequest and Error
globally unique identifierResponse Formats
application/json, text/json
Sample:
"8313d184-f7e5-409e-9fd6-18615f2dc128"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">8313d184-f7e5-409e-9fd6-18615f2dc128</guid>