Set member's default recurring payment card
PUT /api/members/{memberId}/rcp-card
- Products: Operator (
FOH), Consumer (CONSUMER) (any one of these products, not all) - Features: Online Bookings (
ONLINEBOOK), Online Joining (ONLINEJOIN), Front of House Generic Access (FOHGENERIC) (any one of these features, not all)
Overview
Nominates one of the cards already saved in a member's wallet as the card to charge for recurring payments — membership fees collected by card rather than direct debit.
The card must already be in the wallet; this call does not add or tokenise anything. Add a card first with Add or verify card in member's wallet, then read the wallet with Get member's wallet details to get the card ids. The wallet is fetched live from the payment provider on every call, so a card removed at the provider disappears from the check immediately.
One consequence worth planning for: setting the default this way marks the card as not verified for recurring payments. The nomination is recorded, but the separate verification flag is cleared, and any cross-reference from a previous verification is dropped. If your flow depends on a verified recurring card, run the verification step after setting the default, not before.
There is nothing to undo a nomination — call the endpoint again with a different card id to change it.
Linked members are permitted — a token issued for a member linked to {memberId} may call this endpoint.
Endpoint
PUT {base_url}/api/members/{memberId}/rcp-card
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
memberId | integer (int32) | Yes | The member whose recurring-payment card is set. Must match the member id in your access token, or be a member linked to it. The member must already have a wallet, or the call returns 404. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
rcpCardId | string | Yes | The id of the saved card to charge for recurring payments, exactly as returned in the member's wallet by Get member's wallet details. Maximum 50 characters; required, so an empty value is rejected. It is checked against the cards currently in the member's wallet at the payment provider — an id that is not there returns 404, even if the member once had that card. |
Sample request
curl -X PUT '{base_url}/api/members/{memberId}/rcp-card' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true' \
-H 'Content-Type: application/json' \
-d '{
"rcpCardId": "string"
}'Errors
A successful call returns 204 No Content.
| Status | Meaning | When |
|---|---|---|
400 | Bad request | rcpCardId is missing (Rcp Card Id is required) or longer than 50 characters (The rcp card id can not be longer than 50 characters). Returned as a model-state object rather than a plain string. |
401 | Unauthorized | The platform's own credentials for the payment provider were rejected when reading the wallet. This is a configuration fault on our side, not a problem with your access token — retrying with a different token will not help. |
404 | Not found | The member has no wallet: Member wallet with id {memberId} was not found |
404 | Not found | The card is not in the member's wallet: Card with id {rcpCardId} was not found in member wallet |
422 | Unprocessable entity | The tenant's payment provider configuration is missing or invalid, so the wallet could not be read. |
500 | Internal server error | The payment provider was unreachable, saving the change failed, or another unexpected server-side failure occurred. |