Related Documents
Document Properties
Kbid283Q18
Last Modified23-Jun-2020
Added to KB21-Jun-2017
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.9
  • ICM 7.10

REST API - Get return-URLs from REST client for payment provider redirect (redirect before checkout)


Note

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

URI

/baskets/<basket-id>/payments/<payment-id>/redirect

Http Method

PUT

Short Description

REST client delivers the return URLs to the system

Query Parameters

  • successURL
  • failURL
  • cancelURL
  • redirectType

Example Requests

/baskets/5B0KAB17NC8AAAFGWzgd6nBq/payments/XrUKAB17fbUAAAFG6DEd6nBs/redirect

HTTP Status Codes

  • 201 created
  • 400 bad request
  • 401 unauthorized
  • 403 forbidden
  • 404 not found

Description

The REST client sends the return URLs to the system, so that the redirect URL for the payment service provider can be created. This redirect URL will be send as response to the REST client so that the client can process the redirect action. After that, the user will be redirected back to his REST client based on the return URLs.

Cartridge

app_sf_rest
ApplicationB2C Web Shop, SMB Web Shop
Access Restrictions

Requires authentication with user having assigned the following permissions:

  • Purchase (APP_B2B_PURCHASE, only in B2B applications)

Product Version

7.9

Product To Version

 

Status

final

JSON

Request data format

application/json

Request related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketPaymentRedirectResource

Request data example

{
"redirectType": "checkout",
"successURL" : "http://www.intershop.de/",
"failURL" : "http://www.intershop.de/",
"cancelURL" : "http://www.intershop.de/"
}

Response data format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketPaymentRedirectResource

Response data example

{
    "type": "Link",
    "uri": "http://jdevbuilddemo02.rnd.j.intershop.de:8080/INTERSHOP/web/WFS/PrimeTech-PrimeTechSpecials-Site/de_CH/b2c-web-shop/CHF/ISHPayRedirect-3DSecure;pgid=5smA4mVY3xhpDFzLs4EvJmGp0000wqUO6Qpi;sid=wgoKAB173IYAAAFGA8Ad6nBw?failURL=www.intershop.de&amount=%24+168.27&cancelURL=www.intershop.de&card_type=Visa&card_number=4111111111111111&merchant=0815&successURL=www.intershop.de&BasketUUID=5B0KAB17NC8AAAFGWzgd6nBq&password=intershop&basket_id=-¤cy=USD"
}

XML

Request data format

text/xml

Request related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketPaymentRedirectResource

Request data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PaymentRedirect type="PaymentRedirectRO">
    <cancelURL>http://www.intershop.de/</cancelURL>
    <failURL>http://www.intershop.de/</failURL>
    <successURL>http://www.intershop.de/</successURL>
</PaymentRedirect>

Response data format

text/xml

Response related java object

com.intershop.sellside.rest.common.capi.resource.basket.BasketPaymentRedirectResource

Response data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
  <uri>http://jdevbuilddemo02.rnd.j.intershop.de:8080/INTERSHOP/web/WFS/PrimeTech-PrimeTechSpecials-Site/de_CH/b2c-web-shop/CHF/ISHPayRedirect-3DSecure;pgid=5smA4mVY3xhpDFzLs4EvJmGp0000FpNIMpy6;sid=_dsKAB17vSQAAAFG1SUd6nB0?failURL=www.intershop.de&amp;amount=%24+168.27&amp;cancelURL=www.intershop.de&amp;card_type=Visa&amp;card_number=4111111111111111&amp;merchant=0815&amp;successURL=www.intershop.de&amp;BasketUUID=5B0KAB17NC8AAAFGWzgd6nBq&amp;password=intershop&amp;basket_id=-&amp;currency=USD</uri>
</Link>

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
Support Tickets