Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Get payment methods

The first thing you need to do is to attach your AccessToken token to the request's header. See Quick Start if you are not sure how to do that.

To create new basket your request should have at least the required request headers:

  • CultureCode
  • CountryId

There are optional as following:

  • PriceGroupId
  • MaxItems
  • NextPagingToken

If you are not sure what MaxItems and NexPagingToken are, take a look Here

An example could be:

    
    
        curl -D- -X POST https://umbracodemo1.ucommerce.net/api/v1/payment-methods?countryId=0C53F836-9601-EC11-837B-64BC58542C92&cultureCode=en-US \
            -H 'Authorization: Bearer <ACCESS_TOKEN>' 
            -H 'Content-Type: application/json'
    
    

If you get a successful response, a list of paymentMethods and nextPagingToken will be returned back to you.

Example:

    
    {
        "nextPagingToken": null,
        "paymentMethods": [
            {
                "description": "Description",
                "displayName": "Account",
                "feePercent": 5.0000,
                "fees": [
                    {
                        "amount": 0.0000,
                        "priceGroupId": "878b0ff1-0800-40ac-b006-0e9858f234a5"
                    }
                ],
                "id": "d753f836-9601-ec11-837b-64bc58542c92",
                "imageUrl": "https://mywebsite.com/umbraco/Ucommerce/images/ui/image.png",
                "name": "Account"
            },
            {
                "displayName": "Invoice",
                "feePercent": 0.0000,
                "fees": [
                    {
                        "amount": 0.0000,
                        "priceGroupId": "878b0ff1-0800-40ac-b006-0e9858f234a5"
                    }
                ],
                "id": "d853f836-9601-ec11-837b-64bc58542c92",
                "imageId": "a567f836-9601-ec11-837b-64bc58542b89",
                "imageUrl": "https://mywebsite.com/umbraco/Ucommerce/images/ui/image2.png",
                "name": "Invoice"
            }
        ]
    }
    
    

Possible errors that may occur:

Error Description
BadRequest (400) PriceGroup does not exist; Country does not exist; etc.
Unauthorized (401) The token expires
Forbidden (403) The token does not have access to this endpoint

Example:

    
    {
        "errors": [
            {
                "error-description": "PriceGroup does not exist.",
                "error": "BadRequest"
            }
        ]
    }
    
    

See Handling failures for more info.