order APIv1_beta.13.0

updateGuestPaymentInfo

POST
/guest_checkout_session/{checkoutSessionId}/update_payment_info

This method changes the payment method information of the specified guest checkout session.

To meet security requirements for payments, the URLs for this method are:

  • Production URL: https://apix.ebay.com/buy/order/v1
  • Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1

Restrictions

For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.

Input

Resource URI (production)

POST https://apix.ebay.com/buy/order/v1/guest_checkout_session/{checkoutSessionId}/update_payment_info

URI parameters

ParameterTypeDescription
checkoutSessionIdstringThe eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateGuestCheckoutSession method.

Note: When using this ID in this method, the X-EBAY-C-MARKETPLACE-ID value must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

This method also requires the following header:

X-EBAY-C-ENDUSERCTX with the risk correlation ID. This ID is generated during the PayPal library integration.
For example:
   X-EBAY-C-ENDUSERCTX: deviceId=riskCorrelationId

OAuth scope

This request requires an access token created with the client grant flow, using one scope from the following list:

https://api.ebay.com/oauth/api_scope/buy.guest.order

See OAuth access tokens for more information.

Input container/fieldTypeDescription
creditCardCreditCardContainer for the buyer's credit card information.

Occurrence: Optional

creditCard.accountHolderNamestringThe name of the card holder under which the credit card was issued.

Occurrence: Required

creditCard.billingAddressBillingAddressThe container that returns the billing address of the card holder.

Note: If the address cannot be validated, a warning message will be returned.

Occurrence: Required

creditCard.billingAddress.addressLine1stringThe first line of the street address.

Occurrence: Required

creditCard.billingAddress.addressLine2stringThe second line of the street address where the item is being shipped. This optional field can be used for information such as 'Suite Number' or 'Apt Number'.

Occurrence: Optional

creditCard.billingAddress.citystringThe city of the address.

Occurrence: Required

creditCard.billingAddress.countryCountryCodeEnumThe two letter code representing the country of the address.

Occurrence: Required

creditCard.billingAddress.countystringThe county of the address.

Occurrence: Optional

creditCard.billingAddress.firstNamestringThe buyer's first name.

Occurrence: Required

creditCard.billingAddress.lastNamestringThe buyer's last name.

Occurrence: Required

creditCard.billingAddress.postalCodestringThe postal code of the address.

Occurrence: Required

creditCard.billingAddress.stateOrProvincestringThe state or province of the address.

Occurrence: Optional

creditCard.brandstringThe type of the credit card.

Valid Values:
  • Visa
  • MasterCard
  • AmEx
  • Discover
Note: This value is not case sensitive.

Occurrence: Required

creditCard.cardNumberstringThe credit card number on the card.

Occurrence: Required

creditCard.cvvNumberstringThe Card Verification Value of the credit card. This value is also known as the card verification code (CVC) or card security code (CSC). This is a three-digit number on VISA®, MasterCard®, and Discover® branded credit and debit cards. On American Express® branded cards, this is a four-digit numeric code.

Note: This number is not the PIN associated with the card.

Occurrence: Required

creditCard.expireMonthintegerThe month the credit card expires.

Occurrence: Required

creditCard.expireYearintegerThe year the credit card expires.

Occurrence: Required

walletWalletThe container that returns the wallet payment token.

Occurrence: Optional

wallet.paymentTokenstringThis token is a payment nonce. A payment method nonce is a secure, one-time-use reference to payment information. It's the key element that allows your server to communicate sensitive payment information to the payment processor server without ever touching the raw data. The nonce is generated by the payment processor.

Occurrence: Optional

Output

HTTP response headers

{ /* GuestCheckoutSessionResponse */ }
Output container/fieldTypeDescription
acceptedPaymentMethodsarray of PaymentMethodThe container that returns the payment method that can be used to purchase the items.

Occurrence: Always

acceptedPaymentMethods.labelstringText indicating the payment type. For example, when paying by credit card, this label will be CC . When paying using PayPal Smart Button guest payment flow the label will be WALLET.

Occurrence: Always

acceptedPaymentMethods.logoImageImageThe URL of the image of the payment method logo.

Occurrence: Conditional

acceptedPaymentMethods.logoImage.heightinteger Reserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.logoImage.imageUrlstringThe URL of the image.

Occurrence: Always

