AvailablePaymentMethods

Summary

Returns the available payment methods for a specified basket value and offers available for client. Returns monthly installment amount, interest and fees. Sending in customer data and contents of the basket to enhance the result is optional. If the online-shop customer enters the incorrect address data, the system delivers suggestion for a corrected address. Main use-case is Two-Step Authorize.

Resource URL /api/v3/checkout/payment-methods
HTTP method POST
Content type application/json; charset=utf-8

Input parameters

Parameter name Location Type / Model Description
request Body AvailablePaymentMethodsRequest required

Responses

HTTP status code Model Comment
OK(200) AvailablePaymentMethodsResponse Available payment methods response
BadRequest (400) array of ResponseMessage Request failed. Check response model for list of Errors.
Unauthorized (401) API user is unauthorized. Make sure X-Auth-Key header is sent.
InternalServerError (500) Request failed due internal error. Retry request later.

Examples

{
  "customer": {
    "salutation": "Mr",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@mail.com",
    "customerCategory": "Person",
    "address": {
      "street": "Gütersloher Str.",
      "streetNumber": "123",
      "postalCode": "33415",
      "postalPlace": "Verl",
      "countryCode": "DE"
    },
    "conversationLanguage": "EN"
  },
  "order": {
    "number": "ORDER000001",
    "totalGrossAmount": 100.00,
    "currency": "EUR",
    "items": [
      {
        "productId": "1",
        "description": "Tablet Black",
        "grossUnitPrice": 40.00,
        "quantity": 2.0
      },
      {
        "productId": "2",
        "description": "MusicPlayer Black",
        "grossUnitPrice": 20.00,
        "quantity": 1.0
      }
    ]
  }
}
{
  "checkoutId": "ded1d5af-8346-4c12-a437-c26f366d1a90",
  "customer": {
    "customerNumber": "000000001",
    "firstName": "John",
    "lastName": "Doe",
    "addressList": [
      {
        "street": "Gütersloher Str.",
        "streetNumber": "123",
        "postalCode": "33415",
        "postalPlace": "Verl",
        "countryCode": "DE"
      }
    ]
  },
  "paymentMethods": [
    {
      "type": "Invoice"
    },
    {
      "type": "Invoice",
      "directDebit": {
        "available": true
      }
    }
  ],
  "additionalResponseInfo": {
    "rsS_RiskCheck_ResultCode": "SCR000"
  }
}
var AfterPayApi = require("./afterPay.js");
var apiKeyAuthentication = require("./api_key_filter");

var key = 'CHANGE_ME';
var client = new AfterPayApi().addFilter(apiKeyAuthentication.create(key));
var request = {
  "customer": {
    "salutation": "Mr",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@mail.com",
    "customerCategory": "Person",
    "address": {
      "street": "Gütersloher Str.",
      "streetNumber": "123",
      "postalCode": "33415",
      "postalPlace": "Verl",
      "countryCode": "DE"
    },
    "conversationLanguage": "EN"
  },
  "order": {
    "number": "ORDER000001",
    "totalGrossAmount": 100.00,
    "currency": "EUR",
    "items": [
      {
        "productId": "1",
        "description": "Tablet Black",
        "grossUnitPrice": 40.00,
        "quantity": 2.0
      },
      {
        "productId": "2",
        "description": "MusicPlayer Black",
        "grossUnitPrice": 20.00,
        "quantity": 1.0
      }
    ]
  }
};

client.Checkout.availablePaymentMethods(request, 
  function(err, response, httpRequest, httpResponse) {
  });
$LOAD_PATH.unshift File.dirname(__FILE__)
require 'after_pay.rb'
require 'json'

client = AfterPayApi::AfterPay.new(AfterPayApi::ApiKeyCredentials.new('YOUR_API_KEY'))

requestAsJson = '{"customer":{"salutation":"Mr","firstName":"John","lastName":"Doe","email":"john.doe@mail.com","customerCategory":"Person","address":{"street":"Gütersloher Str.","streetNumber":"123","postalCode":"33415","postalPlace":"Verl","countryCode":"DE"},"conversationLanguage":"EN"},"order":{"number":"ORDER000001","totalGrossAmount":100.00,"currency":"EUR","items":[{"productId":"1","description":"Tablet Black","grossUnitPrice":40.00,"quantity":2.0},{"productId":"2","description":"MusicPlayer Black","grossUnitPrice":20.00,"quantity":1.0}]}}'
request = AfterPayApi::Models::AvailablePaymentMethodsRequest.deserialize_object(JSON.parse(requestAsJson))


client.checkout.availablePaymentMethods_async(request).then{|response|

}.execute.wait
var key = "CHANGE_ME";
var client = new CheckoutApi(new Configuration() { DefaultHeader = new Dictionary<string, string>() { { "X-Auth-Key", key} } });

var request = new AvailablePaymentMethodsRequest(){
  Customer = new CheckoutCustomer() {
    Salutation = Salutation.Mr,
    FirstName = "John",
    LastName = "Doe",
    Email = "john.doe@mail.com",
    CustomerCategory = CustomerCategory.Person,
    Address = new Address() {
      Street = "Gütersloher Str.",
      StreetNumber = "123",
      PostalCode = "33415",
      PostalPlace = "Verl",
      CountryCode = CountryCode.DE
    },
    ConversationLanguage = LanguageCode.EN
  },
  Order = new Order() {
    Number = "ORDER000001",
    TotalGrossAmount = 100.00,
    Currency = "EUR",
    Items = new List<OrderItem> {
    new OrderItem() {
        ProductId = "1",
        Description = "Tablet Black",
        GrossUnitPrice = 40.00,
        Quantity = 2
      },
    new OrderItem() {
        ProductId = "2",
        Description = "MusicPlayer Black",
        GrossUnitPrice = 20.00,
        Quantity = 1
      },
    }
  }
};

var responce = client.CheckoutAvailablePaymentMethods(request);