Basket Payment API

The Basket Payments API will provide the ability to take payment for a basket. This service will interact with the payment portal directly using the details provided by the client and from what’s stored in the basket.

Basket Payments API Url: /baskets/{basketReference}/payments

Take Payment #

Allows a client to take payment for a basket. 

Service Url: /baskets/{basketReference}/payments

Tokens

basketReference – String – The basket reference of the basket to take payment with.

Request

ITakePaymentRequest extends BasketRetrievalRequest

amount – long – the amount to take payment for

currencyId – String – the id of the currency to take payment for

billingAddress – IAddressAndContact – the billing address

Response

WebPaymentRedirectResponse extends Payment Response

redirectUrl – String – the url of the payment gateway to redirect the client to

Remarks.

The service uses the client’s details for the amount, currency, and billing address and creates a payment transaction on the payment portal. A payment tender item is also added to the basket to keep track of the payment result. The service returns a Web Payment Redirect Response including information on the portal transaction and the redirect URL to the payment gateway to complete payment.

Example Request

{

“amount”: 11990,

“currencyId”: “GBP”,

“billingAddress”: {},

“returnUrl”: “http://0.0.0.0:8081/checkout/paymentTaken”

}

Example Response

Get Payment Status #

Allows a client to query to get the status of a payment. 

Service Url: /baskets/{basketReference}/payments/{paymentReference}/status

Tokens

basketReference – String – The basket reference of the basket to get the payment from

paymentReference – String – the reference for the payment to get the status of

Parameters

Response

IGetPaymentStatusResponse

Remarks

Example Request

Example Response

Go to Top