acceptedPaymentMethods.logoImage.widthinteger Reserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodBrandsarray of PaymentMethodBrandAn array of credit card brands that can be used as the payment method.

Occurrence: Always

acceptedPaymentMethods.paymentMethodBrands.logoImageImageThe URL of the image of the payment method company (brand).

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodBrands.logoImage.heightinteger Reserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodBrands.logoImage.imageUrlstringThe URL of the image.

Occurrence: Always

acceptedPaymentMethods.paymentMethodBrands.logoImage.widthinteger Reserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodBrands.paymentMethodBrandTypePaymentMethodBrandEnumAn enumeration value that indicates the payment method company, such as Visa.

Occurrence: Always

acceptedPaymentMethods.paymentMethodMessagesarray of PaymentMethodMessageThe type that defines the fields for legal messages and buyer consent verification.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodMessages.legalMessagestringInformation that eBay is legally obligated to show to the buyer. This field can be null, in which case do nothing. But if this field is not null, the value of this field must appear on the checkout page.

Note: This field is not used for US purchases.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodMessages.privacyPolicyWebUrlstringReserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodMessages.requiredForUserConfirmationbooleanReserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodMessages.userAgreementWebUrlstringReserved for future use.

Occurrence: Conditional

acceptedPaymentMethods.paymentMethodTypePaymentMethodTypeEnumAn enumeration value that indicates the method of payment, such as credit card.

Occurrence: Always

appliedCouponsarray of CouponThe container that returns the information for the coupons that were applied in the checkout session.

Occurrence: Conditional

appliedCoupons.redemptionCodestringThe coupon redemption code.

Occurrence: Conditional

checkoutSessionIdstringThe checkoutSessionId submitted in the request.

Occurrence: Always

expirationDatestringThe time the checkout session will end. To purchase the items the order must be placed before this time.

Occurrence: Always

lineItemsarray of LineItemAn array of line items associated with the checkout session.

Occurrence: Always

lineItems.baseUnitPriceAmountThe cost (Buy It Now price) of a single item in this line item. It is a starting point for computing the price during checkout session.

Occurrence: Always

lineItems.baseUnitPrice.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

lineItems.baseUnitPrice.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

lineItems.imageImageAn eBay-assigned URL that points to an image of the item. eBay assigns the URL when the seller uploads the image.

Occurrence: Always

lineItems.image.heightinteger Reserved for future use.

Occurrence: Conditional

lineItems.image.imageUrlstringThe URL of the image.

Occurrence: Always

lineItems.image.widthinteger Reserved for future use.

Occurrence: Conditional

lineItems.itemIdstringA unique eBay-assigned ID value that identifies the item.

Occurrence: Always

lineItems.lineItemIdstringA unique eBay-assigned ID value that identifies the line item in a checkout session.

Occurrence: Always

lineItems.netPriceAmountThe total cost for the items in this line item taking into account the quantity and applying any seller item discounts, such as Buy 1 Get 1.

Note: This also does not include any shipping discounts, shipping costs, fees, or seller adjustments.

Occurrence: Always

lineItems.netPrice.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

lineItems.netPrice.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

lineItems.promotionsarray of PromotionAn array of promotions associated with the item of this line item.

Occurrence: Conditional

lineItems.promotions.discountAmountThe container that returns the monetary value of the promotional discount.

Note: eBay Bucks are not supported.

Occurrence: Always

lineItems.promotions.discount.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

lineItems.promotions.discount.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

lineItems.promotions.discountPercentagestringThe discount percentage of the applied promotional offer.

Occurrence: Conditional

lineItems.promotions.messagestringThe text for the promotion title which is displayed on the page. For example, Buy 1 Get 1.

Occurrence: Always

lineItems.promotions.promotionCodestringAn identifier of the promotion that was generated by the system when the promotion was created.

Occurrence: Always

lineItems.promotions.promotionTypestringThe value of the enumeration used when the promotions was created, which indicates the promotion type. For example, SellerDiscountedPromotionalOffer or COUPON.

Occurrence: Always

lineItems.quantityintegerThe number of individual items ordered for this line item, as specified by the buyer.

Occurrence: Always

lineItems.sellerSellerThe container that returns the information about the seller, such as their eBay user name.

Occurrence: Always

lineItems.seller.feedbackPercentagestringThe percentage of the total positive feedback.

