---
title: "Create a paykey from a Mastercard consent receipt"
method: POST
path: "/v1/bridge/mastercard"
tags: ["Bridge"]
---

# Create a paykey from a Mastercard consent receipt

`POST /v1/bridge/mastercard`

## Request

- Base URL: `https://sandbox.straddle.com`
- URL: `https://sandbox.straddle.com/v1/bridge/mastercard`
- Auth: HTTP bearer

Creates a new paykey from a Mastercard Open Finance connection your application already owns. Supply the consent receipt granting Straddle third-party access along with the pseudonymous Mastercard customer and account identifiers, and Straddle retrieves the bank details, account holder names, and live balance on your behalf.

## Headers

- `Straddle-Account-Id` string, uuid
- `Request-Id` string
- `Correlation-Id` string
- `Idempotency-Key` string

## Request body

- CreateMastercardPaykeyV1Request
  - `customer_id` string, uuid, required: Unique identifier of the related customer object.
  - `mastercard` MastercardConnectionV1, required
    - `consent_receipt_id` string, required: Identifier of the Mastercard consent receipt granting Straddle third-party access to the connection.
    - `customer_id` string, required: Mastercard customer identifier issued with the consent receipt.
    - `account_id` string, required: Mastercard account identifier issued with the consent receipt.
  - `metadata` object, nullable: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format.
  - `config` PaykeyConfigurationV1
    - `sandbox_outcome` 'standard' | 'active' | 'rejected' | 'review'
    - `processing_method` 'inline' | 'background' | 'skip'
  - `external_id` string, nullable: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems.

## Response `201`

Created

- RevealPaykeyV1ItemResponse
  - `meta` ResponseMetadata, required: Metadata about the API request, including an identifier and timestamp.
    - `api_request_id` string, uuid, required: Unique identifier for this API request, useful for troubleshooting.
    - `api_request_timestamp` string, date-time, required: Timestamp for this API request, useful for troubleshooting.
  - `response_type` 'object' | 'array' | 'error' | 'none', required: Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned.
  - `data` RevealPaykeyV1, required
    - `id` string, uuid, required: Unique identifier for the paykey.
    - `paykey` string, required: The tokenized paykey value. This token is used to create payments and should be stored securely.
    - `customer_id` string, uuid, nullable: Unique identifier of the related customer object.
    - `label` string, required: Human-readable label that combines the bank name and masked account number to help easility represent this paykey in a UI
    - `source` 'bank_account' | 'straddle' | 'mx' | 'plaid' | 'tan' | 'quiltt' | 'mastercard', required
    - `institution_name` string, nullable: Name of the financial institution.
    - `status` 'pending' | 'active' | 'inactive' | 'rejected' | 'review' | 'blocked', required
    - `status_details` StatusDetailsV1
      - `message` string, required: A human-readable description of the current status.
      - `reason` 'insufficient_funds' | 'closed_bank_account' | 'invalid_bank_account' | 'invalid_routing' | 'disputed' | 'payment_stopped' | 'owner_deceased' | 'frozen_bank_account' | 'risk_review' | 'fraudulent' | 'duplicate_entry' | 'invalid_paykey' | 'payment_blocked' | 'amount_too_large' | 'too_many_attempts' | 'internal_system_error' | 'user_request' | 'ok' | 'other_network_return' | 'payout_refused' | 'cancel_request' | 'failed_verification' | 'require_review' | 'blocked_by_system' | 'watchtower_review' | 'validating' | 'auto_hold', required
      - `source` 'watchtower' | 'bank_decline' | 'customer_dispute' | 'user_action' | 'system', required
      - `code` string, nullable: The status code if applicable.
      - `changed_at` string, date-time, required: The time the status change occurred.
    - `expires_at` string, date-time, nullable: Expiration date and time of the paykey, if applicable.
    - `created_at` string, date-time, required: Timestamp of when the paykey was created.
    - `updated_at` string, date-time, required: Timestamp of the most recent update to the paykey.
    - `bank_data` PaykeyBankDetailsV1
      - `routing_number` string, required: The routing number of the bank account.
      - `account_number` string, required: Bank account number. This value is masked by default for security reasons. Use the /unmask endpoint to access the unmasked value.
      - `account_type` 'checking' | 'savings', required
    - `metadata` object, nullable: Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the paykey in a structured format.
    - `config` PaykeyConfigurationV1, required
      - `sandbox_outcome` 'standard' | 'active' | 'rejected' | 'review'
      - `processing_method` 'inline' | 'background' | 'skip'
    - `balance` PaykeyBalanceDetailsV1
      - `account_balance` integer, nullable: Account Balance when last retrieved
      - `updated_at` string, date-time, nullable: Last time account balance was updated.
      - `status` 'pending' | 'completed' | 'failed', required
    - `external_id` string, nullable: Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Failed
- `500`: Server Error

## Changes

- **2026-10-16** `de39a60c562e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/straddleio/apis/straddle-api/changes/v1/bridge/mastercard/post.md)

---

[API](https://skmtc.dev/straddleio/apis/straddle-api.md) - [All operations](https://skmtc.dev/straddleio/apis/straddle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/straddleio/apis/straddle-api/revisions/7317fef4a9b0?raw)
