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"
}
Go to Top