Occurrence: Always

lineItems.seller.feedbackScoreintegerThe feedback score of the seller. This value is based on the ratings from eBay members that bought items from this seller.

Occurrence: Always

lineItems.seller.sellerAccountTypestringIndicates if the seller is a business or an individual. This is determined when the seller registers with eBay. If they register for a business account, this value will be BUSINESS. If they register for a private account, this value will be INDIVIDUAL. This designation is required by the tax laws in some countries.

This field is returned only on the following sites.

EBAY_AT    EBAY_BE    EBAY_CH    EBAY_DE    EBAY_ES    EBAY_FR    EBAY_GB    EBAY_IE     EBAY_IT    EBAY_PL

Valid values:
  • BUSINESS
  • INDIVIDUAL
Code so that your app gracefully handles any future changes to this list.

Occurrence: Conditional

lineItems.seller.usernamestringThe user name created by the seller for use on eBay.

Occurrence: Conditional

lineItems.shippingOptionsarray of ShippingOptionAn array of the shipping methods that are available for the line item. By default, the first one will be selected.

Occurrence: Always

lineItems.shippingOptions.baseDeliveryCostAmountThe shipping cost using this shipping option for this line item before any shipping discounts.

Occurrence: Always

lineItems.shippingOptions.baseDeliveryCost.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

lineItems.shippingOptions.baseDeliveryCost.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

lineItems.shippingOptions.deliveryDiscountAmountThe monetary value of any delivery discount.

Occurrence: Always

lineItems.shippingOptions.deliveryDiscount.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

lineItems.shippingOptions.deliveryDiscount.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

lineItems.shippingOptions.maxEstimatedDeliveryDatestringThe end of the date range in which the purchase order is expected to be delivered to the shipping address.

Occurrence: Always

lineItems.shippingOptions.minEstimatedDeliveryDatestringThe beginning of the date range in which the purchase order is expected to be delivered to the shipping address.

Occurrence: Always

lineItems.shippingOptions.selectedbooleanIndicates if the shipping method is selected.

Occurrence: Always

lineItems.shippingOptions.shippingCarrierCodestringThe shipping provider, such as FedEx, or USPS for the line item.

Occurrence: Always

lineItems.shippingOptions.shippingOptionIdstringA unique ID for the selected shipping option/method.

Occurrence: Always

lineItems.shippingOptions.shippingServiceCodestringA name of a shipping type. For example, Priority Mail Express (provided by USPS) or FedEx International Priority (Provided by FedEx).

Occurrence: Always

lineItems.shortDescriptionstringThis text string is derived from the item condition and the item aspects (such as size, color, capacity, model, brand, etc.).

Occurrence: Always

lineItems.titlestringThe seller created title of the item.

Occurrence: Always

marketingMessagesarray of MarketingMessageThe container that returns the marketing consent fields. These fields show the legal marketing consent message to be shown to the buyer when they place the order, and the marketing channels, for example email, and marketing types, for example promotions, the buyer can choose to receive.

Occurrence: Conditional

marketingMessages.legalMessagestringThis field returns the following marketing consent legal message. This message is to be shown to the buyer when they place the order.

I agree to receive marketing offers, promotions, and surveys from eBay through emails.

Occurrence: Conditional

marketingMessages.marketingChannelsarray of MarketingChannelEnumA list of enumeration values representing the marketing channels, such as email, that the buyer can choose to receive. These are to be shown to the buyer when they place the order.

Occurrence: Conditional

marketingMessages.marketingTypesarray of MarketingTypeEnumA list of enumeration values representing the marketing types, such as OFFER, that the buyer can choose to receive. These are to be shown to the buyer when they place the order.

Occurrence: Conditional

pricingSummaryPricingSummaryThe container that returns the grand total, costs, discounts, seller fees, and adjustments of all the line items.

Occurrence: Always

pricingSummary.additionalSavingsAmountThe total amount of the coupon discounts in the purchase order.

Occurrence: Conditional

pricingSummary.additionalSavings.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.additionalSavings.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.adjustmentAdjustmentThe total amount of any seller adjustments. An adjustment can be a credit or debit. This is used to catch any monetary changes to the order that are not already captured in one of the other fields.

Occurrence: Always

pricingSummary.adjustment.amountAmountThe container that returns the amount and currency of an adjustment.

Occurrence: Always

