Replace the saved card
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://oddslink.app/v1/billing/card"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://oddslink.app/v1/billing/card"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://oddslink.app/v1/billing/card") .post(null) .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();const url = 'https://oddslink.app/v1/billing/card';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://oddslink.app/v1/billing/card \ --header 'Authorization: Bearer <token>'Signed-in website session only. Returns the same card form values as checkout, to replace the card on file. It charges nothing. A subscription whose renewal failed is retried on the new card right away. An account with no subscription gets a 404.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The order, and what the card form on the account page needs to save the new card.
object
The checkout this card will pay for. It expires after two hours.
Values for the card form. Single use; they expire after 20 minutes.
object
The amount of the card check, not the price. The card check charges nothing.
Example
{ "order_id": "3ab8e2fc-bcdd-4d52-bcee-f263208816bb", "fields": { "terminal": "oddslink", "thtk": "w5e8c1d2f0a94b7e8c1d2f0a94b7e8c1d2f0a94b7e", "amount": "1", "currency": "USD" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
The Authorization bearer session is missing or invalid.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Examples
No Authorization: Bearer header sent
{ "error": { "code": "MISSING_SESSION", "message": "Sign in and try again.", "docs_url": "https://oddslink.app/docs/errors/#missing-session", "request_id": "req_01hz8k4b9h5y0z1a" }}Session is expired or invalid
{ "error": { "code": "INVALID_SESSION", "message": "Your session has expired. Sign in again.", "docs_url": "https://oddslink.app/docs/errors/#invalid-session", "request_id": "req_01hz8k4c0j6z1a2b" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
This account has no subscription.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Example
{ "error": { "code": "NO_SUBSCRIPTION", "message": "this account has no subscription", "docs_url": "https://oddslink.app/docs/errors/#no-subscription", "request_id": "req_01J8Z5Q2K9V3N7M4" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
The plan’s speed limit was exceeded; wait Retry-After seconds. A call that does not count against the allowance is never refused for a spent allowance.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Example
{ "error": { "code": "SPEED_LIMIT", "message": "Speed limit exceeded: 10 requests/second on the Growth plan.", "docs_url": "https://oddslink.app/docs/errors/#speed-limit", "request_id": "req_01hz8k4f7m9c3d8f" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
Seconds to wait before retrying on 429 SPEED_LIMIT or 503 ODDS_UNAVAILABLE.
The billing provider could not be reached.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Example
{ "error": { "code": "BILLING_UNAVAILABLE", "message": "could not reach the billing provider; try again", "docs_url": "https://oddslink.app/docs/errors/#billing-unavailable", "request_id": "req_01J8Z5Q2K9V3N7M4" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
Billing is not configured on this deployment. Fails closed rather than taking money it cannot then account for.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Example
{ "error": { "code": "BILLING_NOT_CONFIGURED", "message": "billing is not configured on this deployment", "docs_url": "https://oddslink.app/docs/errors/#billing-not-configured", "request_id": "req_01J8Z5Q2K9V3N7M4" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.
Something failed on our side.
object
object
Stored Unix-second choices on AMBIGUOUS_EVENT or INVALID_STORED_COMMENCE_TIME; independent of dateFormat.
Valid case-sensitive book keys on INVALID_BOOKMAKER.
403 only: the plan on the presented key.
403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.
Example
{ "error": { "code": "INTERNAL_ERROR", "message": "Something went wrong on our side. It has been logged.", "docs_url": "https://oddslink.app/docs/errors/#internal-error", "request_id": "req_01hz8k4h8n0d4e9f" }}Headers
Section titled “Headers”Requests used this billing period.
Requests remaining this billing period.
What this one call cost against the allowance (0 for a free call).
This plan’s speed limit, in requests per second.
Requests left in the current one-second window.
Seconds until the speed-limit window resets.
This request’s id, for support and for matching against error.request_id.