# Create a payment token

`POST /tokens`

> This is a subset of the full specification, limited to the `POST /tokens` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST /tokens` operation. Components more than 3 `$ref` hops away are not included.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: Payment tokens
    description: |-
      Use payment tokens to reduce the scope of [PCI DSS compliance](https://www.rebilly.com/docs/pci-compliance/).

      A payment token can be made using a different authentication scheme (public key authentication), so you can create a payment token directly from the browser.
      This bypasses the need to send sensitive cardholder info to your servers.
      We recommend using this with the FramePay library to integrate a form into this API resource and create payment tokens.
x-tagGroups:
  - name: Payment Instruments
    tags:
      - Payment tokens
paths:
  /tokens:
    post:
      x-products:
        - Core
      tags:
        - Payment tokens
      summary: Create a payment token
      operationId: PostToken
      x-sdk-operation-name: create
      x-sdk-resource: PaymentTokens
      description: |-
        Creates a payment token which can be exchanged into a payment instrument.
        [FramePay](https://www.rebilly.com/docs/dev-docs/framepay) is the recommended way to create a payment token because it minimizes PCI DSS compliance.
        After a payment token is created, it can only be used once.

        A payment card or digital wallet token expires upon first use or within 30 minutes of the token creation, whichever comes first.
        Any other payment token expires upon first use or within 3 hours of the token creation, whichever comes first.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompositeToken'
        description: Payment token resource.
        required: true
      security:
        - PublishableApiKey: []
        - SecretApiKey: []
        - JWT: []
      responses:
        '201':
          description: Token created.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            Rate-Limit-Limit:
              $ref: '#/components/headers/Rate-Limit-Limit'
            Rate-Limit-Remaining:
              $ref: '#/components/headers/Rate-Limit-Remaining'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompositeToken'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-codeSamples:
        - lang: PHP
          label: PHP-SDK-2.0
          source: |
            $paymentCardTokenForm = new Rebilly\Entities\PaymentCardToken();
            $paymentCardTokenForm->setBillingAddress([
                'firstName' => 'John',
                'lastName' => 'Doe',
                'organization' => 'Test LTD',
                'address' => 'Test street 5',
                'address2' => 'Test house 5',
                'city' => 'New York',
                'region' => 'Long Island',
                'country' => 'US',
                'postalCode' => '123456',
                'emails' => [
                    [
                        'label' => 'main',
                        'value' => 'johndoe@testemail.com',
                        'primary' => true,
                    ],
                    [
                        'label' => 'secondary',
                        'value' => 'otheremail@testemail.com',
                    ],
                ],
                'phoneNumbers' => [
                    [
                        'label' => 'work',
                        'value' => '+123456789',
                        'primary' => true,
                    ],
                    [
                        'label' => 'home',
                        'value' => '+9874654321',
                    ],
                ],
            ]);

            $paymentInstrumentForm = new Entities\PaymentInstruments\PaymentCardPaymentInstrument();
            $paymentInstrumentForm->setPan('4111111111111111');
            $paymentInstrumentForm->setExpYear(2025);
            $paymentInstrumentForm->setExpMonth(8);
            $paymentInstrumentForm->setCvv(123);

            $paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);

            try {
                $paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);
            } catch (Rebilly\Http\Exception\DataValidationException $e) {
                print_r($e->getValidationErrors());
            }
        - lang: JavaScript
          source: |
            // first set the properties for the new payment token
            const data = {
                method: 'payment-card',
                paymentInstrument: {
                    pan: '4111111111111111',
                    expYear: 2022,
                    expMonth: 12,
                    cvv: '123'
                },
                billingAddress: {
                  firstName: 'Johnny',
                  lastName: 'Brown',
                  emails: [{
                      label: 'main',
                      value: 'johnny+test@grr.la',
                      primary: true
                  }]
                }
            };

            const token = await api.paymentTokens.create({data});
        - lang: PHP
          source: |-
            $service = new \Rebilly\Sdk\Service($client);

            $paymentCardTokenForm = new \Rebilly\Sdk\Model\PaymentCardToken();
            $paymentCardTokenForm->setBillingAddress([
                'firstName' => 'John',
                'lastName' => 'Doe',
                'organization' => 'Test LTD',
                'address' => 'Test street 5',
                'address2' => 'Test house 5',
                'city' => 'New York',
                'region' => 'Long Island',
                'country' => 'US',
                'postalCode' => '123456',
                'emails' => [
                    [
                        'label' => 'main',
                        'value' => 'johndoe@testemail.com',
                        'primary' => true,
                    ],
                    [
                        'label' => 'secondary',
                        'value' => 'otheremail@testemail.com',
                    ],
                ],
                'phoneNumbers' => [
                    [
                        'label' => 'work',
                        'value' => '+123456789',
                        'primary' => true,
                    ],
                    [
                        'label' => 'home',
                        'value' => '+9874654321',
                    ],
                ],
            ]);

            $paymentInstrumentForm = new \Rebilly\Sdk\Model\PaymentCardTokenPaymentInstrument();
            $paymentInstrumentForm->setPan('4111111111111111');
            $paymentInstrumentForm->setExpYear(2025);
            $paymentInstrumentForm->setExpMonth(8);
            $paymentInstrumentForm->setCvv('123');

            $paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);

            try {
                $paymentCardToken = $service->paymentTokens()->create($paymentCardTokenForm);
            } catch (\Rebilly\Sdk\Exception\DataValidationException $e) {
                print_r($e->getValidationErrors());
            }
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    PublishableApiKey:
      description: |-
        This authentication method is applicable to specific operations.

        To create a publishable API key, see [Create an API key](https://www.rebilly.com/catalog/all/api-keys/postapikey).
      name: Authorization
      type: apiKey
      in: header
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  headers:
    Location:
      description: Location of the related resource.
      schema:
        type: string
        format: uri
      example: https://api.rebilly.com/example
    Rate-Limit-Limit:
      description: |-
        Maximum number of requests available at one time for this rate limit.
        For more information, see [Rate limits](#section/Rate-limits).
      schema:
        type: integer
      example: 500
    Rate-Limit-Remaining:
      description: |-
        Number of requests still available for this rate limit.
        For more information, see [Rate limits](#section/Rate-limits).
      schema:
        type: integer
      example: 499
    Rate-Limit-Retry-After:
      description: Number of seconds to wait before retrying the request.
      schema:
        type: integer
      example: 1
  schemas:
    CreatedTime:
      type: string
      description: |-
        Date and time when the resource is created.
        This value is set automatically when the resource is created.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Creation Time
    UpdatedTime:
      type: string
      description: |-
        Date and time when the resource is updated.
        This value is set automatically when the resource is updated.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Update Time
    ResourceId:
      type: string
      description: Unique resource ID.
      maxLength: 50
      example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
    SelfLink:
      type: array
      description: Related links.
      readOnly: true
      items:
        type: object
        properties:
          href:
            description: Link URL.
            type: string
          rel:
            description: Type of link.
            type: string
            enum:
              - self
    BaseProblem:
      type: object
      additionalProperties: true
      minProperties: 1
      description: RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object.
      properties:
        type:
          type: string
          description: |-
            Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
            It should provide human-readable documentation for the problem type.
            When this member is not present, its value is assumed to be "about:blank".
          format: uri
        title:
          type: string
          description: |-
            Short, human-readable summary of the problem type.
            Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
        detail:
          type: string
          description: Human-readable explanation that is specific to this occurrence of the problem.
        instance:
          type: string
          description: |-
            URI reference that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
    Unauthorized:
      allOf:
        - title: Unauthorized
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 401
              maximum: 401
        - $ref: '#/components/schemas/BaseProblem'
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    Forbidden:
      allOf:
        - title: Forbidden
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 403
              maximum: 403
            error:
              type: string
              description: |-
                Message that describes why the request is forbidden.
                Most responses use a descriptive message, such as `Not allowed to change security settings`.
                If the organization requires multi-factor authentication (MFA) and MFA verification has not been completed for the session, this value is `mfa_required`.
                If MFA verification has not been completed for the session and the operation requires a confirmed session, this value is `mfa_required_for_caller`.
                This includes turning on `requireMfa` and resetting MFA for a user.
                If the organization restricts access to a list of IP addresses and the request comes from an IP address that is not in the list, this value is `ip_not_allowed`.
            organizationId:
              description: |-
                ID of the organization that requires MFA or does not allow the IP address of the request.
                This property is present only if `error` is `mfa_required` or `ip_not_allowed`.
                The organization is the organization of the request or another organization that the request acts on.
              $ref: '#/components/schemas/OrganizationId'
        - $ref: '#/components/schemas/BaseProblem'
    InvalidFields:
      type: array
      description: Invalid field details.
      items:
        type: object
        properties:
          field:
            type: string
            description: |-
              Name of the field.
              Dot notation is used for nested object field names.
          message:
            description: Message field.
            type: string
      example:
        - field: field1
          message: field1 is invalid
        - field: subObject.field2
          message: field2 is invalid
        - field: subObject.field2
          message: another error in the field2
    ValidationError:
      allOf:
        - title: Validation error
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 422
              maximum: 422
        - $ref: '#/components/schemas/BaseProblem'
        - type: object
          properties:
            invalidFields:
              $ref: '#/components/schemas/InvalidFields'
    TooManyRequests:
      type: object
      additionalProperties: true
      minProperties: 1
      description: RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object.
      properties:
        type:
          type: string
          description: |-
            Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
            It should provide human-readable documentation for the problem type.
            When this member is not present, its value is assumed to be "about:blank".
          format: uri
          example: about:blank
        title:
          type: string
          description: |-
            Short, human-readable summary of the problem type.
            Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
          example: Rate Limit Exceeded
        status:
          type: integer
          description: HTTP status code.
          minimum: 429
          maximum: 429
        detail:
          type: string
          description: Human-readable explanation that is specific to this occurrence of the problem.
          example: A request cannot be executed because the user has sent too many requests within a certain period of time
        instance:
          type: string
          description: |-
            URI reference that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
    CurrencyCode:
      type: string
      description: Currency code in ISO 4217 format.
      minLength: 3
      maxLength: 3
      example: USD
      x-label: Currency
    ContactObject:
      type: object
      description: Contact's information.
      properties:
        firstName:
          description: Contact's first name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Benjamin
        lastName:
          description: Contact's last name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Franklin
        organization:
          description: Contact's organization.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: Rebilly
        address:
          description: First line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
          example: 36 Craven St
        address2:
          description: Second line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
        city:
          description: Contact's city of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Austin
        region:
          description: Contact's region of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Texas
        country:
          description: |-
            Contact's country of residence in ISO 3166 alpha-2 country code.
            For examples, see [ISO.org](https://www.iso.org/obp/ui/#search/code/).
          type:
            - string
            - 'null'
          pattern: ^[A-Z]{2}$
          maxLength: 2
          example: GB
        postalCode:
          description: Contact's postal code.
          type:
            - string
            - 'null'
          pattern: ^[\w\s\-]+$
          maxLength: 10
          example: WC2N 5NF
        phoneNumbers:
          $ref: '#/components/schemas/ContactPhoneNumbers'
        emails:
          $ref: '#/components/schemas/ContactEmails'
        dob:
          description: Contact's date of birth in ISO-8601 `YYYY-MM-DD` format.
          type:
            - string
            - 'null'
          format: date
          example: '1980-04-01'
        jobTitle:
          description: Contact's job title.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: CEO
        hash:
          description: |-
            Hash value for the contact.
            Use this value to compare contacts for identical attribute values.
          type: string
          maxLength: 40
          example: 056ae6d97c788b9e98b049ebafd7b229bf852221
          readOnly: true
    LeadSource:
      allOf:
        - $ref: '#/components/schemas/LeadSourceData'
        - type: object
          properties:
            original:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/LeadSourceData'
    RiskMetadata:
      type: object
      title: Risk metadata
      description: Risk metadata used for 3D Secure and risk scoring.
      properties:
        ipAddress:
          description: Customer's IP address.
          type:
            - string
            - 'null'
          format: ipv4 or ipv6
          example: 93.92.91.90
        fingerprint:
          description: |-
            Customer's device fingerprint.
            A device fingerprint is a unique token that is used to identify the customer.
            The device fingerprint is generated based on device attributes, such as: hardware,
            software, IP address, language, browser, and more.
          type:
            - string
            - 'null'
          maxLength: 50
          example: pIUt3xbgX3l9g3YDiLbx
        httpHeaders:
          oneOf:
            - $ref: '#/components/schemas/HttpHeaders'
            - type: 'null'
        browserData:
          type:
            - object
            - 'null'
          description: Browser data used for 3D Secure and risk scoring.
          required:
            - colorDepth
            - isJavaEnabled
            - language
            - screenWidth
            - screenHeight
            - timeZoneOffset
          properties:
            colorDepth:
              description: |-
                Browser color depth in bits per pixel.
                This value is obtained using the `screen.colorDepth` property.
              type: integer
              minimum: 1
              maximum: 48
              example: 24
            isJavaEnabled:
              description: |-
                Specifies if Java is enabled in a browser.
                This value is obtained from the `navigator.javaEnabled` property.
              type: boolean
            language:
              description: |-
                Browser language settings.
                This value is obtained from the `navigator.language` property.
              type: string
              example: en-US
              maxLength: 8
            screenWidth:
              description: |-
                Width of the browser screen.
                This value is obtained from the `screen.width` property.
              type: integer
              minimum: 0
              maximum: 65535
              example: 1920
            screenHeight:
              description: |-
                Height of the browser screen.
                This value is obtained from the `screen.height` property.
              type: integer
              minimum: 0
              maximum: 65535
              example: 1080
            timeZoneOffset:
              description: |-
                Browser time zone offset in minutes from UTC.
                A positive offset indicates that the local time is behind UTC.
                A negative offset indicates that the local time is ahead of UTC.
                You can find this value using the `(new Date()).getTimezoneOffset()` property.
              type: integer
              minimum: -1410
              maximum: 1410
              example: 300
            isAdBlockEnabled:
              description: Specifies if the usage of ad block has been detected in the browser.
              type:
                - boolean
                - 'null'
        extraData:
          type:
            - object
            - 'null'
          description: Third-party data used for risk scoring.
          properties:
            kountFraudSessionId:
              description: Alpha-numeric `fraudSessionId` as provided by the Kount SDK.
              type:
                - string
                - 'null'
              minLength: 10
              maxLength: 32
              example: abcdefg12345abababab123456789012
            payPalMerchantSessionId:
              description: PayPal `MerchantSessionID` as generated by the PayPal Fraudnet SDK.
              type:
                - string
                - 'null'
              minLength: 1
              maxLength: 64
              example: dd65ratxc5qv15iph3vyoq7l6davuowa
            threatMetrixSessionId:
              description: Temporary identifier that is unique to the visitor session and passed to ThreatMetrix.
              pattern: '[a-zA-Z0-9_-]+'
              type:
                - string
                - 'null'
              minLength: 1
              maxLength: 128
              example: dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa
        isProxy:
          description: Specifies if the customer's IP address is related to a proxy.
          type: boolean
          readOnly: true
        isVpn:
          description: Specifies if the customer's IP address is related to a VPN.
          type: boolean
          readOnly: true
        isTor:
          description: Specifies if the customer's IP address is related to TOR.
          type: boolean
          readOnly: true
        isHosting:
          description: Specifies if the customer's IP address is related to hosting.
          type: boolean
          readOnly: true
        hostingName:
          description: Name of the data center or hosting provider, if available.
          type:
            - string
            - 'null'
          readOnly: true
        isp:
          description: Internet Service Provider (ISP) name, if available.
          type:
            - string
            - 'null'
          readOnly: true
        country:
          description: Country ISO Alpha-2 code of the specified IP address.
          maxLength: 2
          type:
            - string
            - 'null'
          readOnly: true
          example: US
        region:
          description: Region of the specified IP address.
          type:
            - string
            - 'null'
          readOnly: true
          example: NY
        city:
          description: City of the specified IP address.
          type:
            - string
            - 'null'
          readOnly: true
          example: New York
        latitude:
          description: Latitude of the specified IP address.
          type:
            - number
            - 'null'
          format: double
          readOnly: true
        longitude:
          description: Longitude of the specified IP address.
          type:
            - number
            - 'null'
          format: double
          readOnly: true
        postalCode:
          description: Postal code of the specified IP address.
          type:
            - string
            - 'null'
          maxLength: 10
          readOnly: true
        timeZone:
          description: Time zone of the specified IP address.
          type:
            - string
            - 'null'
          readOnly: true
          example: America/New_York
        accuracyRadius:
          description: Accuracy radius of the specified IP address, in kilometers.
          type:
            - integer
            - 'null'
          readOnly: true
        distance:
          description: Distance between the customer's IP address and the billing address geolocation, in kilometers.
          type:
            - integer
            - 'null'
          readOnly: true
        hasMismatchedBillingAddressCountry:
          description: Specifies if the customer's billing address country and geo-IP address are not the same.
          type: boolean
          readOnly: true
        hasMismatchedBankCountry:
          description: Specifies if the customer's bank country and geo-IP address are not the same.
          type: boolean
          readOnly: true
        hasMismatchedTimeZone:
          description: Specifies if the customer's browser time zone and the IP address associated time zone are not the same.
          type: boolean
          readOnly: true
        hasMismatchedHolderName:
          description: Specifies if the customer's billing address name and primary address name are not the same.
          type: boolean
          readOnly: true
        hasFakeName:
          description: Specifies if the holder name seems fake.
          type: boolean
          readOnly: true
        isHighRiskCountry:
          description: Specifies if the geo-IP country, or the customer's billing country, is considered a high risk country.
          type: boolean
          readOnly: true
        paymentInstrumentVelocity:
          description: Number of transactions for this payment instrument, based on fingerprint, in the last 24 hours.
          type: integer
          readOnly: true
        declinedPaymentInstrumentVelocity:
          description: Number of declined transactions for this payment instrument fingerprint in the last 24 hours.
          type: integer
          readOnly: true
        deviceVelocity:
          description: Number of transactions for this device, based on fingerprint, in the last 24 hours.
          type: integer
          readOnly: true
        ipVelocity:
          description: Number of transactions for this IP address in the last 24 hours.
          type: integer
          readOnly: true
        emailVelocity:
          description: Number of transactions for this email address in the last 24 hours.
          type: integer
          readOnly: true
        billingAddressVelocity:
          description: Number of transactions for this billing address in the last 24 hours.
          type: integer
          readOnly: true
        paymentInstrumentApprovedTransactionCount:
          description: Number of approved transactions for this payment instrument.
          type: integer
          readOnly: true
        score:
          description: |-
            Computed risk score based on IP risk data,
            such as: `isVpn`, `isTor`, and `isProxy`.
          type: integer
          readOnly: true
    PaymentCardBrand:
      description: Brand of payment card.
      type: string
      enum:
        - Visa
        - MasterCard
        - American Express
        - Discover
        - Maestro
        - Solo
        - Electron
        - JCB
        - Voyager
        - Diners Club
        - Switch
        - Laser
        - China UnionPay
        - AstroPay Card
    AlternativePaymentMethods:
      type: string
      description: Payment method.
      enum:
        - cash
        - check
        - paypal
        - AdvCash
        - Aera
        - Affirm
        - Afterpay
        - Aircash
        - Alfa-click
        - Alipay
        - AstroPay Card
        - AstroPay-GO
        - BankReferenced
        - bank-transfer
        - bank-transfer-2
        - bank-transfer-3
        - bank-transfer-4
        - bank-transfer-5
        - bank-transfer-6
        - bank-transfer-7
        - bank-transfer-8
        - bank-transfer-9
        - Baloto
        - Beeline
        - Belfius-direct-net
        - bitcoin
        - Bizum
        - Boleto
        - cash-deposit
        - CASHlib
        - CashToCode
        - China UnionPay
        - Clearpay
        - Cleo
        - CODVoucher
        - Commas-Checkout
        - Conekta-oxxo
        - Cupon-de-pagos
        - cryptocurrency
        - domestic-cards
        - Directa24Card
        - echeck
        - ecoPayz
        - ecoPayzTurkey
        - ecoVoucher
        - Efecty
        - EPS
        - ePay.bg
        - eZeeWallet
        - FasterPay
        - Flexepin
        - Fyntra-Checkout
        - Giropay
        - Gpaysafe
        - Google Pay
        - iDebit
        - iDEAL
        - ING-homepay
        - INOVAPAY-pin
        - INOVAPAY-wallet
        - InstaDebit
        - instant-bank-transfer
        - InstantPayments
        - Interac
        - Interac-online
        - Interac-eTransfer
        - invoice
        - iWallet
        - Jeton
        - JetonCash
        - jpay
        - KakaoPay
        - Khelocard
        - Klarna
        - KNOT
        - loonie
        - Matrix
        - MaxiCash
        - Megafon
        - MercadoPago
        - MiFinity-eWallet
        - miscellaneous
        - MobilePay
        - Bancontact
        - Bancontact-mobile
        - MTS
        - Mollie
        - MuchBetter
        - MuchBetterVoucher
        - Multibanco
        - Neosurf
        - Netbanking
        - Neteller
        - Nordea-Solo
        - OchaPay
        - online-bank-transfer
        - Onlineueberweisen
        - oriental-wallet
        - OXXO
        - P24
        - Pagadito
        - PagoEffectivo
        - Pagsmile-deposit-express
        - Pagsmile-lottery
        - PayCash
        - Payco
        - Payeer
        - PaymentAsia-crypto
        - Paymero
        - Perfect-money
        - Piastrix
        - PIX
        - PIX-Automatico
        - plaid-account
        - PayTabs
        - Paysafecard
        - Paysafecash
        - Pay4Fun
        - Paynote
        - PinPay
        - phone
        - PhonePe
        - POLi
        - PostFinance-card
        - PostFinance-e-finance
        - QIWI
        - QPay
        - QQPay
        - Quickpay
        - rapyd-checkout
        - Resurs
        - SafetyPay
        - Samsung Pay
        - SEPA
        - Skrill
        - Skrill Rapid Transfer
        - SMSVoucher
        - Sofort
        - SparkPay
        - swift-dbt
        - Tele2
        - Terminaly-RF
        - Thunes-Checkout
        - ToditoCash-card
        - Trustly
        - Tupay
        - UPayCard
        - UPI
        - USD-coin
        - VCreditos
        - VegaWallet
        - VenusPoint
        - Viva
        - voucher
        - voucher-2
        - voucher-3
        - voucher-4
        - Wallet88
        - Webmoney
        - Webpay
        - Webpay-2
        - Webpay Card
        - WeChat Pay
        - wire
        - XPay-P2P
        - XPay-QR
        - Yandex-money
        - Zotapay
        - Zimpler
        - Zip
    PaymentCardToken:
      type: object
      title: Payment card token
      description: |-
        Creates a payment card token.
        A payment card token is a string that represents a customer's payment card details.
        It can be used once, and expires upon first use or within 30 minutes of token creation.
        To generate a full payment card token, you must provide the `billingAddress`.
        If `billingAddress` is not provided, the token can not be used for payments.
      required:
        - method
        - paymentInstrument
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - payment-card
        paymentInstrument:
          description: Payment card instrument details.
          type: object
          required:
            - expMonth
            - expYear
          properties:
            pan:
              description: |-
                Primary Account Number (PAN) of the payment card.
                This value is required to perform a payment.
              type: string
              writeOnly: true
            cvv:
              description: |-
                Card Verification Value (CVV/CVC) of the payment card.
                Takes precedence over `encryptedCvv` if both are included.
              type: string
              writeOnly: true
            encryptedCvv:
              description: |-
                Encrypted CVV of the payment card.
                Use to update a payment card with a CVV stored on the client side.
                This value is returned for client side caching if `cvv` is provided in the request.
              type:
                - string
                - 'null'
              minLength: 100
              maxLength: 255
            expMonth:
              description: Expiration month of the payment card.
              type: integer
            expYear:
              description: Expiration year of the payment card.
              type: integer
            bin:
              description: |-
                Bank Identification Number (BIN) of the payment card.
                This value is the first 6 digits of the payment card number.
              type:
                - string
                - 'null'
              format: bin
              readOnly: true
            last4:
              description: Last 4 digits of the Primary Account Number (PAN) of the payment card.
              type:
                - string
                - 'null'
              readOnly: true
            brand:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/PaymentCardBrand'
        billingAddress:
          description: |-
            Billing address object.
            This value is required to perform payments.
            For payment-card updates, `billingAddress` can be ignored.
          $ref: '#/components/schemas/ContactObject'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token has been used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    PayPalToken:
      type: object
      title: PayPal token
      required:
        - method
        - paymentInstrument
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - paypal
        paymentInstrument:
          description: Paypal instrument details required for express checkout.
          type: object
          required:
            - billingAgreementToken
            - paypalMerchantId
          properties:
            paypalMerchantId:
              description: ID of the PayPal merchant.
              type: string
            billingAgreementToken:
              description: PayPal billing agreement token.
              type: string
        billingAddress:
          description: Billing address object.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expires.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    BankAccountInstrument:
      type: object
      description: Bank account BBAN or IBAN instrument.
      discriminator:
        propertyName: accountNumberType
        mapping:
          BBAN: '#/components/schemas/BBANInstrument'
          IBAN: '#/components/schemas/IBANInstrument'
      oneOf:
        - $ref: '#/components/schemas/BBANInstrument'
        - $ref: '#/components/schemas/IBANInstrument'
    BankAccountToken:
      type: object
      title: Bank account token
      required:
        - method
        - paymentInstrument
        - billingAddress
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - ach
            - echeck
        paymentInstrument:
          $ref: '#/components/schemas/BankAccountInstrument'
        billingAddress:
          description: Billing address object.
          $ref: '#/components/schemas/ContactObject'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    DigitalWalletToken:
      type: object
      title: Digital wallet token
      required:
        - method
        - paymentInstrument
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - digital-wallet
        paymentInstrument:
          description: Payment instrument details.
          type: object
          required:
            - type
            - amount
            - currency
            - descriptor
            - payload
          properties:
            type:
              description: Type of digital wallet.
              type: string
              enum:
                - Apple Pay
                - Google Pay
                - Samsung Pay
            amount:
              description: Authorized for the digital wallet amount.
              type: number
              format: double
            currency:
              description: Authorized for the digital wallet currency.
              $ref: '#/components/schemas/CurrencyCode'
            descriptor:
              description: Descriptor for a payment.
              type: string
            bin:
              description: |-
                Bank Identification Number (BIN) of the payment card.
                This value is the same as the first 6 digits of the associated Device Primary Account Number (DPAN).
              type:
                - string
                - 'null'
              format: bin
              readOnly: true
            last4:
              description: |-
                Last 4 digits of the Device Primary Account Number (DPAN) of the payment card.
                The DPAN is the tokenized card number used in digital wallet transactions,
                as opposed to the Funding Primary Account Number (FPAN) which is the physical card number visible to the cardholder.
              type: string
              readOnly: true
            fpanLast4:
              description: |-
                Last 4 digits of the Funding Primary Account Number (FPAN) of the payment card.
                The FPAN is the physical card number visible to the cardholder,
                as opposed to the Device Primary Account Number (DPAN) used in digital wallet transactions.
              type:
                - string
                - 'null'
              readOnly: true
            brand:
              readOnly: true
              allOf:
                - $ref: '#/components/schemas/PaymentCardBrand'
            expMonth:
              readOnly: true
              description: Payment card expiration month.
              type: integer
            expYear:
              readOnly: true
              description: Payment card expiration year.
              type: integer
            payload:
              writeOnly: true
              description: |-
                Digital wallet encoded data.
                This field may contain the digital wallet billing address.
              type: object
        billingAddress:
          readOnly: true
          description: Billing address object.
          $ref: '#/components/schemas/ContactObject'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    PlaidAccountToken:
      type: object
      title: Plaid account token
      required:
        - method
        - billingAddress
        - paymentInstrument
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - plaid-account
        paymentInstrument:
          description: Plaid payment instrument details.
          type: object
          required:
            - linkToken
            - publicToken
            - accountId
          properties:
            linkToken:
              type: string
              description: Plaid link token.
              writeOnly: true
            publicToken:
              type: string
              description: Plaid public token.
            accountId:
              type: string
              description: ID of the Plaid account.
        billingAddress:
          description: Billing address object.
          $ref: '#/components/schemas/ContactObject'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    AlternativePaymentToken:
      type: object
      title: Alternative payment token
      required:
        - method
        - billingAddress
      properties:
        method:
          description: Payment method of the token.
          type: string
          allOf:
            - $ref: '#/components/schemas/AlternativePaymentMethods'
            - not:
                enum:
                  - payment-card
                  - paypal
                  - ach
                  - echeck
                  - digital-wallet
                  - plaid-account
                  - Klarna
                  - cryptocurrency
        billingAddress:
          description: Billing address object.
          $ref: '#/components/schemas/ContactObject'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    KlarnaToken:
      type: object
      title: Klarna token
      required:
        - method
        - paymentInstrument
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - Klarna
        paymentInstrument:
          description: Klarna instrument details required for express checkout.
          type: object
          required:
            - klarnaAuthorizationToken
            - klarnaSessionId
          properties:
            klarnaAuthorizationToken:
              description: Klarna authorization token.
              type: string
            klarnaSessionId:
              description: ID of the Klarna session.
              type: string
        billingAddress:
          description: Billing address object.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    CryptocurrencyToken:
      type: object
      title: Cryptocurrency token
      required:
        - method
      properties:
        method:
          description: Payment method of the token.
          type: string
          enum:
            - cryptocurrency
        walletName:
          description: Name of the crypto wallet.
          type:
            - string
            - 'null'
          maxLength: 255
        walletAddress:
          description: Address of the crypto wallet.
          type:
            - string
            - 'null'
          maxLength: 255
        walletCurrency:
          description: Currency of the crypto wallet.
          type:
            - string
            - 'null'
          maxLength: 255
        walletNetwork:
          description: Network of the crypto wallet.
          type:
            - string
            - 'null'
          maxLength: 255
        billingAddress:
          description: Billing address object.
          oneOf:
            - $ref: '#/components/schemas/ContactObject'
            - type: 'null'
        id:
          description: ID of the token.
          readOnly: true
          $ref: '#/components/schemas/ResourceId'
        isUsed:
          description: Specifies if the token is already used.
          type: boolean
          default: false
          readOnly: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        leadSource:
          allOf:
            - $ref: '#/components/schemas/LeadSource'
          writeOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        usageTime:
          description: Date and time when the token is used.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationTime:
          description: Date and time when the token expired.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        _links:
          $ref: '#/components/schemas/SelfLink'
    CompositeToken:
      type: object
      discriminator:
        propertyName: method
        mapping:
          payment-card: '#/components/schemas/PaymentCardToken'
          paypal: '#/components/schemas/PayPalToken'
          ach: '#/components/schemas/BankAccountToken'
          echeck: '#/components/schemas/BankAccountToken'
          digital-wallet: '#/components/schemas/DigitalWalletToken'
          plaid-account: '#/components/schemas/PlaidAccountToken'
          Khelocard: '#/components/schemas/AlternativePaymentToken'
          Klarna: '#/components/schemas/KlarnaToken'
          cash: '#/components/schemas/AlternativePaymentToken'
          check: '#/components/schemas/AlternativePaymentToken'
          AdvCash: '#/components/schemas/AlternativePaymentToken'
          Alfa-click: '#/components/schemas/AlternativePaymentToken'
          Alipay: '#/components/schemas/AlternativePaymentToken'
          AstroPay Card: '#/components/schemas/AlternativePaymentToken'
          AstroPay-GO: '#/components/schemas/AlternativePaymentToken'
          BankReferenced: '#/components/schemas/AlternativePaymentToken'
          bank-transfer: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-2: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-3: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-4: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-5: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-6: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-7: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-8: '#/components/schemas/AlternativePaymentToken'
          bank-transfer-9: '#/components/schemas/AlternativePaymentToken'
          Baloto: '#/components/schemas/AlternativePaymentToken'
          Beeline: '#/components/schemas/AlternativePaymentToken'
          Belfius-direct-net: '#/components/schemas/AlternativePaymentToken'
          bitcoin: '#/components/schemas/AlternativePaymentToken'
          Bizum: '#/components/schemas/AlternativePaymentToken'
          Boleto: '#/components/schemas/AlternativePaymentToken'
          cash-deposit: '#/components/schemas/AlternativePaymentToken'
          CASHlib: '#/components/schemas/AlternativePaymentToken'
          CashToCode: '#/components/schemas/AlternativePaymentToken'
          China UnionPay: '#/components/schemas/AlternativePaymentToken'
          Cleo: '#/components/schemas/AlternativePaymentToken'
          CODVoucher: '#/components/schemas/AlternativePaymentToken'
          Commas-Checkout: '#/components/schemas/AlternativePaymentToken'
          Conekta-oxxo: '#/components/schemas/AlternativePaymentToken'
          Cupon-de-pagos: '#/components/schemas/AlternativePaymentToken'
          cryptocurrency: '#/components/schemas/CryptocurrencyToken'
          domestic-cards: '#/components/schemas/AlternativePaymentToken'
          ecoPayz: '#/components/schemas/AlternativePaymentToken'
          ecoVoucher: '#/components/schemas/AlternativePaymentToken'
          Efecty: '#/components/schemas/AlternativePaymentToken'
          EPS: '#/components/schemas/AlternativePaymentToken'
          ePay.bg: '#/components/schemas/AlternativePaymentToken'
          eZeeWallet: '#/components/schemas/AlternativePaymentToken'
          FasterPay: '#/components/schemas/AlternativePaymentToken'
          Flexepin: '#/components/schemas/AlternativePaymentToken'
          Fyntra-Checkout: '#/components/schemas/AlternativePaymentToken'
          Giropay: '#/components/schemas/AlternativePaymentToken'
          Gpaysafe: '#/components/schemas/AlternativePaymentToken'
          Google Pay: '#/components/schemas/AlternativePaymentToken'
          iDebit: '#/components/schemas/AlternativePaymentToken'
          iDEAL: '#/components/schemas/AlternativePaymentToken'
          ING-homepay: '#/components/schemas/AlternativePaymentToken'
          INOVAPAY-pin: '#/components/schemas/AlternativePaymentToken'
          INOVAPAY-wallet: '#/components/schemas/AlternativePaymentToken'
          InstaDebit: '#/components/schemas/AlternativePaymentToken'
          instant-bank-transfer: '#/components/schemas/AlternativePaymentToken'
          InstantPayments: '#/components/schemas/AlternativePaymentToken'
          Interac: '#/components/schemas/AlternativePaymentToken'
          Interac-online: '#/components/schemas/AlternativePaymentToken'
          Interac-eTransfer: '#/components/schemas/AlternativePaymentToken'
          invoice: '#/components/schemas/AlternativePaymentToken'
          iWallet: '#/components/schemas/AlternativePaymentToken'
          Jeton: '#/components/schemas/AlternativePaymentToken'
          jpay: '#/components/schemas/AlternativePaymentToken'
          KNOT: '#/components/schemas/AlternativePaymentToken'
          loonie: '#/components/schemas/AlternativePaymentToken'
          Matrix: '#/components/schemas/AlternativePaymentToken'
          MaxiCash: '#/components/schemas/AlternativePaymentToken'
          Megafon: '#/components/schemas/AlternativePaymentToken'
          MiFinity-eWallet: '#/components/schemas/AlternativePaymentToken'
          miscellaneous: '#/components/schemas/AlternativePaymentToken'
          Bancontact: '#/components/schemas/AlternativePaymentToken'
          Bancontact-mobile: '#/components/schemas/AlternativePaymentToken'
          MTS: '#/components/schemas/AlternativePaymentToken'
          MuchBetter: '#/components/schemas/AlternativePaymentToken'
          Multibanco: '#/components/schemas/AlternativePaymentToken'
          Neosurf: '#/components/schemas/AlternativePaymentToken'
          Netbanking: '#/components/schemas/AlternativePaymentToken'
          Neteller: '#/components/schemas/AlternativePaymentToken'
          Nordea-Solo: '#/components/schemas/AlternativePaymentToken'
          OchaPay: '#/components/schemas/AlternativePaymentToken'
          online-bank-transfer: '#/components/schemas/AlternativePaymentToken'
          Onlineueberweisen: '#/components/schemas/AlternativePaymentToken'
          oriental-wallet: '#/components/schemas/AlternativePaymentToken'
          OXXO: '#/components/schemas/AlternativePaymentToken'
          P24: '#/components/schemas/AlternativePaymentToken'
          Pagadito: '#/components/schemas/AlternativePaymentToken'
          PagoEffectivo: '#/components/schemas/AlternativePaymentToken'
          Pagsmile-deposit-express: '#/components/schemas/AlternativePaymentToken'
          Pagsmile-lottery: '#/components/schemas/AlternativePaymentToken'
          PayCash: '#/components/schemas/AlternativePaymentToken'
          Payeer: '#/components/schemas/AlternativePaymentToken'
          PaymentAsia-crypto: '#/components/schemas/AlternativePaymentToken'
          Paymero: '#/components/schemas/AlternativePaymentToken'
          Perfect-money: '#/components/schemas/AlternativePaymentToken'
          Piastrix: '#/components/schemas/AlternativePaymentToken'
          PayTabs: '#/components/schemas/AlternativePaymentToken'
          Paysafecard: '#/components/schemas/AlternativePaymentToken'
          Paysafecash: '#/components/schemas/AlternativePaymentToken'
          Pay4Fun: '#/components/schemas/AlternativePaymentToken'
          Paynote: '#/components/schemas/AlternativePaymentToken'
          PinPay: '#/components/schemas/AlternativePaymentToken'
          phone: '#/components/schemas/AlternativePaymentToken'
          PhonePe: '#/components/schemas/AlternativePaymentToken'
          POLi: '#/components/schemas/AlternativePaymentToken'
          PostFinance-card: '#/components/schemas/AlternativePaymentToken'
          PostFinance-e-finance: '#/components/schemas/AlternativePaymentToken'
          QIWI: '#/components/schemas/AlternativePaymentToken'
          QPay: '#/components/schemas/AlternativePaymentToken'
          QQPay: '#/components/schemas/AlternativePaymentToken'
          rapyd-checkout: '#/components/schemas/AlternativePaymentToken'
          Resurs: '#/components/schemas/AlternativePaymentToken'
          SafetyPay: '#/components/schemas/AlternativePaymentToken'
          SEPA: '#/components/schemas/AlternativePaymentToken'
          Skrill: '#/components/schemas/AlternativePaymentToken'
          Skrill Rapid Transfer: '#/components/schemas/AlternativePaymentToken'
          SMSVoucher: '#/components/schemas/AlternativePaymentToken'
          Sofort: '#/components/schemas/AlternativePaymentToken'
          SparkPay: '#/components/schemas/AlternativePaymentToken'
          swift-dbt: '#/components/schemas/AlternativePaymentToken'
          Tele2: '#/components/schemas/AlternativePaymentToken'
          Terminaly-RF: '#/components/schemas/AlternativePaymentToken'
          ToditoCash-card: '#/components/schemas/AlternativePaymentToken'
          Trustly: '#/components/schemas/AlternativePaymentToken'
          UPayCard: '#/components/schemas/AlternativePaymentToken'
          UPI: '#/components/schemas/AlternativePaymentToken'
          USD-coin: '#/components/schemas/AlternativePaymentToken'
          VCreditos: '#/components/schemas/AlternativePaymentToken'
          VenusPoint: '#/components/schemas/AlternativePaymentToken'
          voucher: '#/components/schemas/AlternativePaymentToken'
          voucher-2: '#/components/schemas/AlternativePaymentToken'
          voucher-3: '#/components/schemas/AlternativePaymentToken'
          voucher-4: '#/components/schemas/AlternativePaymentToken'
          Webmoney: '#/components/schemas/AlternativePaymentToken'
          Webpay: '#/components/schemas/AlternativePaymentToken'
          Webpay-2: '#/components/schemas/AlternativePaymentToken'
          Webpay Card: '#/components/schemas/AlternativePaymentToken'
          WeChat Pay: '#/components/schemas/AlternativePaymentToken'
          XPay-P2P: '#/components/schemas/AlternativePaymentToken'
          XPay-QR: '#/components/schemas/AlternativePaymentToken'
          Yandex-money: '#/components/schemas/AlternativePaymentToken'
          Zotapay: '#/components/schemas/AlternativePaymentToken'
          Zimpler: '#/components/schemas/AlternativePaymentToken'
      oneOf:
        - $ref: '#/components/schemas/PaymentCardToken'
        - $ref: '#/components/schemas/PayPalToken'
        - $ref: '#/components/schemas/BankAccountToken'
        - $ref: '#/components/schemas/DigitalWalletToken'
        - $ref: '#/components/schemas/PlaidAccountToken'
        - $ref: '#/components/schemas/KlarnaToken'
        - $ref: '#/components/schemas/AlternativePaymentToken'
        - $ref: '#/components/schemas/CryptocurrencyToken'
  responses:
    Unauthorized:
      description: |-
        Unauthorized access.
        Invalid credentials used.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    Forbidden:
      description: |-
        Access forbidden.
        If the organization requires multi-factor authentication (MFA) and the session has not passed MFA, `error` is `mfa_required`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
    ValidationError:
      description: Invalid data sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    TooManyRequests:
      description: Request rate limit exceeded.
      headers:
        Rate-Limit-Limit:
          $ref: '#/components/headers/Rate-Limit-Limit'
        Rate-Limit-Remaining:
          description: |-
            Number of requests still available for this rate limit.
            For more information, see [Rate limits](#section/Rate-limits).
          schema:
            type: integer
          example: 0
        Rate-Limit-Retry-After:
          $ref: '#/components/headers/Rate-Limit-Retry-After'
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
          example: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TooManyRequests'
```