pricingSummary.adjustment.amount.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.adjustment.amount.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.adjustment.labelstringText indicating what the adjustment was for.

Occurrence: Always

pricingSummary.deliveryCostAmountThe shipping cost for all the line items before any shipping discounts are applied.

Let's say there were 4 line items and the shipping cost for each line items is $5. One of the line items qualifies for free shipping and two line items qualify for a Buy 1 Get 1 offer, which would be a $6 and a $15 discount. The deliveryCost value would be 20, which is the total cost for shipping all the line items before discounts.

Occurrence: Always

pricingSummary.deliveryCost.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.deliveryCost.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.deliveryDiscountAmountThe total amount of the shipping discounts for the all line items, which include promotional shipping discounts, such as free shipping if you buy two or more.

Let's say there were 4 line items and the shipping cost for each line items is $5. One of the line items qualifies for free shipping and two line items qualify for a Buy 1 Get 1 offer, which would be a $6 and a $15 discount. The deliveryDiscounts value would be 5, which is the value of the free shipping discount.

Note: This will always be a negative number.

Occurrence: Always

pricingSummary.deliveryDiscount.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.deliveryDiscount.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.feeAmountThe total amount of any fees for all the line items, such as a recycling fee.

Occurrence: Always

pricingSummary.fee.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.fee.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.priceDiscountAmountThe total amount of all the item specific discounts for all line items, such as Buy 1 Get 1 free.

Let's say there were 4 line items and the shipping cost for each line items is $5. One of the line items qualifies for free shipping and two line items qualify for a Buy 1 Get 1 offer, which would be a $6 and a $15 discount. The priceDiscount value would be 21, which is the total of the two Buy 1 Get 1 discounts.

Note: This will always be a negative number.

Occurrence: Always

pricingSummary.priceDiscount.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.priceDiscount.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.priceSubtotalAmountThe total amount for all the line items before adding in taxes and shipping costs, or applying discounts, fees, and adjustments.

Occurrence: Always

pricingSummary.priceSubtotal.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.priceSubtotal.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.taxAmountThe total amount of the taxes for all the line items.

Occurrence: Always

pricingSummary.tax.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.tax.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

pricingSummary.totalAmountThe total of the purchase order.

      total = priceSubtotal + baseDeliveryCost + taxes + deliveryDiscounts + priceDiscount + adjustments

Note: deliveryDiscounts and priceDiscount are negative numbers.

Occurrence: Always

pricingSummary.total.currencyCurrencyCodeEnumThe currency involved in a monetary transaction. Generally, this is the currency used by the country of eBay site offering the item.

Occurrence: Always

pricingSummary.total.valuestringThe dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the eBay site offering the item.

Occurrence: Always

providedPaymentInstrumentProvidedPaymentInstrumentThe container that returns the payment methods that can be used for the checkout. This is returned only if you have used the updatePaymentInfo method to change the payment method.

Occurrence: Conditional

providedPaymentInstrument.paymentInstrumentReferencePaymentInstrumentReferenceThe container that returns the payment reference, such as last four digits of a credit card.

Occurrence: Conditional

providedPaymentInstrument.paymentInstrumentReference.externalReferenceIdstringThe identifier of the buyer's PayPal cart, which is returned by the initiateGuestPayment method. This ID is generated by PayPal and required for the PayPal Smart Button guest payment flow.

Occurrence: Conditional

providedPaymentInstrument.paymentInstrumentReference.lastFourDigitForCreditCardstringThe last four digits of the credit card number being used to pay for the items.

Occurrence: Conditional

providedPaymentInstrument.paymentMethodBrandPaymentMethodBrandThe container that returns the name and logo of the payment company (brand), such as Visa.

Occurrence: Conditional

providedPaymentInstrument.paymentMethodBrand.logoImageImageThe URL of the image of the payment method company (brand).

Occurrence: Conditional

providedPaymentInstrument.paymentMethodBrand.logoImage.heightinteger Reserved for future use.

Occurrence: Conditional

providedPaymentInstrument.paymentMethodBrand.logoImage.imageUrlstringThe URL of the image.

Occurrence: Always

providedPaymentInstrument.paymentMethodBrand.logoImage.widthinteger Reserved for future use.

Occurrence: Conditional

providedPaymentInstrument.paymentMethodBrand.paymentMethodBrandTypePaymentMethodBrandEnumAn enumeration value that indicates the payment method company, such as Visa.

