All URIs are relative to https://api.sumup.com/{version}
Method | HTTP request | Description |
---|---|---|
checkoutsGet | GET /checkouts | List checkouts |
checkoutsIdDelete | DELETE /checkouts/{id} | Deactivate a checkout |
checkoutsIdGet | GET /checkouts/{id} | Retrieve a checkout |
checkoutsIdPut | PUT /checkouts/{id} | Process a checkout |
checkoutsPost | POST /checkouts | Create a checkout |
[CheckoutSuccess] checkoutsGet(opts)
List checkouts
Lists created checkout resources according to the applied `checkout_reference`.
import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new SumUpRestApi.CheckoutsApi();
let opts = {
'checkoutReference': "checkoutReference_example" // String | Filters the list of checkout resources by the unique ID of the checkout.
};
apiInstance.checkoutsGet(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
checkoutReference | String | Filters the list of checkout resources by the unique ID of the checkout. | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2001 checkoutsIdDelete(id)
Deactivate a checkout
Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated.
import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new SumUpRestApi.CheckoutsApi();
let id = "id_example"; // String | Unique ID of the checkout resource.
apiInstance.checkoutsIdDelete(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique ID of the checkout resource. |
- Content-Type: Not defined
- Accept: application/json
CheckoutSuccess checkoutsIdGet(id)
Retrieve a checkout
Retrieves an identified checkout resource. Use this request after processing a checkout to confirm its status and inform the end user respectively.
import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new SumUpRestApi.CheckoutsApi();
let id = "id_example"; // String | Unique ID of the checkout resource.
apiInstance.checkoutsIdGet(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique ID of the checkout resource. |
- Content-Type: Not defined
- Accept: application/json
CheckoutSuccess checkoutsIdPut(id, opts)
Process a checkout
Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint. Follow this request with `Retrieve a checkout` to confirm its status.
import {SumUpRestApi} from 'sumup-rest-api';
let apiInstance = new SumUpRestApi.CheckoutsApi();
let id = "id_example"; // String | Unique ID of the checkout resource.
let opts = {
'body': new SumUpRestApi.CheckoutProcessMixin() // CheckoutProcessMixin | Details of the payment instrument for processing the checkout.
};
apiInstance.checkoutsIdPut(id, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique ID of the checkout resource. | |
body | CheckoutProcessMixin | Details of the payment instrument for processing the checkout. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Checkout checkoutsPost(opts)
Create a checkout
Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout. For 3DS checkouts, add the `redirect_url` parameter to your request body schema. Follow by processing a checkout to charge the provided payment instrument.
import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new SumUpRestApi.CheckoutsApi();
let opts = {
'body': new SumUpRestApi.CheckoutCreateRequest() // CheckoutCreateRequest |
};
apiInstance.checkoutsPost(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | CheckoutCreateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json