BreadPay Tradein API
Streamlines the upgrade / trade-in flow for the Apple program — upgrade elections, trade-in payments, and linking an upgradeable loan to a payment agreement. 6 operations.
Streamlines the upgrade / trade-in flow for the Apple program — upgrade elections, trade-in payments, and linking an upgradeable loan to a payment agreement. 6 operations.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tradein-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
{
"openapi": "3.0.3",
"info": {
"title": "Tradein",
"description": "TradeIn is a service built to streamline and enhance the Upgrade/TradeIn feature for the Apple program ",
"version": "2.0.0",
"contact": {
"email": "partnership-growth@getbread.com"
}
},
"servers": [
{
"url": "https://api-preview.platform.breadpayments.com/",
"description": "Preview environment"
},
{
"url": "https://api.platform.breadpayments.com/",
"description": "Production environment"
}
],
"paths": {
"/api/tradein/upgrade-election": {
"post": {
"tags": [
"Tradein"
],
"summary": "Records user tradein election",
"description": "Records user tradein election",
"operationId": "tradeinUpgradeElection",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Tradein UpgradeElection request",
"required": [
"paymentAgreementID",
"upgradeElection",
"electedAt"
],
"properties": {
"paymentAgreementID": {
"description": "the existing payment agreement ID that this payment is applied to",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"electedAt": {
"description": "the timestamp of the election",
"allOf": [
{
"type": "string",
"format": "date-time",
"description": "The timestamp value formatted per RFC3339. This does not allow nulls.",
"example": "2020-12-31T15:10:55Z",
"externalDocs": {
"description": "RFC3339",
"url": "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6"
}
}
]
},
"upgradeElection": {
"type": "string",
"enum": [
"KEEP",
"RETURN",
"UPGRADE"
],
"description": "the value of the election"
},
"linkedPaymentAgreementID": {
"description": "id of the new loan if the upgradeElection value is 'UPGRADE'. Otherwise it is blank.",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Tradein UpgradeElection response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"paymentAgreementID",
"tenantID",
"programID",
"buyerID",
"merchantID",
"buyerGivenName",
"loanStatus",
"loanSubstatus",
"maturityDate",
"startUpgradeWindowDate",
"endUpgradeWindowDate",
"originalBdam",
"balanceOwed",
"bdamRemaining",
"bdamPercentage",
"loanSettledDate",
"loanOriginalAmortization",
"tradeInPaymentId",
"linkedPaymentAgreementID",
"electionHistory"
],
"properties": {
"id": {
"description": "id of the UpgradeableLoan entity",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"paymentAgreementID": {
"description": "id of the associated payment agreement",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"tenantID": {
"description": "id of the tenant",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"programID": {
"description": "id of the program",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"buyerID": {
"description": "id of the buyer",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"merchantID": {
"description": "id of the merchant",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"buyerGivenName": {
"type": "string",
"description": "name of the buyer"
},
"loanStatus": {
"type": "string",
"description": "Status of the loan"
},
"loanSubstatus": {
"type": "string",
"description": "Substatus of the loan"
},
"maturityDate": {
"description": "the date of maturity",
"allOf": [
{
"type": "string",
"format": "date",
"description": "The date value formatted per RFC3339. This does not allow nulls.",
"example": "2020-12-31",
"externalDocs": {
"description": "RFC3339",
"url": "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6"
}
}
]
},
"startUpgradeWindowDate": {
"description": "the start date of the upgrade window",
"allOf": [
{
"type": "string",
"format": "date",
"description": "The date value formatted per RFC3339. This does not allow nulls.",
"example": "2020-12-31",
"externalDocs": {
"description": "RFC3339",
"url": "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6"
}
}
]
},
"endUpgradeWindowDate": {
"description": "the end date of the upgrade window",
"allOf": [
{
"type": "string",
"format": "date",
"description": "The date value formatted per RFC3339. This does not allow nulls.",
"example": "2020-12-31",
"externalDocs": {
"description": "RFC3339",
"url": "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6"
}
}
]
},
"originalBdam": {
"description": "Original BDAM value",
"allOf": [
{
"required": [
"currency",
"value"
],
"properties": {
"currency": {
"type": "string",
"description": "The three letter currency code as defined in ISO 4217.",
"example": "USD",
"minLength": 3,
"maxLength": 3,
"externalDocs": {
"description": "ISO 4217",
"url": "https://en.wikipedia.org/wiki/ISO_4217"
}
},
"value": {
"type": "integer",
"description": "Monetary value as an integral number of the currency fractional unit e.g for USD: cents",
"format": "int64",
"example": 100
}
},
"description": "Represents a monetary amount in the specified currency",
"example": {
"currency": "USD",
"value": 50000
}
}
]
},
"balanceOwed": {
"description": "the remaining balance owed",
"allOf": [
{
"required": [
"currency",
"value"
],
"properties": {
"currency": {
"type": "string",
"description": "The three letter currency code as defined in ISO 4217.",
"example": "USD",
"minLength": 3,
"maxLength": 3,
"externalDocs": {
"description": "ISO 4217",
"url": "https://en.wikipedia.org/wiki/ISO_4217"
}
},
"value": {
"type": "integer",
"description": "Monetary value as an integral number of the currency fractional unit e.g for USD: cents",
"format": "int64",
"example": 100
}
},
"description": "Represents a monetary amount in the specified currency",
"example": {
"currency": "USD",
"value": 50000
}
}
]
},
"bdamRemaining": {
"description": "Remaining BDAM value",
"allOf": [
{
"required": [
"currency",
"value"
],
"properties": {
"currency": {
"type": "string",
"description": "The three letter currency code as defined in ISO 4217.",
"example": "USD",
"minLength": 3,
"maxLength": 3,
"externalDocs": {
"description": "ISO 4217",
"url": "https://en.wikipedia.org/wiki/ISO_4217"
}
},
"value": {
"type": "integer",
"description": "Monetary value as an integral number of the currency fractional unit e.g for USD: cents",
"format": "int64",
"example": 100
}
},
"description": "Represents a monetary amount in the specified currency",
"example": {
"currency": "USD",
"value": 50000
}
}
]
},
"bdamPercentage": {
"type": "number",
"format": "double",
"description": "Percentage of BDAM"
},
"loanSettledDate": {
"description": "Date when the loan was settled",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"loanOriginalAmortization": {
"type": "integer",
"description": "Original amortization value of the loan"
},
"tradeInPaymentId": {
"description": "id of the trade in payment",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"linkedPaymentAgreementID": {
"description": "id of the linked payment agreement in the Upgrade election",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"electionHistory": {
"type": "array",
"items": {
"type": "object",
"description": "an object representing a election tied to an UpgradeableLoan entity",
"required": [
"id",
"electionDate",
"election"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
},
"electionDate": {
"type": "string",
"format": "date",
"description": "The date value formatted per RFC3339. This does not allow nulls.",
"example": "2020-12-31",
"externalDocs": {
"description": "RFC3339",
"url": "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6"
}
},
"election": {
"type": "string",
"enum": [
"KEEP",
"RETURN",
"UPGRADE"
]
}
}
}
}
}
}
}
}
},
"401": {
"description": "Unauthorized. Indicates that provided credentials is not valid",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "Jwt is expired"
}
},
"application/json": {
"schema": {
"allOf": [
{
"required": [
"code",
"domain",
"message"
],
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "The underlying http status code",
"format": "int32",
"example": 500
},
"message": {
"type": "string",
"description": "A simple message in english describing the error and can be returned to the consumer",
"example": "Age cannot be less than 18"
},
"domain": {
"type": "string",
"description": "The domain where the error is originating from as defined by the service",
"example": "Payments"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Any additional details to be conveyed as determined by the service. If present, will return map of key value pairs",
"example": {
"propertyName": "propertyName is required"
}
}
}
}
],
"required": [
"code",
"domain",
"message",
"reason"
],
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "A reason code specific to the service and can be used to identify the exact issue. Should be unique within a domain",
"example": "Reason_Code"
}
}
},
"example": {
"code": 401,
"domain": "Auth",
"message": "Invalid authentication",
"reason": "Invalid_Authentication"
}
}
}
},
"403": {
"description": "an unsuccessful response",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"required": [
"code",
"domain",
"message"
],
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "The underlying http status code",
"format": "int32",
"example": 500
},
"message": {
"type": "string",
"description": "A simple message in english describing the error and can be returned to the consumer",
"example": "Age cannot be less than 18"
},
"domain": {
"type": "string",
"description": "The domain where the error is originating from as defined by the service",
"example": "Payments"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Any additional details to be conveyed as determined by the service. If present, will return map of key value pairs",
"example": {
"propertyName": "propertyName is required"
}
}
}
},
{
"type": "object",
"description": "Tradein service error",
"properties": {
"reason": {
"type": "string",
"description": "Payment agreement retrieval error reason codes",
"enum": [
"Tradein_BadRequest",
"Tradein_InvalidIdentity",
"Tradein_ServerError"
],
"example": "Tradein_ServerError"
}
}
}
]
}
}
}
},
"500": {
"description": "Tradein UpgradeElection error response",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"required": [
"code",
"domain",
"message"
],
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "The underlying http status code",
"format": "int32",
"example": 500
},
"message": {
"type": "string",
"description": "A simple message in english describing the error and can be returned to the consumer",
"example": "Age cannot be less than 18"
},
"domain": {
"type": "string",
"description": "The domain where the error is originating from as defined by the service",
"example": "Payments"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Any additional details to be conveyed as determined by the service. If present, will return map of key value pairs",
"example": {
"propertyName": "propertyName is required"
}
}
}
},
{
"type": "object",
"description": "Tradein service error",
"properties": {
"reason": {
"type": "string",
"description": "Payment agreement retrieval error reason codes",
"enum": [
"Tradein_BadRequest",
"Tradein_InvalidIdentity",
"Tradein_ServerError"
],
"example": "Tradein_ServerError"
}
}
}
]
}
}
}
}
},
"security": [
{
"bearerAuthTradein": [
"w:UpgradeElection"
]
}
]
}
},
"/api/tradein/payment": {
"post": {
"tags": [
"Tradein"
],
"summary": "Applies a payment to an existing loan as part of the tradein process",
"description": "Applies a payment to an existing loan as part of the tradein process",
"operationId": "tradeinPayment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Tradein Payment request",
"required": [
"paymentAgreementID",
"dollarAmount",
"tradeInPartnerRmaNumber",
"tradeInPartnerPaymentDate"
],
"properties": {
"paymentAgreementID": {
"description": "id of the associated payment agreement",
"allOf": [
{
"type": "string",
"format": "uuid",
"description": "A universally unique identifier (Version 4) as defined in RFC4122. This does not allow nulls.",
"example": "dc0dc633-1760-4d43-ba1d-da94ed701f06",
"externalDocs": {
"description": "RFC4122",
"url": "https://datatracker.ietf.org/doc/html/rfc4122.html"
}
}
]
},
"amount": {
"description": "the amount to pay towards the associated payment agreement",
"allOf": [
{
"required": [
"currency",
"value"
],
"properties": {
"currency": {
"type": "string",
"description": "The three letter currency code as defined in ISO 4217.",
"example": "USD",
"minLength": 3,
"maxLength": 3,
"externalDocs": {
"description": "ISO 4217",
"url": "https://en.wikipedia.org/wiki/ISO_4217"
}
},
"value": {
"type": "integer",
"description":
# --- truncated at 32 KB (267 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bread-financial/refs/heads/main/openapi/bread-tradein-openapi.json