Refund
Use this endpoint to revert a captured transaction.
Preconditions
You must know the Account Tenant FanID for the user's account, this value is a property of the ID Token returned in the SSO login process. It is possible to store and re-use this value for the user.
This API requires either a sever-to-server or user access auth token:
You can generate a server-to-server token using the S2S Auth API
User access tokens are returned from the Code Exchange step of the SSO auth process.
Required Scopes
fancash:refund
Request
URL
/v1/{account_tenant_fanid}/refund
Path Parameters
account_tenant_fanid
unique identifier representing the user in a non-Fanatics system as a proxy for their internal fanatics id. 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.
Headers
Authorization
either a user Bearer token or a server-to-server Bearer token for accessing the API
Data
Request Object
amount
dollar amount of FanCash written as a string NOT a number. supports fractional dollar amounts up to six decimal places
currency
ISO currency code for the FanCash issuance. Only USD is supported for now. Please pass USD only.
external_reference_id
unique identifier for this transaction within the systems of the caller of the API. It is recommended to generate and store a uuid for your own records and to add this uuid to the request in this field.
capture_transaction_id
the capture_transaction_id
from the capture you are refunding.
reason
very short description of why the FanCash is being voided. For example, user changed mind.
country_code
country of the jurisdiction in which the FanCash is being earned written as a 3-character ISO 3166 country code.
sub_division
political subdivision of the country of jurisdiction in which the FanCash is being earned written as a 2-character abbreviation. Within the United States of America, this would be the 2 character abbreviation of the particular State. For example, NY for New York.
test_transaction
indicates whether this transaction is for testing purposes only. True for a test, False if a normal non-test transaction
Response
Normal Response Data
external_reference_id
the external_reference_id from the request used for correlating this transaction to partner systems
refund_transaction_id
unique identifier for the FanCash refund transaction within the Fanatics system.
Error Response Data
Error Response Wrapper
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
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
Fancash refund. Requires the fancash:refund permission.
Account Tenant Fan ID
User or server access Bearer token
10.00
56eeabe0-d6f0-11ec-b17e-d38c4cb36d49
USD
Fancash Refund Response
Bad request
Forbidden
Not Found
Rate Limited
Internal error
POST /v1/{account_tenant_fanid}/refund HTTP/1.1
Host:
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 214
{
"amount": "10.00",
"capture_transaction_id": "56eeabe0-d6f0-11ec-b17e-d38c4cb36d49",
"country_code": "text",
"currency": "USD",
"external_reference_id": "text",
"reason": "text",
"sub_division": "text",
"test_transaction": true
}
{
"refund_transaction_id": "af9035d0-8e7e-11ec-ac03-6f0d1b9d043d"
}
Last updated