Add

This endpoint will add FanCash using the v2 contract. Currently it only supports transactions with short expirations which will be inserted as Bonus FanCash until the new ledger supports variable expirations.

Preconditions

  • This API only supports user access auth tokens.

  • User access tokens are returned from the Code Exchange step of the SSO auth process.

Required Scopes

fancash_v2:earn_expirable

Request

URL

/v2/fancash/add

Headers

Name
Required
Description

Authorization

a user Bearer token for accessing the API.

Data

Request Object

Name
Required
Description

txns

an array of transaction objects as defined below. we have a max number of 200 transactions in a call.

Transaction Object

Name
Required
Description

amount

dollar amount of FanCash written as a string NOT a number. supports fractional dollar amounts up to six decimal places.

external_id

unique identifier for this transaction within the systems of the caller of the API. If you have a unique id (ideally a uuid) on your side for this transaction you should use that (order id for example). If not, It is recommended to generate and store a uuid for your own records and to add this uuid to the request in this field. Please note, we use this id for idempotency. If you send the same id more than once it will be rejected.

expiry_date

expiration date for the fancash. formatted as an RFC 3339 date string. we currently do not support expirations greater than 90 days in the future. - Format: ISO 8601 (RFC 3339) - Timezone: Please supply only UTC formatted timestamp strings, example: 2025-08-06T18:30:00.000Z

Response

Normal Response Data

Name
Description

txns

an array of transaction objects as defined below.

Transaction Object

Name
Description

account_tenant_fanid

unique identifier representing the user in a non-Fanatics system. each vendor will have their own account_tenant_fan_id for a user. this value is a property of the ID Token returned in the SSO login process.

result

ok if the transaction was processed successfully otherwise nok

txn_id

unique identifier for the FanCash transaction within the Fanatics system.

external_id

the unique identifier you sent to us as the external_id.

Error Response Data

Error Response Wrapper

Property
Description

errors

array containing error response entries

rc

randomly generated identifier allowing call tracing within Fanatics. When reporting repeated errors or coordinating issue resolution with Fanatics, this value will assist in diagnosing any issues.

timestamp

processing timestamp in Zulu time of Fanatics API server using ISO 8601 format (https://datatracker.ietf.org/doc/html/rfc3339#section-5.6). Useful for issue resolution with Fanatics as log data is partitioned by date and time.

Error Response Wrapper -> Errors -> item

Property
Description

code

Fanatics error code for the specific error; this is generally not an http status code. Code values are generally stable for the API.

message

additional textual information describing the error. This is useful in debugging, but should not be checked programmatically

Full Spec

V2 FanCash add.

post

This endpoint add FanCash using the v2 contract. Currently it only supports transactions with short expirations which will be inserted as Bonus FanCash until the new ledger supports variable expirations. This also only supports user tokens (not s2s) for now. Requires the fancash_v2:earn_expirable permission.

Header parameters
AuthorizationstringRequired

User Bearer Token

Body
Responses
201

Created

application/json
post
POST /v2/fancash/add HTTP/1.1
Host: 
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "txns": [
    {
      "amount": "10.00",
      "expiry_date": "2022-07-07T20:53:07.070Z"
    }
  ]
}
{
  "txns": [
    {
      "account_tenant_fanid": "text",
      "result": "ok/nok",
      "txn_id": "text"
    }
  ]
}

Last updated