Set Default Payment Option

Last changes: 10-28-2022

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 {baseURL}/account/KDNR0001/storedPaymentOptions/8ac7a4a266c593040166d4b7d08e2201/setDefault

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: eyJhbGciOiJSUzI1NiI{abbreviated}RW5kVG9rZW4=

{
    "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",
    "additionalInformation": {
        "requestId": "aff2728481a181dc36daedc14055b516"
    }
}

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