Set Default Payment Option

Last changes: 04-08-2019

As previously described (see section Get Stored Payment Options), the parameter “isDefault” in the stored payment options list indicates whether the respective payment option is set as default. Understandably, this can only be true for a single payment option. By specifying the stored payment option reference in the API method 1.79 Set Default Stored Payment Option, the associated payment option is set as default.

In the example below, we set the payment option with the reference " 8ac7a4a266c593040166d4b7d08e2201" as the new default for the Technical Account KDNR0001.

Set Default Payment Option Request

Path:

POST {Base URL}/account/KDNR0001/storedPaymentOptions/8ac7a4a266c593040166d4b7d08e2201/setDefault

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: H4sIAAAAAAA{partial omission for brevity}EAN2bJ/6l2XX+A5kJqdP+MwAA

{
    "partnerReference": "DEV-SVR001-DE_CUSTID-PRVBJRTV6J_CARTID-G44J3VKKTV_XVVXQ3R96V",
    "programCode": "COMPANYDE",
    "accnoType": "00",
    "localDate": "2018-11-06",
    "localTime": "093944"
}

Set Default Payment Option Response

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US

{
    "accno": "KDNR0001",
    "programCode": "COMPANYDE",
    "partnerReference": "DEV-SVR001-DE_CUSTID-PRVBJRTV6J_CARTID-G44J3VKKTV_XVVXQ3R96V",
    "localDate": "2018-11-06",
    "localTime": "093944",
    "sysDate": "2018-11-06",
    "sysTime": "083945",
    "responseCode": "0000",
    "responseDescription": "Successful execution"
}

The "responseCode" 0000 and the “responseDescription” indicate that the setting of a new default payment option was successful.