Occurrence: Always

providedPaymentInstrument.paymentMethodTypePaymentMethodTypeEnumAn enumeration value that indicates the method of payment, such as CREDIT_CARD.

Occurrence: Conditional

shippingAddressShippingAddressThe container that returns the address to which the purchase order will be shipped.

Note: If the address cannot be validated, a warning message is be returned along with the response.

Occurrence: Always

shippingAddress.addressLine1stringThe first line of the street address where the item is being shipped.

Occurrence: Always

shippingAddress.addressLine2stringThe second line of the street address where the item is being shipped. This optional field can be used for information such as 'Suite Number' or 'Apt Number'.

Occurrence: Conditional

shippingAddress.citystringThe city of the address where the item is being shipped.

Occurrence: Always

shippingAddress.countryCountryCodeEnumThe two letter code representing the country of the address.

Restrictions: Currently, the only country supported for a shipping address is US.

Occurrence: Always

shippingAddress.countystringThe county of the address where the item is being shipped.

Occurrence: Always

shippingAddress.phoneNumberstringThe phone number of the person receiving the package.

Occurrence: Always

shippingAddress.postalCodestringThe postal code of the address where the item is being shipped.

Occurrence: Always

shippingAddress.recipientstringThe name of the person receiving the package.

Occurrence: Always

shippingAddress.stateOrProvincestringThe state or province of the address where the item is being shipped.

Occurrence: Always

warningsarray of ErrorDetailV3An array of any process errors or warnings that were generated during the method processing.

Occurrence: Conditional

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
400Bad Request
403Access Forbidden
404Resource Not Found
409Conflict
500Internal Error

Error codes

CodeDomainCategoryMeaning
15000API_ORDERAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
15001API_ORDERREQUESTMissing field: {fieldName}. The indicated field is required for this request. Add the field and resubmit the call.
15002API_ORDERREQUESTInvalid field: {fieldName}. The indicated field contains an invalid value. Correct the value and resubmit the call.
15003API_ORDERREQUESTThe checkout session requested does not exist.
15015API_ORDERBUSINESSThere is a problem with the credit card and it cannot be used to purchase items. Use the updatePaymentInfo call to change the payment information.
15019API_ORDERBUSINESSTo place an order, you must have at least one line item. Use the initiateCheckoutSession call to add line items (maximum of 4) and create a new checkout session.
15021API_ORDERBUSINESSThis checkout session cannot be updated because the order has already been placed.
15022API_ORDERBUSINESSSome of the items cannot be purchased using a credit card and must be removed from the checkout session.
15025API_ORDERREQUESTThe App is not authorized to access this resource.
15027API_ORDERBUSINESSThe value {fieldValue} is not supported for the {fieldName}. The supported values are: {supportedValues}.
15029API_ORDERREQUESTThe X-EBAY-C-MARKETPLACE-ID value {fieldValue} is invalid for this checkout session because it is different from the X-EBAY-C-MARKETPLACE-ID header value used to create the session. For all calls in this checkout session, you must use X-EBAY-C-MARKETPLACE-ID {supportedValues}.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Add or Update Guest Payment Information

This call is used to add or update the buyer's payment information.

Input

The inputs are the checkoutSessionId as a URI parameter and the buyer's payment information in the payload.
POST
https://apix.ebay.com/buy/order/v1/guest_checkout_session/v1|5018578757|63iqkv_LQQy/update_payment_info

Output

The output contains the checkout session information. You can verify the payment information you submitted by checking the providedPaymentInstrument container. This container will have the payment type, the credit card brand, and the last for digits of the credit card number.

Sample 2: Update Checkout Session with Payer ID

This call updates the checkout session with the payer ID, which is returned by PayPal. See PayPal Checkout payment flow for guest checkouts for details.

Input

The inputs are the checkoutSessionId as a URI parameter and the payer ID in the wallet.paymentToken field in the payload.
POST
https://apix.ebay.com/buy/order/v1/guest_checkout_session/v1|100008009692071|XHpUNQlgTeC/update_payment_info

Output

The output contains the checkout session details. You can verify the payment information you submitted by checking the providedPaymentInstrument container. This container will have the payment type, which in this case is WALLET and the externalReferenceId, which was returned by the initiateGuestPayment call.