---
updatedAt: 2026-04-28T19:11:36.000Z
agentTools:
  projectIndex: https://docs.rainforestpay.com/llms.txt
---

# Create payin config

Create the configuration for a payin request. The configuration contains basic information about the payin such as the merchant, idempotency key, payin amount, currency, and optional information such as billing contact, level 2 and 3, and metadata. If the billing contact is provided in the payin config, then the web component will not prompt for this data. These fields include country and postal code for a CARD payment method and name for an ACH payment method. This allows a payin to be set up before collecting the sensitive payin details (i.e the card number) via the web component. The merchant status must be `ACTIVE` to create a payin config.

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Payments",
    "version": "1.0.0",
    "description": "This resource is used for payment actions",
    "contact": {
      "name": "Rainforest",
      "email": "support@rainforestpay.com",
      "url": "https://rainforestpay.com"
    }
  },
  "servers": [
    {
      "url": "https://api.sandbox.rainforestpay.com",
      "description": "Sandbox server"
    },
    {
      "url": "https://api.rainforestpay.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/v1/device_registrations": {
      "post": {
        "operationId": "create_device_registration",
        "summary": "Create device registration",
        "description": "Create a device registration for payment processing on a specific merchant. When a device is registered, the device receives a new device_registration_id for payment processing. The merchant status must be `ACTIVE` to register a device.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "merchant_id": {
                    "description": "The unique merchant identifier. \n\nPrefix is \"mid\" in production and \"sbx_mid\" in sandbox.",
                    "type": "string",
                    "example": "mid_2DrDFJPutxE5AIbJSopAnqniEbr"
                  },
                  "registration_code": {
                    "description": "The code that appears on an internet-connected device when it is not yet registered or has been deregistered.\n\nOn sandbox, a virtual device can be registered to test the device integration without a physical device. Use the registration code `VIRTUAL_DEVICE` to register a virtual device to any sandbox merchant account.",
                    "type": "string"
                  },
                  "device_name": {
                    "description": "The name that will appear on the device screen when internet-connected.",
                    "type": "string",
                    "maxLength": 20,
                    "minLength": 1
                  }
                },
                "required": [
                  "merchant_id",
                  "registration_code",
                  "device_name"
                ]
              },
              "examples": {
                "virtual_device": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "registration_code": "VIRTUAL_DEVICE",
                    "device_name": "Test Device"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "device_registration_id": {
                          "name": "device_registration_id",
                          "schema": {
                            "type": "string"
                          },
                          "required": true,
                          "description": "The unique device registration identifier.\n\nPrefix is \"dvc\" in production and \"sbx_dvc\" in sandbox.",
                          "examples": {
                            "production": {
                              "value": "dvc_2DrDKk5NIMbpuNGqm109SkpGDHh"
                            },
                            "sandbox": {
                              "value": "sbx_dvc_2DrDKk5NIMbpuNGqm109SkpGDHh"
                            }
                          }
                        },
                        "merchant_id": {
                          "name": "merchant_id",
                          "schema": {
                            "type": "string"
                          },
                          "description": "The unique merchant identifier. \n\nPrefix is \"mid\" in production and \"sbx_mid\" in sandbox.",
                          "examples": {
                            "production": {
                              "value": "mid_2DrDFJPutxE5AIbJSopAnqniEbr"
                            },
                            "sandbox": {
                              "value": "sbx_mid_2DrDFJPutxE5AIbJSopAnqniEbr"
                            }
                          }
                        },
                        "make": {
                          "description": "The make of the device.",
                          "type": "string"
                        },
                        "model": {
                          "description": "The model of the device.",
                          "type": "string"
                        },
                        "serial_number": {
                          "description": "The serial number of the device.",
                          "type": "string"
                        },
                        "device_name": {
                          "description": "The name that will appear on the device screen when internet-connected.",
                          "type": "string"
                        },
                        "capabilities": {
                          "readOnly": true,
                          "description": "The supported device registration capabilities.\n\n`SIGNATURE` - supports collecting a digital signature",
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "SIGNATURE"
                            ]
                          }
                        },
                        "created_at": {
                          "description": "Date and time the device registration was created in UTC RFC 3339 format.",
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:00:00Z"
                        },
                        "deleted_at": {
                          "description": "Date and time the device registration was deleted in UTC RFC 3339 format.",
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:00:00Z"
                        }
                      }
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Devices"
        ]
      }
    },
    "/v1/payin_configs": {
      "post": {
        "operationId": "create_payin_config",
        "summary": "Create payin config",
        "description": "Create the configuration for a payin request. The configuration contains basic information about the payin such as the merchant, idempotency key, payin amount, currency, and optional information such as billing contact, level 2 and 3, and metadata. If the billing contact is provided in the payin config, then the web component will not prompt for this data. These fields include country and postal code for a CARD payment method and name for an ACH payment method. This allows a payin to be set up before collecting the sensitive payin details (i.e the card number) via the web component. The merchant status must be `ACTIVE` to create a payin config.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data",
                "required": [
                  "merchant_id",
                  "amount",
                  "currency_code",
                  "idempotency_key"
                ]
              },
              "examples": {
                "required_fields": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD"
                  }
                },
                "amount_splits_and_metadata": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "amount_splits": [
                      {
                        "amount": 3,
                        "currency_code": "USD",
                        "type": "PLATFORM"
                      }
                    ],
                    "metadata": {
                      "key1": "value1",
                      "key2": {
                        "inner_key1": "inner_value1"
                      }
                    }
                  }
                },
                "billing_contact": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "billing_contact": {
                      "name": "Jane Smith",
                      "address_line_1": "3423 Piedmont Rd",
                      "address_line_2": "Suite 123",
                      "city": "Atlanta",
                      "state": "GA",
                      "postal_code": "30305",
                      "country": "US",
                      "email": "janesmith@example.com",
                      "phone": "4041234567"
                    }
                  }
                },
                "request_wallet_address_and_contact": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "billing_contact": {
                      "name": "Jane Smith",
                      "address_line_1": "3423 Piedmont Rd",
                      "address_line_2": "Suite 123",
                      "city": "Atlanta",
                      "state": "GA",
                      "postal_code": "30305",
                      "country": "US",
                      "email": "janesmith@example.com",
                      "phone": "4041234567",
                      "request_wallet_address": true,
                      "request_wallet_contact": true
                    }
                  }
                },
                "level_2_data": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "level_2_3": {
                      "tax_amount": 100,
                      "shipping_amount": 100,
                      "order_number": "order_123"
                    }
                  }
                },
                "level_3_data": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "level_2_3": {
                      "tax_amount": 100,
                      "shipping_amount": 100,
                      "order_number": "order_123",
                      "shipping_country": "US",
                      "shipping_postal_code": "30305",
                      "shipping_from_postal_code": "30305",
                      "commodity_code": "commodity_code",
                      "line_items": [
                        {
                          "product_code": "product code",
                          "description": "product description",
                          "unit_amount": 100,
                          "unit_of_measure": "EACH",
                          "quantity": 1,
                          "total_amount": 100,
                          "tax_amount": 100,
                          "tax_rate": 1000,
                          "discount_amount": 100,
                          "discount_rate": 1000
                        }
                      ]
                    }
                  }
                },
                "all_fields": {
                  "value": {
                    "merchant_id": "mid_2DrDFJPutxE5AIbJSopAnqniEbr",
                    "idempotency_key": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "amount": 100,
                    "currency_code": "USD",
                    "amount_splits": [
                      {
                        "amount": 3,
                        "currency_code": "USD",
                        "type": "PLATFORM"
                      }
                    ],
                    "level_2_3": {
                      "tax_amount": 100,
                      "shipping_amount": 100,
                      "order_number": "order_123",
                      "shipping_country": "US",
                      "shipping_postal_code": "30305",
                      "shipping_from_postal_code": "30305",
                      "commodity_code": "commodity_code",
                      "line_items": [
                        {
                          "product_code": "product code",
                          "description": "product description",
                          "unit_amount": 100,
                          "unit_of_measure": "EACH",
                          "quantity": 1,
                          "total_amount": 100,
                          "tax_amount": 100,
                          "tax_rate": 1000,
                          "discount_amount": 100,
                          "discount_rate": 1000
                        }
                      ]
                    },
                    "metadata": {
                      "key1": "value1",
                      "key2": {
                        "inner_key1": "inner_value1"
                      }
                    },
                    "method_metadata": {
                      "key1": "value1",
                      "key2": {
                        "inner_key1": "inner_value1"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "payin_config_id": {
                          "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/threeds_attempt/properties/payin_config_id",
                          "readOnly": true
                        },
                        "payment_method_config_id": {
                          "readOnly": true,
                          "description": "The unique payment method config identifier. \n\nPrefix is \"pmc\" in production and \"sbx_pmc\" in sandbox.",
                          "type": "string",
                          "example": "pmc_2DrDPKzdQypRudLd8DhQKZX27dA"
                        },
                        "merchant_id": {
                          "$ref": "#/paths/~1v1~1device_registrations/post/requestBody/content/application~1json/schema/properties/merchant_id"
                        },
                        "merchant": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/paths/~1v1~1device_registrations/post/requestBody/content/application~1json/schema/properties/merchant_id",
                              "readOnly": true
                            },
                            "name": {
                              "readOnly": true,
                              "description": "The unique identifier for the merchant business name.",
                              "type": "string",
                              "example": "Merchant",
                              "maxLength": 100
                            },
                            "dba_name": {
                              "readOnly": true,
                              "description": "The merchant’s public-facing name. This may be the same as the legal name if the merchant does not operate under a different name. When creating or updating a merchant, this must be at least 5 characters. Existing merchants may have shorter values from before this requirement was introduced.",
                              "type": "string",
                              "example": "Merchant",
                              "maxLength": 100
                            }
                          }
                        },
                        "idempotency_key": {
                          "$ref": "#/paths/~1v1~1refunds~1{refund_id}~1void/post/requestBody/content/application~1json/schema/properties/idempotency_key"
                        },
                        "amount": {
                          "description": "The total amount allowed to process, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100,
                          "minimum": 1
                        },
                        "currency_code": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                        },
                        "amount_splits": {
                          "description": "Represents how the payin should be allocated between the originating merchant, the platform, and one or more other merchants.\n\nA `PLATFORM` split defines a platform fee on the payin. A maximum of one `PLATFORM` split is permitted per payin.\n\nA `MERCHANT` split allocates a portion of the payin to the specified merchant. Multiple `MERCHANT` splits are permitted. Each `MERCHANT` split must specify a unique merchant_id.\n\nAny remaining amount not specified by the amount splits will be allocated to the originating merchant associated with the payin.\n\nIf no amount splits are provided, the total amount will be allocated to the originating merchant.\n\nThe amount split is defined as a rate and amount. The split is calculated based on the pre-tip (when collecting a tip on a device) authorized amount of the payin.\n\nFor example, to assess a platform fee of 1% + $5.00, specify 1000 in the rate and 500 in the amount. Be careful to account for any processing fees that will be netted before computing amount splits.",
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1capture/post/requestBody/content/application~1json/schema/properties/amount_splits"
                        },
                        "billing_fees_reversal_config": {
                          "description": "Controls whether the billing fees for this payin are returned to the originating merchant on a refund for the full amount or an ACH return. When not provided, both attributes default to the merchant's configuration.",
                          "type": "object",
                          "properties": {
                            "on_full_refund": {
                              "description": "Determines whether the billing fees for this payin are returned to the merchant when a refund for the full amount is processed.\n\nWhen `true`, the billing fee is credited back to the merchant and included in the refund's computed billing fee.\n\nThis field can also be defined on the refund request and will take precedence over the configuration defined on this payin config.",
                              "type": "boolean",
                              "default": false
                            },
                            "on_ach_return": {
                              "description": "Determines whether the billing fees for this payin are returned to the merchant when an ACH return is processed.\n\nWhen `true`, the billing fee is credited back to the merchant and included in the ACH return's computed billing fee.",
                              "type": "boolean",
                              "default": false
                            }
                          }
                        },
                        "merchant_billing": {
                          "description": "The billing rate and fee to calculate the merchant's billing fee on the authorized amount of the payin.\n\nSet the top-level rate, rate cap, and fee to define a billing fee regardless of the payment method the end user pays with.\n\nSet one or more payment method objects to define separate billing fees for each payment method.\n\nSee the [dynamic payment billing fees guide](https://docs.rainforestpay.com/docs/dynamic-payment-billing-fees) for additional details on how Rainforest determines the billing fees for the payment.",
                          "type": "object",
                          "properties": {
                            "rate": {
                              "description": "Rate, in percent mille (1 PCM = 0.001%).\n\nFor example, 3000 is 3%.",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 25000
                            },
                            "rate_cap": {
                              "description": "Rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.\n\nThe following validation must be met:\n- If the `rate` is greater than 0%, then the `rate_cap` must be greater than $0. For example, to bill a rate of 1% up to $100 set the value to `10000`.\n- If the `rate` is 0%, then the `rate_cap` must be $0.",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000000
                            },
                            "fee": {
                              "description": "Fee, in minor units. \n\nFor example, 1000 is 10.00 USD.\n\nThe fee can be up to $10, regardless of the amount of the payin. However, if the fee is greater than $10, then the fee cannot be greater than the `amount` field.\n\nValid requests: \n- Fee of $10 on a $5 payin. \n- Fee of $11 on a $20 payin.\n\nInvalid requests: \n- Fee of $11 on a $5 payin.",
                              "type": "integer",
                              "minimum": 0
                            },
                            "currency_code": {
                              "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                            },
                            "card": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            },
                            "ach": {
                              "description": "The billing rate and fee to calculate the merchant's billing fee for this specific payment method.\n\nThis takes precedence and overrides the rate and fee defined by the top-level merchant_billing object and the merchant's billing profile.",
                              "type": "object",
                              "properties": {
                                "rate": {
                                  "description": "Rate, in percent mille (1 PCM = 0.001%).\n\nFor example, 3000 is 3%.",
                                  "type": "integer",
                                  "required": true,
                                  "minimum": 0,
                                  "maximum": 25000
                                },
                                "rate_cap": {
                                  "description": "Rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.\n\nThe following validation must be met:\n- If the `rate` is greater than 0%, then the `rate_cap` must be greater than $0. For example, to bill a rate of 1% up to $100 set the value to `10000`.\n- If the `rate` is 0%, then the `rate_cap` must be $0.",
                                  "type": "integer",
                                  "required": true,
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                "fee": {
                                  "description": "Fee, in minor units.\n\nFor example, 1000 is 10.00 USD.\n\nThe fee can be up to $10, regardless of the amount of the payin. However, if the fee is greater than $10, then the fee cannot be greater than the `amount` field.",
                                  "type": "integer",
                                  "required": true,
                                  "minimum": 0
                                },
                                "currency_code": {
                                  "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code",
                                  "required": true
                                }
                              }
                            },
                            "validated_ach": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            },
                            "accelerated_ach": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            },
                            "paypal_wallet": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            },
                            "venmo": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            },
                            "paypal_paylater": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_billing/properties/ach"
                            }
                          }
                        },
                        "allow_bin_lookup": {
                          "description": "Boolean indicating if BIN data is returned when a user is inputting the card number into the Payment Component.",
                          "type": "boolean",
                          "default": false
                        },
                        "allow_partial_authorization": {
                          "description": "Boolean indicating if partial amount can be authorized on a card payment, if supported by the issuing bank.",
                          "type": "boolean"
                        },
                        "billing_contact": {
                          "description": "Billing contact details.\n\nWhen processing a payin or storing a payment method via the Payment Component, the `request_wallet_address` and `request_wallet_contact` fields can be set to request the billing contact address and contact information (email and phone) from the end user within the wallet flows.\n\nWhen processing a payin from a stored payment method, the billing contact set on the config will merge with the billing contact on the stored payment method. This allows the billing contact to be updated on a stored payment method.",
                          "allOf": [
                            {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "request_wallet_address": {
                                  "description": "Request the end user's address when processing from a wallet in the Payment Component.\n\nSupported for Apple Pay, Google Pay, PayPal, Venmo, and PayPal Pay Later.\n\nThe `name`, `address_line_1`, `address_line_2`, `city`, `state`, `postal_code`, `country` collected from the wallet will be set on the payin and payment method and override the fields passed in the config.",
                                  "type": "boolean",
                                  "default": false
                                },
                                "request_wallet_contact": {
                                  "description": "Request the end user's contact details, including email and phone, when processing from a wallet in the Payment Component.\n\nEmail and phone are supported for Apple Pay, Google Pay, PayPal, Venmo, and PayPal Pay Later.\n\nThe contact details collected from the wallet will be set on the payin and payment method and override the fields passed in the config.",
                                  "type": "boolean",
                                  "default": false
                                }
                              }
                            }
                          ]
                        },
                        "shipping_address": {
                          "description": "Shipping address details.\n\nWhen processing a payin or storing a payment method via the Payment Component, the `request_wallet_address` field can be set to request the shipping address from the end user within the wallet flows.\n\nWhen processing a payin from a stored payment method, the shipping address set on the config will merge with the shipping address on the stored payment method. This allows the shipping address to be updated on a stored payment method.",
                          "allOf": [
                            {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/shipping_address"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "request_wallet_address": {
                                  "description": "Request the end user's shipping address when processing from a wallet in the Payment Component.\n\nSupported for Apple Pay and Google Pay.\n\nThe `name`, `address_line_1`, `address_line_2`, `city`, `state`, `postal_code`, `country` collected from the wallet will be set on the payin and payment method and override the fields passed in the config.",
                                  "type": "boolean"
                                }
                              }
                            }
                          ]
                        },
                        "risk_data": {
                          "description": "Platform payment data that provides additional context to the risk review of the payin.",
                          "type": "object",
                          "properties": {
                            "external_ref": {
                              "description": "Platform identifier for the payin, such as an invoice ID or order ID.",
                              "type": "string",
                              "maxLength": 100,
                              "minLength": 1
                            },
                            "end_user_ref": {
                              "description": "Platform identifier for the end user processing the payin with the merchant, such as an account ID.",
                              "type": "string",
                              "maxLength": 100,
                              "minLength": 1
                            }
                          }
                        },
                        "level_2_3": {
                          "description": "Level 2 and Level 3 data is submitted with a business or commercial card to provide additional benefit to the cardholder through enhanced payin information, and benefits the merchant with lower interchange rates.",
                          "type": "object",
                          "properties": {
                            "tax_amount": {
                              "description": "The sales tax included in the total payin amount associated with the item(s) being purchased, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                              "type": "integer"
                            },
                            "shipping_amount": {
                              "description": "The freight or shipping amount included in the total payin amount, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                              "type": "integer"
                            },
                            "order_number": {
                              "description": "The purchase order number.",
                              "type": "string"
                            },
                            "shipping_country": {
                              "description": "The 2-digit country code for the delivery address of the item(s) being purchased. \n\nFind country codes here: https://www.iso.org/obp",
                              "type": "string",
                              "example": "US",
                              "maxLength": 2,
                              "minLength": 2
                            },
                            "shipping_postal_code": {
                              "description": "Postal code or ZIP code for the delivery address of the item(s) being purchased. This field can be identical to the `shipping_from_postal_code` if the customer is present and takes immediate possession of the item(s).",
                              "type": "string",
                              "example": "30305"
                            },
                            "shipping_from_postal_code": {
                              "description": "Postal code or ZIP code of the address the item(s) being purchased are shipped from.",
                              "type": "string",
                              "example": "30305"
                            },
                            "commodity_code": {
                              "description": "The commodity code of the item(s) being purchased.",
                              "type": "string"
                            },
                            "line_items": {
                              "description": "The details on the item(s) being purchased.",
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "product_code": {
                                    "description": "The merchant defined product code of the item being purchased.",
                                    "type": "string"
                                  },
                                  "commodity_code": {
                                    "description": "The commodity code of the item being purchased.",
                                    "type": "string"
                                  },
                                  "description": {
                                    "description": "The description of the item being purchased.",
                                    "type": "string"
                                  },
                                  "unit_amount": {
                                    "description": "The amount of the item being purchased, in minor units. Defaults to 0.\n\nFor example, 1000 is 10.00 USD.",
                                    "type": "integer",
                                    "default": 0
                                  },
                                  "unit_of_measure": {
                                    "description": "A unit of measure as used in international trade, such as each, gallons, feet, etc. Defaults to EACH.",
                                    "type": "string",
                                    "default": "EACH"
                                  },
                                  "quantity": {
                                    "description": "The quantity of the item.",
                                    "type": "integer"
                                  },
                                  "total_amount": {
                                    "description": "The total amount of the item being purchased, in minor units. Defaults to (unit_amount x quantity) - discount_amount, rounded to the nearest penny.\n\nFor example, 1000 is 10.00 USD.",
                                    "type": "integer"
                                  },
                                  "tax_amount": {
                                    "description": "The sales tax on the item being purchased, in minor units. Defaults to 0.\n\nFor example, 1000 is 10.00 USD.",
                                    "type": "integer",
                                    "default": 0
                                  },
                                  "tax_rate": {
                                    "description": "The percentage representing the value-added tax applied, in per cent mille. Defaults to 0.\n\nFor example, 1000 is 1%.",
                                    "type": "integer",
                                    "default": 0,
                                    "maximum": 100000
                                  },
                                  "discount_amount": {
                                    "description": "The discount on the item being purchased, in minor units. Defaults to 0.\n\nFor example, 1000 is 10.00 USD.",
                                    "type": "integer",
                                    "default": 0
                                  },
                                  "discount_rate": {
                                    "description": "The percentage representing the discount applied, in per cent mille. Defaults to 0. \n\nFor example 1000 is 1%.",
                                    "type": "integer",
                                    "default": 0,
                                    "maximum": 100000
                                  }
                                }
                              }
                            }
                          }
                        },
                        "metadata": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema"
                        },
                        "method_metadata": {
                          "description": "Valid JSON key-value object specified by the platform to store additional information on the payment method. Keys are queryable in list endpoints. Do not use the metadata field to store sensitive or confidential data.\n\nMetadata must be less than 8 KB in size.\n",
                          "type": "object",
                          "example": {
                            "key1": "value1",
                            "key2": {
                              "inner_key1": "inner_value1"
                            }
                          },
                          "minLength": 0
                        },
                        "processing_mode": {
                          "description": "Determines how to process the payin when [creating the payin](ref:create_payin) via the Payment Component or the API.\n\nOptions:\n  * `AUTHORIZE` - Only authorize the payin, separating the authorization and capture of funds. Authorize will place a hold on the funds and the payin must be [captured](ref:capture_payin) in a separate request.\n  * `AUTHORIZE_AND_CAPTURE` - Authorize and capture the payin in a single request (default).",
                          "type": "string",
                          "default": "AUTHORIZE_AND_CAPTURE",
                          "enum": [
                            "AUTHORIZE",
                            "AUTHORIZE_AND_CAPTURE"
                          ]
                        },
                        "threeds_mode": {
                          "description": "Determines how 3D Secure authentication should be run on this payment to verify that the customer initiating the payment is actually the cardholder.\n\n3D Secure is only available on credit card payments via the Rainforest payment component. This mode is ignored if the payment is made by ACH, or when charging a stored payment method.\n\nOptions:\n* `NONE` - 3D Secure will not be run (default).\n* `ATTEMPT`-  The payment component will attempt to run 3D Secure. If 3D Secure is not available or fails, the payment will process without 3D Secure verification.",
                          "type": "string",
                          "default": "NONE",
                          "enum": [
                            "NONE",
                            "ATTEMPT"
                          ]
                        },
                        "device_signature_mode": {
                          "description": "Determines if a signature should be collected when processing a payment on a device\n\nOptions:\n  * `NONE` - Signature will not be collected\n  * `ATTEMPT` - Only prompt for a signature on devices that support the signature capability",
                          "type": "string",
                          "default": "NONE",
                          "enum": [
                            "NONE",
                            "ATTEMPT"
                          ]
                        },
                        "device_allow_manual_entry": {
                          "description": "Boolean indicating if the cardholder can manually key in their card details when processing a payment on a device, instead of presenting the card.",
                          "type": "boolean",
                          "default": false
                        },
                        "device_tip_config": {
                          "nullable": true,
                          "type": "object",
                          "description": "Configures a preset tip prompt of percentages or amounts to request a tip when processing a payment on a device. When requesting a tip, the end user will also have the ability to input a custom tip amount on the device.\n\nExactly one of `tip_percentages` or `tip_amounts` must be set.\n\nNot supported for separate authorization and capture (`processing_mode` of `AUTHORIZE`). The payment must be authorized and captured in a single request in order to request a tip.\n\nUp to 4 presets may be configured, but some devices can only display up to 3 presets. Presets displayed will be in the order they are provided and any beyond the number supported on the device will not be displayed. For example, if tip_percentages is set to [20000, 18000, 15000, 10000] and the device only supports 3 presets, then the device will display 20%, 18%, and 15%.",
                          "properties": {
                            "tip_percentages": {
                              "description": "Preset tip percentages, in percent mille (1 PCM = 0.001%).\n\nFor example, [20000, 18000, 15000, 10000] will display 20%, 18%, 15%, and 10% on the device.",
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "maxItems": 4,
                              "example": [
                                20000,
                                18000,
                                15000
                              ]
                            },
                            "tip_amounts": {
                              "description": "Preset tip amounts, in minor units.\n\nFor example, [1000, 500, 200, 100] will display $10.00, $5.00, $2.00, $1.00 on the device.",
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "maxItems": 4,
                              "example": [
                                500,
                                300,
                                100
                              ]
                            }
                          }
                        },
                        "ach_balance_check_mode": {
                          "description": "ACH Balance Check is in beta: please contact your Customer Success contact for more information.\nDetermines if the balance of the account will be checked when processing a Validated ACH payin. If the balance does not cover the amount of the payin, the payin will fail with the refusal reason of insufficient funds.\n\nOptions:\n  * `NONE` - Account balance will not be checked\n  * `ATTEMPT` - Attempt to check the account balance is sufficient to process the payin",
                          "type": "string",
                          "default": "NONE",
                          "enum": [
                            "NONE",
                            "ATTEMPT"
                          ]
                        },
                        "payin": {
                          "description": "The minimal representation of the payin successfully processed with the payin config, if applicable.\n\nIf no payin has been successfully processed with the payin config, `payin` will be `null`.",
                          "nullable": true,
                          "readOnly": true,
                          "type": "object",
                          "properties": {
                            "payin_id": {
                              "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/responses/200/content/application~1json/schema/properties/data/properties/payin_id",
                              "readOnly": true
                            }
                          }
                        }
                      }
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Payin Configs"
        ]
      }
    },
    "/v1/payins": {
      "get": {
        "operationId": "list_payins",
        "summary": "List payins",
        "description": "Query a list of payins given optional search criteria.",
        "parameters": [
          {
            "in": "header",
            "name": "Rainforest-Api-Version",
            "schema": {
              "type": "string",
              "default": "2024-10-16",
              "enum": [
                "2024-10-16",
                "2023-12-01"
              ]
            }
          },
          {
            "$ref": "#/paths/~1v1~1device_registrations/post/responses/200/content/application~1json/schema/properties/data/properties/merchant_id",
            "in": "query"
          },
          {
            "in": "query",
            "name": "merchant_name",
            "description": "Optional merchant name by which to filter.",
            "schema": {
              "type": "string"
            },
            "examples": {
              "partial": {
                "value": "Merchant",
                "summary": "Match a partial merchant name value."
              },
              "full": {
                "value": "Merchant LLC",
                "summary": "Match a full merchant name value."
              }
            }
          },
          {
            "in": "query",
            "name": "method_type",
            "description": "Payment method type to filter by. Provide parameter multiple times to filter by multiple payment method types.",
            "schema": {
              "description": "The type of payment method.",
              "type": "string",
              "enum": [
                "CARD",
                "APPLE_PAY",
                "GOOGLE_PAY",
                "ACH",
                "PLAID_ACH"
              ]
            }
          },
          {
            "in": "query",
            "name": "billing_contact_name",
            "description": "Optional billing contact name by which to filter.",
            "schema": {
              "type": "string",
              "maxLength": 50,
              "minLength": 1
            },
            "examples": {
              "partial": {
                "value": "Doe",
                "summary": "Match a partial billing contact name value."
              },
              "full": {
                "value": "John Doe",
                "summary": "Match a full billing contact name value."
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One or more payin statuses to filter by. Provide parameter multiple times to filter by multiple payin status types.\n\n`AUTHORIZED` `CANCELED` `CREATED` `FAILED` `IN_REVIEW` `PRESENTING` `PROCESSING` `RETURNED` `SUCCEEDED`",
            "schema": {
              "type": "array",
              "items": {
                "description": "The status of the payin.",
                "type": "string",
                "enum": [
                  "AUTHORIZED",
                  "CANCELED",
                  "CREATED",
                  "FAILED",
                  "IN_REVIEW",
                  "PRESENTING",
                  "PROCESSING",
                  "RETURNED",
                  "SUCCEEDED"
                ],
                "example": "PROCESSING"
              }
            }
          },
          {
            "in": "query",
            "name": "source",
            "description": "One or more payin sources to filter by. Provide parameter multiple times to filter by multiple payin sources. ",
            "schema": {
              "type": "array",
              "items": {
                "description": "The source of the payin. Indicates the integration that created the payin.",
                "type": "string",
                "nullable": false,
                "enum": [
                  "API_DIRECT",
                  "API_STORED_PAYMENT_METHOD",
                  "COMPONENT",
                  "DEVICE",
                  "EXTERNAL",
                  "IVR",
                  "TAP_TO_PHONE"
                ]
              }
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "schema": {
              "type": "string"
            },
            "description": "Filter by metadata stored on the entity by passing a map of key-value pairs to filter on. The `key` should be valid JSONPath to a corresponding metadata key.\n\nFor example, an entity created with the following metadata\n```\n\"account\": {\n  \"id\": \"acct_123\"\n}\n```\ncould have the following metadata filter to find entities with the metadata account id: \n```\n?metadata[$.account.id]=acct_123\n```"
          },
          {
            "in": "query",
            "name": "created_at.start",
            "description": "Created on or after in UTC RFC 3339 format.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2022-01-01T12:00:00Z"
          },
          {
            "in": "query",
            "name": "created_at.end",
            "description": "Created on or before in UTC RFC 3339 format.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2022-01-01T12:00:00Z"
          },
          {
            "in": "query",
            "name": "expected_deposit_date.start",
            "description": "Expected to be deposited on or after in UTC RFC 3339 format.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2022-01-01"
          },
          {
            "in": "query",
            "name": "expected_deposit_date.end",
            "description": "Expected to be deposited on or before in UTC RFC 3339 format.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2022-01-01"
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Optional value by which to sort the result set. Default sort by is created_at.",
            "schema": {
              "type": "string",
              "enum": [
                "amount",
                "billing_contact_name",
                "created_at",
                "expected_deposit_date",
                "merchant_id",
                "method_type",
                "payin_id",
                "status"
              ]
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "description": "Order in which to return the sorted results; ascending or descending. Default sort order is descending.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "default": 1000,
              "maximum": 1000
            },
            "description": "The maximum number of results to return."
          },
          {
            "in": "query",
            "name": "start_key",
            "schema": {
              "type": "string"
            },
            "description": "A key used to indicate the starting point for the next page of results. This value should be set to the last_key returned by the previous paginated request."
          },
          {
            "in": "query",
            "deprecated": true,
            "name": "offset",
            "schema": {
              "type": "number",
              "default": 0,
              "minimum": 0
            },
            "description": "Offset has been deprecated. Utilize start_key and last_key for pagination.\n\nThe offset of the first result to return; zero-based."
          },
          {
            "in": "query",
            "name": "omit_total_results",
            "schema": {
              "type": "boolean"
            },
            "description": "The `total_results` field in the response will be set to -1. Allows for faster query results."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "Status of the request.\n\nIf the request status code is 2XX, then the `status` will be `SUCCESS`. If the request status code is 4XX or 5XX, then the `status` will be `ERROR`.",
                      "type": "string",
                      "enum": [
                        "SUCCESS",
                        "ERROR"
                      ],
                      "example": "SUCCESS"
                    },
                    "data": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "total_results": {
                              "type": "integer",
                              "description": "Total number of results available. This value will be -1 if the query parameter `omit_total_results` is set to true."
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "last_key": {
                              "name": "last_key",
                              "schema": {
                                "type": "string"
                              },
                              "description": "Last ID in this result set.\n\nThis value can be be used as `start_key` in subsequent paginated requests to retrieve additional results whose IDs are greater than the `last_key` value."
                            },
                            "results": {
                              "description": "List of payins.",
                              "type": "array",
                              "items": {
                                "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data"
                              }
                            }
                          }
                        }
                      ]
                    },
                    "errors": {
                      "description": "List of errors, if applicable.",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Details of the error.",
                        "properties": {
                          "field": {
                            "description": "The field in the request that had an error, if applicable.",
                            "type": "string"
                          },
                          "code": {
                            "description": "The code describing the error.",
                            "type": "string"
                          },
                          "message": {
                            "description": "The description of the error related to the field.",
                            "type": "string"
                          }
                        }
                      },
                      "example": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, check for validation errors.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Default response object.",
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "description": "Generic data object specified per resource, null if there are request errors.",
                      "type": "object",
                      "example": null,
                      "nullable": true,
                      "readOnly": true
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                },
                "example": {
                  "status": "ERROR",
                  "data": null,
                  "errors": [
                    {
                      "field": "string",
                      "code": "RequestBody",
                      "message": "Invalid request payload"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authorization missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1payins/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "status": "ERROR",
                  "data": null,
                  "errors": [
                    {
                      "field": "string",
                      "code": "AuthUnauthorized",
                      "message": "Unauthorized"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Authorization insufficient for requested action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1payins/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "status": "ERROR",
                  "data": null,
                  "errors": [
                    {
                      "field": "string",
                      "code": "AuthForbidden",
                      "message": "Forbidden"
                    }
                  ]
                }
              }
            }
          },
          "5XX": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1payins/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "status": "ERROR",
                  "data": null,
                  "errors": [
                    {
                      "field": "string",
                      "code": "string",
                      "message": "Internal Server Error"
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "Payins"
        ]
      },
      "post": {
        "operationId": "create_payin",
        "summary": "Create payin",
        "description": "Create and process a payin with sensitive PCI data using a payin configuration. The merchant status must be `ACTIVE` to create a payin.\n\nThis endpoint requires Rainforest approval. Platforms that meet all [requirements](doc:send-sensitive-data-via-api#requirements) and are approved by Rainforest can send the full card and bank account numbers to Rainforest via a server-to-serve direct API integration.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payin_config_id": {
                    "description": "The unique payin config identifier. A payin must be configured prior to this request. See \"Create a Payin Config\" if a payin configuration has not been created yet.\n\nPrefix is \"cfg\" in production and \"sbx_cfg\" in sandbox.",
                    "type": "string",
                    "example": "cfg_2A4d6U0tMyovzTbVT1ktmRzdRaD"
                  },
                  "method_type": {
                    "description": "The type of payment method.",
                    "type": "string",
                    "enum": [
                      "CARD",
                      "ACH"
                    ]
                  },
                  "card": {
                    "description": "Card payment method. Required for method_type CARD.",
                    "type": "object",
                    "properties": {
                      "card_number": {
                        "description": "The card number, formatted with no spaces (e.g 0000000000000000).",
                        "type": "string",
                        "example": "4111111111111111"
                      },
                      "exp_month": {
                        "description": "The card expiration month.",
                        "type": "integer",
                        "example": 12,
                        "maximum": 12,
                        "minimum": 1
                      },
                      "exp_year": {
                        "description": "The card expiration year, in 4-digits.",
                        "type": "integer",
                        "example": 2027,
                        "maximum": 2099,
                        "minimum": 2000
                      },
                      "cvc": {
                        "description": "The card CVC, temporarily available for 5 minutes for payment processing.",
                        "type": "integer",
                        "example": "123"
                      }
                    }
                  },
                  "ach": {
                    "description": "ACH payment method details. Required for method_type ACH.",
                    "type": "object",
                    "properties": {
                      "account_number": {
                        "description": "The bank account number.",
                        "type": "string",
                        "example": "12345678"
                      },
                      "routing_number": {
                        "description": "The 9-digit routing number.",
                        "type": "string",
                        "example": "091000019",
                        "maxLength": 9,
                        "minLength": 9
                      },
                      "account_type": {
                        "description": "The account type. Defaulted to CHECKING if omitted.",
                        "type": "string",
                        "example": "CHECKING",
                        "enum": [
                          "CHECKING",
                          "SAVINGS"
                        ]
                      },
                      "account_holder_type": {
                        "description": "The account holder type.",
                        "type": "string",
                        "example": "PERSONAL",
                        "enum": [
                          "PERSONAL",
                          "BUSINESS"
                        ]
                      }
                    }
                  },
                  "billing_contact": {
                    "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact",
                    "description": "Billing contact details. The following billing contact fields are **_required_** for payment processing depending on the payment method type:\n* Card: `postal_code`\n* ACH: `name`\n\nThe billing contact fields can also be passed in the payin config."
                  }
                },
                "required": [
                  "payin_config_id",
                  "method_type"
                ]
              },
              "examples": {
                "card": {
                  "value": {
                    "payin_config_id": "cfg_2A4d6U0tMyovzTbVT1ktmRzdRaD",
                    "method_type": "CARD",
                    "card": {
                      "card_number": "4111111111111111",
                      "exp_month": 12,
                      "exp_year": 2027,
                      "cvc": "123"
                    },
                    "billing_contact": {
                      "name": "Jane Smith",
                      "address_line_1": "3423 Piedmont Rd",
                      "address_line_2": "Suite 123",
                      "city": "Atlanta",
                      "state": "GA",
                      "postal_code": "30305",
                      "country": "US",
                      "email": "janesmith@example.com",
                      "phone": "4041234567"
                    }
                  }
                },
                "ach": {
                  "value": {
                    "payin_config_id": "cfg_2A4d6U0tMyovzTbVT1ktmRzdRaD",
                    "method_type": "ACH",
                    "ach": {
                      "account_number": "12345678",
                      "routing_number": "091000019",
                      "account_type": "CHECKING",
                      "account_holder_type": "PERSONAL"
                    },
                    "billing_contact": {
                      "name": "Jane Smith",
                      "address_line_1": "3423 Piedmont Rd",
                      "address_line_2": "Suite 123",
                      "city": "Atlanta",
                      "state": "GA",
                      "postal_code": "30305",
                      "country": "US",
                      "email": "janesmith@example.com",
                      "phone": "4041234567"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "description": "The payin details.",
                      "type": "object",
                      "properties": {
                        "payin_id": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/responses/200/content/application~1json/schema/properties/data/properties/payin_id"
                        },
                        "payin_config_id": {
                          "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/threeds_attempt/properties/payin_config_id",
                          "readOnly": true
                        },
                        "merchant_id": {
                          "$ref": "#/paths/~1v1~1device_registrations/post/requestBody/content/application~1json/schema/properties/merchant_id"
                        },
                        "payment_method_id": {
                          "description": "The unique payment method identifier. \n\nPrefix is \"mtd\" in production and \"sbx_mtd\" in sandbox.",
                          "type": "string",
                          "example": "mtd_2DrDRpyAdp5MPUJnrJmoZcMmtfF"
                        },
                        "payment_method_config_id": {
                          "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/payment_method_config_id",
                          "readOnly": true
                        },
                        "device_registration_id": {
                          "description": "The unique device registration identifier.\n\nPrefix is \"dvc\" in production and \"sbx_dvc\" in sandbox.",
                          "type": "string",
                          "example": "dvc_2DrDKk5NIMbpuNGqm109SkpGDHh"
                        },
                        "threeds_attempt_id": {
                          "nullable": true,
                          "description": "The unique threeds attempt identifier. \n\nPrefix is \"tds\" in production and \"sbx_tds\" in sandbox.",
                          "type": "string",
                          "example": "tds_2DrDFJPutxE5AIbJSopAnqniEbr"
                        },
                        "idempotency_key": {
                          "$ref": "#/paths/~1v1~1refunds~1{refund_id}~1void/post/requestBody/content/application~1json/schema/properties/idempotency_key"
                        },
                        "billing_type": {
                          "description": "The merchant billing type.",
                          "type": "string",
                          "enum": [
                            "NET",
                            "GROSS"
                          ]
                        },
                        "amount": {
                          "description": "The amount of the payin, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100
                        },
                        "currency_code": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                        },
                        "is_partially_authorized": {
                          "description": "Boolean indicating if payin was authorized for a partial amount.",
                          "type": "boolean"
                        },
                        "authorized_amount": {
                          "description": "The amount of the payin that was authorized, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100,
                          "readOnly": true
                        },
                        "captured_amount": {
                          "description": "The amount of the payin that was captured, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100,
                          "readOnly": true
                        },
                        "tip_amount": {
                          "description": "The amount of the payin that was collected as a tip from processing on a device, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 0,
                          "readOnly": true
                        },
                        "refundable_amount": {
                          "description": "The amount of the payin that can still be refunded, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100,
                          "readOnly": true
                        },
                        "non_refundable_reason_code": {
                          "description": "Why the payin is nonrefundable. Provided when refundable_amount is 0.",
                          "type": "string",
                          "nullable": true,
                          "readOnly": true,
                          "enum": [
                            "VOIDED",
                            "FAILED",
                            "FULLY_REFUNDED",
                            "HAS_CHARGEBACKS",
                            "HAS_ACH_RETURN",
                            "IN_ACH_RETURN_WINDOW",
                            "IN_SETTLEMENT_WINDOW"
                          ]
                        },
                        "status": {
                          "$ref": "#/paths/~1v1~1payins/get/parameters/5/schema/items"
                        },
                        "refusal_code": {
                          "description": "The code explaining the reason for the refusal if the payin or refund failed to process.\n\nThis value will be `null` if the payin or refund succeeded.",
                          "type": "string",
                          "enum": [
                            null,
                            "ACCOUNT_CLOSED",
                            "AUTHORIZATION_EXPIRED",
                            "DECLINED",
                            "DO_NOT_HONOR",
                            "EXPIRED_CARD",
                            "FRAUDULENT_CARD",
                            "INCORRECT_PAYMENT_INFORMATION",
                            "INSUFFICIENT_FUNDS",
                            "INVALID_CARD_SECURITY_CODE",
                            "INVALID_EXPIRATION_DATE",
                            "INVALID_PIN",
                            "LOST_CARD",
                            "NO_CARD_NUMBER_ON_FILE_WITH_ISSUER",
                            "NO_SUCH_CARD_ISSUER",
                            "OVER_LIMIT",
                            "PROCESSING_ERROR",
                            "RESTRICTED_CARD_TYPE",
                            "RETRY",
                            "RETRY_WITH_THREEDS",
                            "RISK_DECLINE",
                            "STOLEN_CARD",
                            "THREEDS_CHALLENGE_FAILED",
                            "UNEXPECTED_PAYIN_TOKEN",
                            "UNSUPPORTED_ACCOUNT_TYPE",
                            "UNSUPPORTED_BY_PROCESSOR",
                            "UNSUPPORTED_CARD_TYPE"
                          ],
                          "readOnly": true
                        },
                        "refusal_desc": {
                          "description": "The description explaining the reason for the refusal if the payin or refund failed to process. This will be a human-readable value that may be presented to the end user.\n\nThis value will be `null` if the payin or refund succeeded.",
                          "type": "string",
                          "enum": [
                            null,
                            "Account closed",
                            "Authorization expired",
                            "Declined",
                            "Do not honor",
                            "Expired card",
                            "Fraudulent card",
                            "Incorrect payment information",
                            "Insufficient funds",
                            "Invalid card security code",
                            "Invalid expiration date",
                            "Invalid PIN",
                            "Lost card",
                            "No card number on file with issuer",
                            "No such card issuer",
                            "Over limit",
                            "Processing error",
                            "Restricted card type",
                            "Retry",
                            "Retry with 3DS",
                            "Risk decline",
                            "Stolen card",
                            "3DS challenge failed",
                            "Unexpected payin token",
                            "Unsupported account type",
                            "Unsupported by processor",
                            "Unsupported card type"
                          ],
                          "readOnly": true
                        },
                        "detailed_refusal_code": {
                          "description": "The detailed refusal code that could be more descriptive than the refusal code. It may take up to 5 minutes for the detailed refusal code to populate after the payment fails.\n\nThis value will be `null` if the payment succeeded.",
                          "type": "string",
                          "enum": [
                            null,
                            "ACCOUNT_CLOSED",
                            "AUTHORIZATION_EXPIRED",
                            "DECLINED",
                            "DO_NOT_HONOR",
                            "EXPIRED_CARD",
                            "FRAUDULENT_CARD",
                            "INCORRECT_PAYMENT_INFORMATION",
                            "INSUFFICIENT_FUNDS",
                            "INVALID_CARD_SECURITY_CODE",
                            "INVALID_EXPIRATION_DATE",
                            "INVALID_PIN",
                            "LOST_CARD",
                            "NO_CARD_NUMBER_ON_FILE_WITH_ISSUER",
                            "NO_SUCH_CARD_ISSUER",
                            "OVER_LIMIT",
                            "PROCESSING_ERROR",
                            "RESTRICTED_CARD_TYPE",
                            "RETRY",
                            "RETRY_WITH_THREEDS",
                            "RISK_DECLINE",
                            "STOLEN_CARD",
                            "THREEDS_CHALLENGE_FAILED",
                            "UNEXPECTED_PAYIN_TOKEN",
                            "UNSUPPORTED_ACCOUNT_TYPE",
                            "UNSUPPORTED_BY_PROCESSOR",
                            "UNSUPPORTED_CARD_TYPE"
                          ],
                          "readOnly": true
                        },
                        "detailed_refusal_desc": {
                          "description": "The description explaining the detailed refusal reason if the payin or refund failed to process. This will be a human-readable value that may be presented to the end user.\n\nThis value will be `null` if the payment succeeded.",
                          "type": "string",
                          "enum": [
                            null,
                            "Account closed",
                            "Authorization expired",
                            "Declined",
                            "Do not honor",
                            "Expired card",
                            "Fraudulent card",
                            "Incorrect payment information",
                            "Insufficient funds",
                            "Invalid card security code",
                            "Invalid expiration date",
                            "Invalid PIN",
                            "Lost card",
                            "No card number on file with issuer",
                            "No such card issuer",
                            "Over limit",
                            "Processing error",
                            "Restricted card type",
                            "Retry",
                            "Retry with 3DS",
                            "Risk decline",
                            "Stolen card",
                            "3DS challenge failed",
                            "Unexpected payin token",
                            "Unsupported account type",
                            "Unsupported by processor",
                            "Unsupported card type"
                          ],
                          "readOnly": true
                        },
                        "auth_code": {
                          "description": "The authorization code if the payin was approved.",
                          "type": "string",
                          "example": "12345"
                        },
                        "avs_result_code": {
                          "description": "The address verification service result code.",
                          "type": "string",
                          "example": "Y"
                        },
                        "cvc_result_code": {
                          "description": "The card verification code result code.",
                          "type": "string",
                          "example": "M"
                        },
                        "amount_splits": {
                          "description": "Represents how the payin amount was allocated to the originating merchant, the platform and one or more other merchants.\n\nA `PLATFORM` split defines a platform fee on the payin.\n\nA `MERCHANT` split allocates a portion of the payin to the specified merchant.\n\nAny remaining amount not specified by the amount splits was allocated to the originating merchant associated with the payin.",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "description": "The amount allocated, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                                "type": "integer",
                                "example": 3
                              },
                              "currency_code": {
                                "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                              },
                              "type": {
                                "description": "The type of receiver for this split.\n\n`PLATFORM` allocates the split amount to the platform. `MERCHANT` allocates the split amount to the merchant specified by merchant_id.",
                                "type": "string",
                                "enum": [
                                  "PLATFORM",
                                  "MERCHANT"
                                ]
                              },
                              "merchant_id": {
                                "description": "Required when type is `MERCHANT`.\n\nThe unique identifier of the merchant receiving this split. The merchant must be fully onboarded and in an ACTIVE status.\n\nMust not match the merchant_id of the originating merchant on the payin. Must not be duplicated within the same amount_splits array. Not valid when object type is `PLATFORM`.\n\nPrefix: mid in production, sbx_mid in sandbox.",
                                "type": "string",
                                "example": "mid_abc123"
                              },
                              "platform": {
                                "description": "The minimal representation of the platform receiving this split. Present when type is `PLATFORM`.",
                                "$ref": "#/paths/~1v1~1payment_method_configs/post/responses/200/content/application~1json/schema/properties/data/properties/platform/allOf/0"
                              },
                              "merchant": {
                                "description": "The minimal representation of the merchant receiving this split. Present when type is `MERCHANT`.",
                                "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/merchant"
                              }
                            },
                            "required": [
                              "amount",
                              "currency_code",
                              "type"
                            ]
                          },
                          "example": [
                            {
                              "amount": 3,
                              "currency_code": "USD",
                              "type": "PLATFORM"
                            }
                          ]
                        },
                        "merchant_fees": {
                          "description": "The amount of the payin billed to the merchant.",
                          "type": "object",
                          "properties": {
                            "total_amount": {
                              "description": "The total amount of fees billed to the merchant.",
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "description": "The amount, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "currency_code": {
                                  "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                                }
                              }
                            }
                          },
                          "example": {
                            "total_amount": {
                              "amount": 2,
                              "currency_code": "USD"
                            }
                          }
                        },
                        "applied_billing": {
                          "description": "The rate, rate cap, and fee applied to calculate the billing fee, along with the source that determined the billing fee.",
                          "type": "object",
                          "properties": {
                            "rate": {
                              "description": "Rate, in percent mille (1 PCM = 0.001%).\n\nFor example, 3000 is 3%.",
                              "type": "integer",
                              "example": 3000
                            },
                            "rate_cap": {
                              "description": "Rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.",
                              "type": "integer",
                              "example": 1000
                            },
                            "fee": {
                              "description": "Fee, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                              "type": "integer",
                              "example": 100
                            },
                            "currency_code": {
                              "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                            },
                            "source": {
                              "description": "The source that determined the billing fee.\n\n`BILLING_PROFILE` - the merchant's billing profile\n`MERCHANT_BILLING` - the top-level rate, rate cap, and fee in the payin config's merchant billing object\n`MERCHANT_BILLING_METHOD` - the payment method object in the payin config's merchant billing object",
                              "type": "string",
                              "nullable": false,
                              "enum": [
                                "BILLING_PROFILE",
                                "MERCHANT_BILLING",
                                "MERCHANT_BILLING_METHOD"
                              ]
                            },
                            "merchant_billing_method_type": {
                              "description": "The payment method object in the payin config's merchant billing object utilized to calculate the billing fee. Applicable when the source is `MERCHANT_BILLING_METHOD`.",
                              "type": "string",
                              "enum": [
                                "card",
                                "ach",
                                "validated_ach",
                                "accelerated_ach",
                                "paypal_wallet",
                                "venmo",
                                "paypal_paylater"
                              ]
                            }
                          },
                          "example": {
                            "rate": 3000,
                            "fee": 100,
                            "currency_code": "USD",
                            "source": "BILLING_PROFILE"
                          }
                        },
                        "method_type": {
                          "description": "The type of payment method.",
                          "type": "string",
                          "enum": [
                            "CARD",
                            "APPLE_PAY",
                            "GOOGLE_PAY",
                            "ACH",
                            "PLAID_ACH",
                            "PAYPAL_WALLET",
                            "VENMO",
                            "PAYPAL_PAYLATER"
                          ]
                        },
                        "card": {
                          "description": "Card payment method details.",
                          "type": "object",
                          "properties": {
                            "type": {
                              "description": "Card type.",
                              "type": "string",
                              "enum": [
                                "CREDIT",
                                "DEBIT",
                                "PREPAID"
                              ]
                            },
                            "brand": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/brand"
                            },
                            "brand_desc": {
                              "description": "Card brand in a friendly language.",
                              "type": "string",
                              "example": "Mastercard",
                              "enum": [
                                "Visa",
                                "Mastercard",
                                "Discover",
                                "American Express",
                                "Other"
                              ]
                            },
                            "last_4": {
                              "description": "Last 4 digits of the card number.",
                              "type": "string",
                              "example": "4444"
                            },
                            "exp_month": {
                              "$ref": "#/paths/~1v1~1payins/post/requestBody/content/application~1json/schema/properties/card/properties/exp_month"
                            },
                            "exp_year": {
                              "$ref": "#/paths/~1v1~1payins/post/requestBody/content/application~1json/schema/properties/card/properties/exp_year"
                            },
                            "country": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/country"
                            },
                            "is_business": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/is_business"
                            },
                            "is_healthcare": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/is_healthcare"
                            }
                          }
                        },
                        "apple_pay": {
                          "description": "Apple Pay payment method details.",
                          "type": "object",
                          "properties": {
                            "type": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/card/properties/type"
                            },
                            "brand": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/brand"
                            },
                            "brand_desc": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/card/properties/brand_desc"
                            },
                            "description": {
                              "description": "A human-readable description of the payment method provided by Apple.",
                              "type": "string",
                              "example": "Visa 1234"
                            }
                          }
                        },
                        "google_pay": {
                          "description": "Google Pay payment method details.",
                          "type": "object",
                          "properties": {
                            "type": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/card/properties/type"
                            },
                            "brand": {
                              "$ref": "#/paths/~1v1~1bin_lookup/post/responses/200/content/application~1json/schema/properties/data/properties/brand"
                            },
                            "brand_desc": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/card/properties/brand_desc"
                            },
                            "description": {
                              "description": "A human-readable description of the payment method provided by Google.",
                              "type": "string",
                              "example": "Visa 1234"
                            }
                          }
                        },
                        "ach": {
                          "description": "ACH payment method details.",
                          "type": "object",
                          "properties": {
                            "account_number_last_4": {
                              "description": "The last 4 digits of the account number.",
                              "type": "string",
                              "example": "5678"
                            },
                            "routing_number": {
                              "$ref": "#/paths/~1v1~1payins/post/requestBody/content/application~1json/schema/properties/ach/properties/routing_number"
                            },
                            "bank_name": {
                              "description": "The bank name.",
                              "type": "string",
                              "example": "Wells Fargo Bank"
                            },
                            "account_type": {
                              "$ref": "#/paths/~1v1~1payins/post/requestBody/content/application~1json/schema/properties/ach/properties/account_type"
                            },
                            "account_holder_type": {
                              "$ref": "#/paths/~1v1~1payins/post/requestBody/content/application~1json/schema/properties/ach/properties/account_holder_type"
                            }
                          }
                        },
                        "plaid_ach": {
                          "$ref": "#/paths/~1v1~1payments/get/responses/200/content/application~1json/schema/properties/data/allOf/1/properties/results/items/properties/plaid_ach",
                          "description": "ACH payment method details from Plaid."
                        },
                        "paypal_wallet": {
                          "description": "PayPal Wallet payment method. Required for method_type PAYPAL_WALLET.",
                          "type": "object",
                          "properties": {
                            "email": {
                              "description": "The email address of the PayPal user",
                              "type": "string",
                              "example": "janesmith@example.com"
                            }
                          }
                        },
                        "venmo": {
                          "description": "Venmo payment method. Required for method_type VENMO.",
                          "type": "object",
                          "properties": {
                            "email": {
                              "description": "The email address of the Venmo user",
                              "type": "string",
                              "example": "janesmith@example.com"
                            }
                          }
                        },
                        "paypal_paylater": {
                          "description": "PayPal PayLater payment method. Required for method_type PAYPAL_PAYLATER.",
                          "type": "object",
                          "properties": {
                            "email": {
                              "description": "The email address of the PayPal user",
                              "type": "string",
                              "example": "janesmith@example.com"
                            }
                          }
                        },
                        "billing_contact": {
                          "description": "Billing contact details.",
                          "type": "object",
                          "properties": {
                            "name": {
                              "description": "First and last name.",
                              "type": "string",
                              "example": "Jane Smith",
                              "maxLength": 100
                            },
                            "address_line_1": {
                              "description": "First line of street address.",
                              "type": "string",
                              "example": "123 Example Street",
                              "maxLength": 100
                            },
                            "address_line_2": {
                              "description": "Second line of street address, if required.",
                              "type": "string",
                              "example": "Suite 123",
                              "maxLength": 100
                            },
                            "city": {
                              "description": "City for address.",
                              "type": "string",
                              "example": "Atlanta",
                              "maxLength": 100
                            },
                            "state": {
                              "description": "State, province, or region for address.",
                              "type": "string",
                              "example": "GA",
                              "maxLength": 100
                            },
                            "postal_code": {
                              "description": "Postal code or ZIP code for address.",
                              "type": "string",
                              "example": "30305",
                              "maxLength": 15
                            },
                            "country": {
                              "description": "2-digit country code. \nFind country codes here: https://www.iso.org/obp",
                              "type": "string",
                              "example": "US",
                              "maxLength": 2,
                              "minLength": 2
                            },
                            "email": {
                              "description": "Email address.",
                              "type": "string",
                              "example": "janesmith@example.com",
                              "maxLength": 100
                            },
                            "phone": {
                              "description": "Phone number, including extension.",
                              "type": "string",
                              "example": "+14041234567",
                              "maxLength": 100
                            }
                          }
                        },
                        "shipping_address": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "description": "Recipient's first and last name.",
                              "type": "string",
                              "example": "Jane Smith",
                              "maxLength": 100
                            },
                            "address_line_1": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/address_line_1"
                            },
                            "address_line_2": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/address_line_2"
                            },
                            "city": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/city"
                            },
                            "state": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/state"
                            },
                            "postal_code": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/postal_code"
                            },
                            "country": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/billing_contact/properties/country"
                            }
                          }
                        },
                        "device_data": {
                          "description": "Device data",
                          "type": "object",
                          "properties": {
                            "application_identifier": {
                              "description": "Identifies the application that the device used on the payin or payment method as described in ISO/IEC 7816-5.",
                              "type": "string",
                              "example": "A0000000031010"
                            },
                            "application_label": {
                              "description": "The human-readable name associated with the application identifier according to ISO/IEC 7816-5.",
                              "type": "string",
                              "example": "VISA CREDIT"
                            },
                            "application_preferred_name": {
                              "description": "The human-readable name associated with the application identifier in the cardholder’s local language.",
                              "type": "string",
                              "example": "VISA CREDIT"
                            },
                            "transaction_status_information": {
                              "description": "A collection of indicators that the device will set to show what processing steps have been performed on the current transaction (e.g. Cardholder Verification, Data Authentication).",
                              "type": "string",
                              "example": "E800"
                            },
                            "application_pan_sequence_number": {
                              "description": "Identifies and differentiates cards with the same PAN.",
                              "type": "string",
                              "example": 1
                            },
                            "entry_type": {
                              "description": "The entry type used on the device.",
                              "type": "string",
                              "example": "TAPPED",
                              "enum": [
                                "TAPPED",
                                "SWIPED",
                                "DIPPED",
                                "KEYED",
                                "INVALID",
                                "UNKNOWN"
                              ]
                            },
                            "verification_type": {
                              "description": "The verification type for verifying the user processing the payment is the cardholder.\n\nTypes:\n* `SIGNATURE` - The user provided a signature on the device.\n* `OFFLINE_PIN` - The user entered their pin on the device and it was verified by the EMV chip card.\n* `ONLINE_PIN` - The user entered their pin on the device and it was verified by the card issuer.\n* `OFFLINE_PIN_SIGNATURE` - The user entered their PIN and provided a signature on the device.\n* `NONE` - The user could not be verified.",
                              "type": "string",
                              "enum": [
                                "SIGNATURE",
                                "OFFLINE_PIN",
                                "ONLINE_PIN",
                                "OFFLINE_PIN_SIGNATURE",
                                "NONE"
                              ]
                            },
                            "signature": {
                              "description": "A signature image, formatted as a base64 encoded data URI",
                              "type": "string"
                            }
                          },
                          "readOnly": true
                        },
                        "method_metadata": {
                          "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/method_metadata"
                        },
                        "metadata": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema"
                        },
                        "refunds": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1v1~1refunds~1{refund_id}/get/responses/200/content/application~1json/schema/properties/data"
                          }
                        },
                        "has_refunds": {
                          "description": "Boolean indicating that the payin has one or more refunds created.",
                          "type": "boolean"
                        },
                        "chargebacks": {
                          "type": "array",
                          "items": {
                            "$ref": "#/paths/~1v1~1chargebacks~1{chargeback_id}/get/responses/200/content/application~1json/schema/properties/data"
                          }
                        },
                        "has_chargebacks": {
                          "description": "Boolean indicating that the payin has one or more chargebacks created.",
                          "type": "boolean"
                        },
                        "ach_return": {
                          "$ref": "#/paths/~1v1~1ach_returns~1{ach_return_id}/get/responses/200/content/application~1json/schema/properties/data"
                        },
                        "has_ach_return": {
                          "description": "Boolean indicating that the payin has an ACH return.",
                          "type": "boolean"
                        },
                        "payin_config": {
                          "description": "Payin config details.",
                          "type": "object",
                          "properties": {
                            "payin_config_id": {
                              "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/threeds_attempt/properties/payin_config_id",
                              "readOnly": true
                            },
                            "processing_mode": {
                              "$ref": "#/paths/~1v1~1payin_configs/post/responses/200/content/application~1json/schema/properties/data/properties/processing_mode",
                              "readOnly": true
                            },
                            "amount": {
                              "description": "The total amount requested for processing, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                              "type": "integer",
                              "example": 100,
                              "minimum": 1,
                              "readOnly": true
                            },
                            "currency_code": {
                              "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code",
                              "readOnly": true
                            },
                            "amount_splits": {
                              "$ref": "#/paths/~1v1~1payins~1{payin_id}~1capture/post/requestBody/content/application~1json/schema/properties/amount_splits",
                              "readOnly": true
                            }
                          }
                        },
                        "threeds_attempt": {
                          "nullable": true,
                          "description": "3DS attempt details.",
                          "type": "object",
                          "properties": {
                            "threeds_attempt_id": {
                              "description": "The unique threeds attempt identifier. \n\nPrefix is \"tds\" in production and \"sbx_tds\" in sandbox.",
                              "type": "string",
                              "example": "tds_2DrDFJPutxE5AIbJSopAnqniEbr"
                            },
                            "merchant_id": {
                              "$ref": "#/paths/~1v1~1device_registrations/post/requestBody/content/application~1json/schema/properties/merchant_id"
                            },
                            "payin_config_id": {
                              "description": "The unique payin config identifier. \n\nPrefix is \"cfg\" in production and \"sbx_cfg\" in sandbox.",
                              "type": "string",
                              "example": "cfg_2DrDPKzdQypRudLd8DhQKZX27dA"
                            },
                            "status": {
                              "description": "The status of the threeds attempt.",
                              "type": "string",
                              "enum": [
                                "CREATED",
                                "FINGERPRINTED",
                                "SUCCEEDED",
                                "CHALLENGED",
                                "FAILED"
                              ],
                              "example": "CREATED"
                            },
                            "failed_reason_code": {
                              "description": "The code explaining the reason for the 3DS request failure.\n\nThis value will be set if the 3DS attempt status is `FAILED`.",
                              "type": "string",
                              "nullable": true,
                              "readOnly": true,
                              "enum": [
                                "3DS_ATTEMPT_TIMED_OUT",
                                "CARD_NOT_ENROLLED",
                                "CHALLENGE_FAILED",
                                "MERCHANT_NOT_BOARDED",
                                "UNEXPECTED_ERROR",
                                "UNSUPPORTED_PAYMENT_DATA"
                              ]
                            },
                            "failed_reason_desc": {
                              "description": "The description explaining the reason for the payin's 3DS request failure. This will be a human-readable value that may be presented to the end user.\n\nThis value will be `null` if the 3DS request succeeded or if not applicable.",
                              "type": "string",
                              "nullable": true,
                              "examples": [
                                "3DS attempt timed out",
                                "Card not enrolled to 3DS",
                                "Failed 3DS challenge",
                                "Merchant not boarded to 3DS",
                                "Unexpected error",
                                "Unsupported payment data"
                              ],
                              "readOnly": true
                            },
                            "created_at": {
                              "description": "The datetime at which the attempt was initiated, in RFC3339 format",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            },
                            "updated_at": {
                              "description": "The datetime at which the attempt was last updated, in RFC3339 format",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            },
                            "fingerprinted_at": {
                              "description": "The datetime at which the attempt was fingerprinted, in RFC3339 format\n\nThe 3DS fingerprint step may open a hidden IFRAME to the issuing bank, allowing the bank to run proprietary fingerprinting identification.",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            },
                            "challenged_at": {
                              "description": "The datetime at which the attempt was challenged, in RFC3339 format\n\nThe 3DS challenge step will display a modal dialog, provided by the issuing bank, for the customer to authenticate to their bank.",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            },
                            "succeeded_at": {
                              "description": "The datetime at which the attempt succeeded, in RFC3339 format\n\nThe 3DS attempt succeeded if the customer authenticates to their bank, frictionlessly or through the challenge step.",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            },
                            "failed_at": {
                              "description": "The datetime at which the attempt failed, in RFC3339 format\n\nThe 3DS attempt failed for a variety of reasons, such as issuer does not support 3DS or the customer fails to complete the challenge step.",
                              "$ref": "#/paths/~1v1~1payment_method_domains/post/responses/200/content/application~1json/schema/properties/data/properties/created_at"
                            }
                          }
                        },
                        "expected_deposit_date": {
                          "description": "Date the funds are expected to be available in a deposit.",
                          "type": "string",
                          "format": "date",
                          "example": "2022-01-01"
                        },
                        "source": {
                          "$ref": "#/paths/~1v1~1payins/get/parameters/6/schema/items"
                        },
                        "source_desc": {
                          "description": "The description of the source of the payin. This will be a human-readable value that may be presented to the end user.",
                          "type": "string",
                          "nullable": false
                        },
                        "created_at": {
                          "description": "Date and time payin was created at in UTC RFC 3339 format.",
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:00:00Z"
                        },
                        "updated_at": {
                          "description": "Date and time payin was last updated at in UTC RFC 3339 format.",
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:00:00Z"
                        }
                      }
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Payins"
        ]
      }
    },
    "/v1/payins/{payin_id}/metadata": {
      "patch": {
        "operationId": "update_payin_metadata",
        "summary": "Update payin metadata",
        "description": "The body of the request is the JSON key-value metadata to patch to the payin. Do not use the metadata field to store sensitive or confidential data. \n\nUpdating metadata will merge with the existing metadata stored on the chargeback by the top-level key. If the same top-level key is passed in this request, it will overwrite the value stored on the chargeback. Only keys included in the payload will be updated. To remove a key, set the key's value to null. To remove all metadata pass null for the metadata value.\n\nPayin metadata must be less than 8 KB in size.\n\nPayin metadata can only be updated using an API key. This request should not be made by your frontend and should only be done by backend logic that only the platform can complete.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/parameters/1",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Valid JSON key-value object specified by the platform to store additional information. Keys are queryable in list endpoints. Do not use the metadata field to store sensitive or confidential data.\n\nMetadata must be less than 8 KB in size.\n",
                "type": "object",
                "example": {
                  "key1": "value1",
                  "key2": {
                    "inner_key1": "inner_value1"
                  }
                },
                "minLength": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data"
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "404": {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/responses/404"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Payins"
        ]
      }
    },
    "/v1/payins/{payin_id}/capture": {
      "post": {
        "operationId": "capture_payin",
        "summary": "Capture payin",
        "description": "Capture an authorized payin. The payin status must be Authorized to capture.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/parameters/1",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "description": "The amount to capture, in minor units. Must be less than or equal to the amount authorized. If omitted or set to 0, the full authorized amount will be captured.",
                    "type": "integer",
                    "example": 100,
                    "minimum": 1
                  },
                  "amount_splits": {
                    "description": "Update the amount split, which represents how the payin should be split between the originating merchant, the platform, and one or more other merchants. If omitted, the amount split defined on the payin config will be used.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "rate": {
                          "description": "The amount split defined as a rate, in percent mille (1 PCM = 0.001%). The amount split will be calculated on the authorized amount of the payin.\n\nFor example, 3000 is 3%.",
                          "type": "integer",
                          "example": 3000,
                          "minimum": 0
                        },
                        "rate_cap": {
                          "description": "The amount split rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.\n\nThe following validation must be met:\n  If the rate is greater than 0%, then the rate_cap must be greater than $0. For example, to bill a rate of 1% up to $100 set the value to 10000.\n  If the rate is 0%, then the rate_cap must be $0.",
                          "type": "integer",
                          "example": 1000,
                          "minimum": 0
                        },
                        "amount": {
                          "description": "The amount split, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 3,
                          "minimum": 0
                        },
                        "currency_code": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                        },
                        "type": {
                          "description": "The type of receiver for this split.\n\n`PLATFORM` allocates the split amount to the platform. `MERCHANT` allocates the split amount to the merchant specified by merchant_id.",
                          "type": "string",
                          "enum": [
                            "PLATFORM",
                            "MERCHANT"
                          ]
                        },
                        "merchant_id": {
                          "description": "Required when type is `MERCHANT`.\n\nThe unique identifier of the merchant receiving this split. The merchant status must be ACTIVE.\n\nThe following constraints must be met:\n\n- Cannot match the merchant_id of the originating merchant on the payin.\n- Cannot be duplicated within the same amount_splits array.\n- Not valid when type is `PLATFORM`.\n\nPrefix is mid in production and sbx_mid in sandbox.",
                          "type": "string",
                          "example": "mid_abc123"
                        },
                        "amount_split_reversal_config": {
                          "description": "Controls whether this amount split is reversed on a refund for the full amount or an ACH return. When not provided, both attributes default to false.",
                          "type": "object",
                          "properties": {
                            "on_full_refund": {
                              "description": "Determines whether this amount split is reversed when a refund for the full amount is processed on this payin.\n\nWhen `true`, the receiver's allocation is pulled back on the refund. When `false`, the receiver retains their allocation and the originating merchant absorbs this amount of the refund.\n\nThis configuration only applies to full refunds. For partial refunds, amount_splits on the refund request can be provided to specify the reversal amounts.",
                              "type": "boolean",
                              "default": false
                            },
                            "on_ach_return": {
                              "description": "Determines whether this amount split is reversed when an ACH return is processed on this payin.\n\nWhen `true`, the receiver's allocation is pulled back on the ACH return. When `false`, the receiver retains their allocation and the originating merchant absorbs this amount of the ACH return.",
                              "type": "boolean",
                              "default": false
                            }
                          }
                        }
                      },
                      "required": [
                        "amount",
                        "currency_code",
                        "type"
                      ]
                    },
                    "example": [
                      {
                        "amount": 3,
                        "currency_code": "USD",
                        "type": "PLATFORM"
                      }
                    ],
                    "maxItems": 26,
                    "minItems": 0
                  },
                  "metadata": {
                    "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema",
                    "description": "Update the metadata. If metadata is already set on the payin_config, both metadata objects will be merged together. If omitted, the metadata defined on the payin_config will be used."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data"
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "404": {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/responses/404"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Payins"
        ]
      }
    },
    "/v1/payins/{payin_id}/void_or_refund": {
      "post": {
        "operationId": "void_or_refund_payin",
        "summary": "Void or refund payin",
        "description": "Void or refund a payin by the payin ID.\n\nIf the payin status is `Processing`, then the full payin amount can be voided. A payin cannot be partially voided. If the payin status is `Succeeded`, then the payin can be fully or partially refunded. See the payin `refundable_amount` and `non_refundable_reason_code` for details on if the payin is eligible for a void or refund.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/parameters/1",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotency_key": {
                    "$ref": "#/paths/~1v1~1refunds~1{refund_id}~1void/post/requestBody/content/application~1json/schema/properties/idempotency_key"
                  },
                  "amount": {
                    "description": "The amount to void or refund, in minor units. Must be equal or less than the amount originally processed. If omitted or set to 0, the full amount of the payin will be voided or refunded.\n\nFor example, 1000 is 10.00 USD.",
                    "type": "integer",
                    "example": 100
                  },
                  "merchant_billing": {
                    "description": "The billing rate and fee to calculate the merchant's billing fee for the amount of the refund. If set, then this rate and fee will be used to determine the billing fee for the refund and will override the merchant's billing profile.\n\nThis is only applicable if the payin results in a refund instead of a void.\n\nNegative values for the rate and fee can be utilized to return billing fees to the merchant (e.g. to give the fees from the payin back to the merchant upon refund).",
                    "type": "object",
                    "properties": {
                      "rate": {
                        "description": "Rate, in percent mille (1 PCM = 0.001%).\n\nFor example, 3000 is 3%.",
                        "type": "integer",
                        "minimum": -25000,
                        "maximum": 25000,
                        "required": true
                      },
                      "rate_cap": {
                        "description": "Rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.\n\nThe following validation must be met:\n- If the `rate` is greater than 0%, then the `rate_cap` must be greater than $0. For example, to bill a rate of 1% up to $100 set the value to `10000`.\n- If the `rate` is less than 0%, then the `rate_cap` must be less than $0. For example, to bill a rate of -1% up to -$100 set the value to `-10000`.\n- If the `rate` is 0%, then the `rate_cap` must be $0.",
                        "type": "integer",
                        "minimum": -10000000,
                        "maximum": 10000000,
                        "required": true
                      },
                      "fee": {
                        "description": "Fee, in minor units. \n\nFor example, 1000 is 10.00 USD.\n\nThe absolute value of the fee can be up to $10, regardless of the amount of the refund. However, if the absolute value of the fee is greater than $10, then the absolute value of the fee cannot be greater than the `amount` field.\n\nValid requests: \n- Fee of $10 on a $5 refund.\n- Fee of -$10 on a $5 refund.\n- Fee of $11 on a $20 refund.\n- Fee of -$11 on a $20 refund.\n\nInvalid requests: \n- Fee of $11 on a $5 refund.\n- Fee of -$11 on a $5 refund.",
                        "type": "integer",
                        "required": true
                      },
                      "currency_code": {
                        "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code",
                        "required": true
                      }
                    }
                  },
                  "reason": {
                    "description": "The reason to void or refund this payin.",
                    "type": "string",
                    "enum": [
                      "REQUESTED_BY_CUSTOMER",
                      "DUPLICATE",
                      "FRAUDULENT"
                    ]
                  },
                  "metadata": {
                    "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema",
                    "description": "Valid JSON key-value object specified by the platform to store additional information. Keys are queryable in list endpoints. Do not use the metadata field to store sensitive or confidential data.\n\nThis metadata will be merged with the metadata stored on the payin by the top-level key. If the same top-level key is passed in this request, it will overwrite the value stored on the payin. The merged metadata will be saved on the payin metadata field for a VOID and on the refund metadata field for a REFUND.\n\nMetadata must be less than 8 KB in size."
                  },
                  "amount_splits": {
                    "description": "Represents how the refund amount should be allocated between the originating merchant, the platform, and one or more other merchants. This configuration overrides the amount_split_reversal_config defined on the payin config.\n\nThe sum of all amount splits must be less than or equal to the amount on the refund request.\n\nA `PLATFORM` split defines the amount to debit from the platform. A maximum of one `PLATFORM` split is permitted per refund.\n\nA `MERCHANT` split defines the amount to debit from the specified merchant. Multiple `MERCHANT` splits are permitted. Each `MERCHANT` split must specify a unique merchant_id.\n\nAny remaining amount not specified by the amount splits will be debited from the originating merchant.\n\nIf no amount splits are provided, then the configuration provided on the payin config amount_split_reversal_config will be respected for full refunds. For partial refunds without amount_splits, the originating merchant will be debited the full partial refund amount and all split receivers retain their allocations.\n\nThe amount split is defined as a rate and amount.\n\nFor example, to assess a split of 1% + $5.00, specify 1000 in the rate and 500 in the amount.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "rate": {
                          "description": "The amount split defined as a rate, in percent mille (1 PCM = 0.001%).\n\nFor example, 3000 is 3%.",
                          "type": "integer",
                          "example": 3000,
                          "minimum": 0
                        },
                        "rate_cap": {
                          "description": "The amount split rate cap, in minor units. Used to cap the rate to a specified amount.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 1000,
                          "minimum": 0
                        },
                        "amount": {
                          "description": "The amount to debit from this split receiver, in minor units. For example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100,
                          "minimum": 0
                        },
                        "currency_code": {
                          "description": "Three-letter ISO currency code, in uppercase. Currently, only USD is supported.",
                          "type": "string",
                          "example": "USD",
                          "enum": [
                            "USD"
                          ],
                          "maxLength": 3,
                          "minLength": 3
                        },
                        "type": {
                          "description": "The type of receiver for this split.\n\n`PLATFORM` allocates the split amount to the platform. `MERCHANT` allocates the split amount to the merchant specified by merchant_id.",
                          "type": "string",
                          "enum": [
                            "PLATFORM",
                            "MERCHANT"
                          ]
                        },
                        "merchant_id": {
                          "description": "Required when type is `MERCHANT`.\n\nThe unique identifier of the merchant to debit from.\n\nNot valid when type is `PLATFORM`.",
                          "type": "string",
                          "example": "mid_abc123"
                        }
                      },
                      "required": [
                        "amount",
                        "currency_code",
                        "type"
                      ]
                    }
                  },
                  "payin_billing_fees_reversal_config": {
                    "description": "Controls whether the billing fees from the original payin are returned to the originating merchant. This configuration overrides the billing_fees_reversal_config defined on the payin config or the merchant's default configuration.",
                    "type": "object",
                    "properties": {
                      "on_full_refund": {
                        "description": "Determines whether the billing fees for the original payin are returned to the originating merchant when a refund for the full amount is processed.\n\nWhen `true`, the billing fee is credited back to the merchant and included in the refund's computed billing fee.",
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "reason",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "description": "Indicates if a void or a refund was attempted. Set to VOID if the payin processing was not completed and a void was attempted. Set to REFUND is the payin processing was completed and a refund was attempted.",
                          "type": "string",
                          "enum": [
                            "VOID",
                            "REFUND"
                          ]
                        },
                        "merchant_id": {
                          "$ref": "#/paths/~1v1~1device_registrations/post/requestBody/content/application~1json/schema/properties/merchant_id"
                        },
                        "refund_id": {
                          "description": "The unique refund identifier. This field will only be set if the `type` is `REFUND`.\n\nPrefix is \"rfd_\" in production and \"sbx_rfd_\" in sandbox.",
                          "type": "string",
                          "example": "rfd_2DrDU206kzAhclm1WrZbuwDERRk"
                        },
                        "refund_status": {
                          "description": "The status of the refund. This field will only be set if the `type` is `REFUND`.",
                          "type": "string",
                          "enum": [
                            "PROCESSING",
                            "FAILED",
                            "IN_REVIEW"
                          ]
                        },
                        "payin_id": {
                          "description": "The unique payin identifier. \n\nPrefix is \"pyi\" in production and \"sbx_pyi\" in sandbox.",
                          "type": "string",
                          "example": "pyi_2DrDKk5NIMbpuNGqm109SkpGDHh"
                        },
                        "payin_status": {
                          "description": "The status of the payin.",
                          "type": "string",
                          "enum": [
                            "CANCELED",
                            "SUCCEEDED"
                          ]
                        },
                        "amount": {
                          "description": "The amount voided or refunded, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                          "type": "integer",
                          "example": 100
                        },
                        "currency_code": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                        },
                        "merchant_billing": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/merchant_billing",
                          "description": "The billing rate and fee used to calculate the merchant's billing fee for the amount of the refund if set in the refund request. This field is null if the merchant's billing profile was used to calculate the billing fee.\n\nThis is only applicable if the `type` is `REFUND`."
                        },
                        "amount_splits": {
                          "description": "Represents how the refund amount was allocated between the originating merchant, the platform, and one or more other merchants.\n\nA `PLATFORM` split defines the amount debited from the platform.\n\nA `MERCHANT` split defines the amount debited from the specified merchant.\n\nAny remaining amount not specified by the amount splits was debited from the originating merchant.\n\nThis is only applicable if the `type` is `REFUND`.",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "description": "The amount allocated, in minor units.\n\nFor example, 1000 is 10.00 USD.",
                                "type": "integer",
                                "example": 3
                              },
                              "currency_code": {
                                "$ref": "#/paths/~1v1~1payins~1{payin_id}~1void_or_refund/post/requestBody/content/application~1json/schema/properties/amount_splits/items/properties/currency_code"
                              },
                              "type": {
                                "description": "The type of receiver for this split.\n\n`PLATFORM` allocates the split amount to the platform. `MERCHANT` allocates the split amount to the merchant specified by merchant_id.",
                                "type": "string",
                                "enum": [
                                  "PLATFORM",
                                  "MERCHANT"
                                ]
                              },
                              "merchant_id": {
                                "description": "Required when type is `MERCHANT`.\n\nThe unique identifier of the merchant debited from.\n\nNot valid when type is `PLATFORM`.",
                                "type": "string",
                                "example": "mid_abc123"
                              }
                            },
                            "required": [
                              "amount",
                              "currency_code",
                              "type"
                            ]
                          },
                          "example": [
                            {
                              "amount": 3,
                              "currency_code": "USD",
                              "type": "PLATFORM"
                            }
                          ]
                        },
                        "reason": {
                          "description": "The reason to void or refund this payin.",
                          "type": "string",
                          "enum": [
                            "REQUESTED_BY_CUSTOMER",
                            "DUPLICATE",
                            "FRAUDULENT"
                          ]
                        },
                        "refusal_code": {
                          "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/refusal_code",
                          "description": "The code explaining the reason for the refusal if the refund failed to process. This field will only be set if the `type` is `REFUND`.\n\nThis value will be `null` if the payin was canceled or the refund succeeded."
                        },
                        "refusal_desc": {
                          "$ref": "#/paths/~1v1~1payins/post/responses/200/content/application~1json/schema/properties/data/properties/refusal_desc",
                          "description": "The description explaining the reason for the refusal if the refund failed to process. This will be a human-readable value that may be presented to the end user. This field will only be set if the `type` is `REFUND`.\n\nThis value will be `null` if the payin was canceled or the refund succeeded."
                        },
                        "auth_code": {
                          "description": "The authorization code if the refund was approved. This field will only be set if the `type` is `REFUND`.",
                          "type": "string",
                          "example": "12345"
                        },
                        "metadata": {
                          "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema"
                        },
                        "source": {
                          "nullable": true,
                          "description": "The source of the refund.",
                          "type": "string",
                          "enum": [
                            "API_DIRECT",
                            "COMPONENT",
                            "EXTERNAL"
                          ]
                        },
                        "created_at": {
                          "description": "Date and time void or refund was created at in UTC RFC 3339 format.",
                          "type": "string",
                          "format": "date-time",
                          "example": "2022-01-01T12:00:00Z"
                        }
                      }
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "404": {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/responses/404"
          },
          "409": {
            "$ref": "#/paths/~1v1~1refunds~1{refund_id}~1void/post/responses/409"
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Payins"
        ]
      }
    },
    "/v1/refunds/{refund_id}/void": {
      "post": {
        "operationId": "void_refund",
        "summary": "Void refund",
        "description": "Void a refund by the refund ID.\n\nSee the refund `non_voidable_reason_code` for details on if the refund is eligible for a void.",
        "parameters": [
          {
            "$ref": "#/paths/~1v1~1payins/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1v1~1refunds~1{refund_id}/get/parameters/1",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotency_key": {
                    "description": "A unique identifier provided by the platform. This key will be used to detect subsequent retries of the same request. Subsequent requests with the same key will return the result of the first request, regardless if the first request succeeded or failed. This identifier should be generated by the platform and can be max 255 characters.",
                    "type": "string",
                    "example": "e7d57c41-7626-4644-b777-9451ab3ddea9",
                    "maxLength": 255,
                    "minLength": 1
                  },
                  "reason": {
                    "description": "The reason to void this refund.",
                    "type": "string",
                    "enum": [
                      "CORRECTION",
                      "DUPLICATE",
                      "REQUESTED_BY_CUSTOMER"
                    ]
                  },
                  "metadata": {
                    "$ref": "#/paths/~1v1~1payins~1{payin_id}~1metadata/patch/requestBody/content/application~1json/schema",
                    "description": "Valid JSON key-value object specified by the platform to store additional information. Keys are queryable in list endpoints. Do not use the metadata field to store sensitive or confidential data.\n\nThis metadata will be merged with the metadata stored on the refund by the top-level key. If the same top-level key is passed in this request, it will overwrite the value stored on the refund.\n\nMetadata must be less than 8 KB in size."
                  }
                },
                "required": [
                  "reason",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/status"
                    },
                    "data": {
                      "$ref": "#/paths/~1v1~1refunds~1{refund_id}/get/responses/200/content/application~1json/schema/properties/data"
                    },
                    "errors": {
                      "$ref": "#/paths/~1v1~1payins/get/responses/200/content/application~1json/schema/properties/errors"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1v1~1payins/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1v1~1payins/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1v1~1payins/get/responses/403"
          },
          "404": {
            "$ref": "#/paths/~1v1~1payins~1{payin_id}/get/responses/404"
          },
          "409": {
            "description": "Conflict on the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1v1~1payins/get/responses/400/content/application~1json/schema"
                },
                "example": {
                  "status": "ERROR",
                  "data": null,
                  "errors": [
                    {
                      "field": "string",
                      "code": "string",
                      "message": "Conflict"
                    }
                  ]
                }
              }
            }
          },
          "5XX": {
            "$ref": "#/paths/~1v1~1payins/get/responses/5XX"
          }
        },
        "tags": [
          "Refunds"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Devices",
      "description": "Resources for device functions."
    },
    {
      "name": "Payin Configs",
      "description": "Resources for payin configs functions."
    },
    {
      "name": "Payins",
      "description": "Resources for payin functions."
    },
    {
      "name": "Refunds",
      "description": "Resources for refund functions."
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "APIKey"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
````