- The receipt ID.
- The returned customer ID.
- The returned account ID.
Before you begin
Gather the following values for the environment you are using:- Your Mastercard app key, partner ID, and partner secret.
- The Mastercard customer ID and account ID for the selected checking account.
- Straddle’s Mastercard partner ID for your environment. Straddle provides this value; sandbox and production use different IDs.
Authenticate with Mastercard
Use Mastercard’s Create Access Token operation to exchange your Mastercard partner ID and partner secret for a partner authentication token.Get a partner authentication token
token.
Partner authentication response
Finicity-App-Token header when you create the Mastercard token. Partner authentication tokens are valid for two hours. Mastercard recommends replacing them after 90 minutes.
Set the token scope
Mastercard’s Generate Third Party Access Key request sets two limits for each product in the consent receipt:accessPeriodcontrols how long Straddle can use the product.maxCallscontrols how many times Straddle can request the product before Mastercard blocks further requests.
The request below sets
maxCalls to Mastercard’s example value of 200. Paykey creation requests each product once. Later charge balance checks and balance refreshes can make additional availableBalanceLive requests.
200 is an example, not a published maximum. Confirm the supported limit for your Mastercard program if you need a different value.maxCalls and accessPeriod for every product. Set accessPeriod.type to timeframe, then replace the timestamps in the following request before sending it.
Generate the Mastercard token
In Mastercard’s Generate Third Party Access Key request, setpartnerId to your Mastercard partner ID. Set thirdPartyPartnerId to Straddle’s Mastercard partner ID for the same environment.
Generate a Mastercard token
receiptId, customerId, and products[].accountId from the response.
Consent receipt response
Map the response to Straddle
Map the fields in Mastercard’s Generate Third Party Access Key response to themastercard object in the Straddle Bridge request.
Confirm that the same returned account ID appears in all three product entries, then send that value as
mastercard.account_id.
Use the receipt ID and returned customer ID from that same consent receipt. Do not send Straddle the original customer or account IDs from the token request.
Set the top-level customer_id in the Straddle request to the Straddle customer ID. mastercard.customer_id is the customer ID returned by Mastercard.
Store mastercard.consent_receipt_id, mastercard.customer_id, and mastercard.account_id on your server with your record of the bank connection.