# Payment card expiration reminder, 1 day before expiration

`POST payment-card-expiration-reminder-1-day`

> This is a subset of the full specification, limited to the `POST payment-card-expiration-reminder-1-day` 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 payment-card-expiration-reminder-1-day` 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 instruments
    description: |-
      Use these operations to manage payment instruments.
      Payment instrument is a term which describes any means of making a digital payment, such as:
      credit cards, debit cards, direct debits, payment service providers, and digital wallets.

      For more information on payment instruments, see [Payment instruments](https://www.rebilly.com/docs/dev-docs/concepts/#payment-instruments).
x-tagGroups:
  - name: Payment Instruments
    tags:
      - Payment instruments
paths: {}
webhooks:
  payment-card-expiration-reminder-1-day:
    post:
      summary: Payment card expiration reminder, 1 day before expiration
      description: |-
        Sends a reminder when the active default payment card of a customer is 1 day from expiring.
        The reminder is sent only when the customer has an order that contains subscription items,
        and that order has started and is not churned.
        The reminder is sent once for that expiration, and remains available until the card expires.
        For more information, see [Payment card expiration reminders](https://www.rebilly.com/docs/dev-docs/payment-instruments/#payment-card-expiration-reminders).
      operationId: payment-card-expiration-reminder-1-day
      x-products:
        - Core
      tags:
        - Payment instruments
      requestBody:
        $ref: '#/components/requestBodies/PaymentCardExpirationReminderWebhook'
      responses:
        2xx:
          description: Returns any 2xx status to indicate that data is received.
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
    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
  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
    CustomerId:
      type: string
      description: ID of the customer resource.
      maxLength: 50
      example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
      x-basic: true
    ResourceCustomFields:
      description: |-
        Use custom fields to extend a resource scheme to include custom data that is not provided as a common field.
        For more information, see [Custom fields](https://www.rebilly.com/catalog/all/custom-fields).
      type: object
      default: {}
      example:
        foo: bar
    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
    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
    UseAsBackup:
      description: Specifies if this payment instrument can be used as a backup for invoice payment retries.
      type: boolean
      default: false
    LastPaymentTime:
      description: |-
        Date and time of the last approved payment.
        Payments are the result of `sale` or `capture` transactions.
      type:
        - string
        - 'null'
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Payment Time
    PaymentCard:
      type: object
      description: Payment card information.
      title: Payment card
      required:
        - method
      properties:
        id:
          type: string
          description: ID of the payment instrument.
          readOnly: true
          maxLength: 50
          example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
        customerId:
          $ref: '#/components/schemas/CustomerId'
        method:
          description: Method of payment instrument.
          type: string
          readOnly: true
          enum:
            - payment-card
        status:
          type: string
          description: |-
            Status of the payment instrument.
            An `active` status means that a payment instrument has been used at least once for an approved transaction.
            To remove an instrument from use, set this value to `deactivated`.

            For more information, see [`POST /payment-instruments/{id}/deactivation`](https://www.rebilly.com/catalog/all/payment-instruments/postpaymentinstrumentdeactivation).
          enum:
            - active
            - inactive
            - expired
            - deactivated
            - verification-needed
        fingerprint:
          description: |-
            Unique value that is used to identify the payment instrument.
            This value is generated from the `bin` and the `last4` values.
            This value contains alphanumeric characters.
          type: string
          readOnly: true
        bin:
          description: |-
            Bank Identification Number (BIN) of the payment card.
            This value is the same as the first 6 digits of the associated Primary Account Number (PAN).
          type: string
          format: bin
          readOnly: true
        last4:
          description: Last 4 digits of the associated Primary Account Number (PAN).
          type: string
          readOnly: true
        fpanLast4:
          description: |-
            Last 4 digits of the Funding Primary Account Number (FPAN) of the payment card.
            This value is only present for payment cards created from digital wallet tokens,
            where the FPAN is the physical card number visible to the cardholder,
            as opposed to the Device Primary Account Number (DPAN) used in the digital wallet transaction.
          type:
            - string
            - 'null'
          readOnly: true
        pan:
          description: Primary Account Number (PAN) of the payment card.
          type: string
          writeOnly: true
        expYear:
          description: Expiration year of the payment card.
          type: integer
        expMonth:
          description: Expiration month of the payment card.
          type: integer
        cvv:
          description: Card Verification Value (CVV) of the payment card.
          type: string
          writeOnly: true
        brand:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/PaymentCardBrand'
        bankCountry:
          description: Bank country of the payment instrument.
          type:
            - string
            - 'null'
          readOnly: true
        bankName:
          description: Bank name of the payment instrument.
          type: string
          readOnly: true
        isPayoutable:
          description: |-
            Specifies if payouts are supported for cards with this BIN.
            Defaults to `true`.
            This value is `false` if the BIN does not support payouts.
          type: boolean
          readOnly: true
        billingAddress:
          description: Contact's billing address.
          $ref: '#/components/schemas/ContactObject'
        useAsBackup:
          $ref: '#/components/schemas/UseAsBackup'
        billingPortalUrl:
          description: URL of the billing portal where the card can be updated.
          type: string
          readOnly: true
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        lastPaymentTime:
          $ref: '#/components/schemas/LastPaymentTime'
        customFields:
          $ref: '#/components/schemas/ResourceCustomFields'
        stickyGatewayAccountId:
          description: |-
            ID of the sticky gateway account.
            All future payments are processed by this gateway account.

            For more information,
            see [Gateway routing](https://www.rebilly.com/docs/settings/intelligent-payment-routing/#sticky-gateway-accounts).
          type:
            - string
            - 'null'
          readOnly: true
        expirationReminderTime:
          description: Date and time when an expiration reminder event is triggered.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        expirationReminderNumber:
          description: Number of expiration reminder events that have triggered.
          type:
            - integer
            - 'null'
          readOnly: true
        referenceData:
          description: Payment instrument reference data.
          type: object
          additionalProperties:
            type: string
          example:
            gatewayTransactionId: GAT123
        digitalWallet:
          readOnly: true
          description: Digital wallet type.
          type:
            - string
            - 'null'
          enum:
            - Apple Pay
            - Google Pay
            - Samsung Pay
            - null
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        revision:
          description: |-
            Number of times the payment instrument data has been modified.

            Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.
          type: integer
          readOnly: true
        _links:
          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
                  - customer
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
  requestBodies:
    PaymentCardExpirationReminderWebhook:
      content:
        application/json:
          schema:
            properties:
              paymentCardId:
                description: ID of the payment card.
                type: string
              eventType:
                description: Type of event that triggered the webhook.
                type: string
                enum:
                  - payment-card-expiration-reminder-14-days
                  - payment-card-expiration-reminder-7-days
                  - payment-card-expiration-reminder-1-day
              _embedded:
                type: object
                description: Embedded objects related to the payment card event.
                properties:
                  paymentCard:
                    $ref: '#/components/schemas/PaymentCard'
              _links:
                type: array
                description: Links to related resources.
                items:
                  type: object
                  properties:
                    href:
                      description: URL of the link.
                      type: string
                    rel:
                      description: Relationship type of the link.
                      type: string
                      enum:
                        - paymentCard
      description: Payload of the payment card expiration reminder webhook event.
```
