# Create a deposit request Creates a deposit request. To complete the deposit, the customer is redirected to the deposit link. After the deposit, the customer is redirected to the . Corresponding transaction webhooks are sent to webhooks subscribers. Endpoint: POST /deposit-requests Version: latest Security: SecretApiKey, JWT ## Request fields (application/json): - `websiteId` (string, required) Website ID of the deposit. This value specifies the website with which the deposit is associated. Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG" - `customerId` (string, required) ID of the customer resource. Example: "cus_0YV7DDSDD1C8DA64KHH2W33CPF" - `strategyId` (string,null) ID of a deposit amount strategy to be applied for this request for and . If this field is not specified, a randomly selected deposit amount strategy with a matching value is applied for empty and . If there is no matching deposit amount strategy, the default strategy with the following parameters is applied for empty and : For more information, see [Create a deposit amount strategy](https://www.rebilly.com/catalog/all/deposits/postdepositstrategy). Example: "dep_str_0YVJ64MAHTDPA97H8S7R5MYR1M" - `currency` (string, required) Currency code in ISO 4217 format. Example: "USD" - `amounts` (array,null) List of available deposit amounts. If is not specified when a deposit request is created, amounts are determined from the chosen deposit amount strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `amountLimits` (object,null) Deposit amount limit information. Set optional minimum and maximum deposit amounts. Limits override and values. If this value is , deposit amount limits are not set. - `amountLimits.minimum` (number,null) Minimum deposit amount. - `amountLimits.maximum` (number,null) Maximum deposit amount. - `customAmount` (object,null) Custom amount restrictions. If this value is , custom amounts are prohibited. If is not specified when a deposit request is created, amount restrictions are determined from the chosen deposit amount strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `customAmount.minimum` (number, required) Minimum custom amount. - `customAmount.multipleOf` (number, required) Multiple by which the custom amount increases. For example, if is equal to 5.30, and is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the value is reached. A valid custom amount must be equal to + X * , where X is any non negative integer. - `customAmount.maximum` (number, required) Maximum custom amount. This value must be equal to + X * , where X is any positive integer. - `redirectUrl` (string,null) URL to redirect the customer to when a deposit is completed. The default value is the website URL. - `expirationTime` (string,null) Date and time at which the deposit request expires. The default expiration time is one hour after the time the request is created. - `customPropertySetId` (string,null) ID of a custom property set to apply to the request . Example: "4f6cf35x-2c4y-483z-a0a9-158621f77a21" - `notificationUrl` (string,null) URL where a server-to-server notification is sent. This notification is sent when the transaction result is finalized after a timeout or an offsite interaction. Do not interpret this notification as a confirmation, complete a request to confirm the result of the transaction. To ensure the request is not reattempted, when the result is confirmed, respond with a HTTP status code. The following placeholders are available to use in this URI: and . These placeholders are replaced the with the transaction ID and result accordingly. ## Response 201 fields (application/json): - `id` (string) ID of the deposit request. Example: "dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7" - `websiteId` (string, required) Website ID of the deposit. This value specifies the website with which the deposit is associated. Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG" - `customerId` (string, required) ID of the customer resource. Example: "cus_0YV7DDSDD1C8DA64KHH2W33CPF" - `transactionIds` (array) List of transaction IDs that are associated with the deposit request. This list includes transactions that are created from the deposit request. There is a maximum of one transaction in the list. - `status` (string) Status of the request. Enum: "created", "pending", "initiated", "attempted", "completed", "expired" - `currency` (string, required) Currency code in ISO 4217 format. Example: "USD" - `amounts` (array) List of available deposit amounts. If is not specified when a deposit is created, amounts are determined from the chosen deposit amount strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `customAmount` (object,null) Custom amount restrictions. If this value is , custom amounts are prohibited. If is not specified when a deposit request is created, amount restrictions are determined from the chosen strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `customAmount.minimum` (number, required) Minimum custom amount. - `customAmount.multipleOf` (number, required) Multiple by which the custom amount increases. For example, if is equal to 5.30, and is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the value is reached. A valid custom amount must be equal to + X * , where X is any non negative integer. - `customAmount.maximum` (number, required) Maximum custom amount. This value must be equal to + X * , where X is any positive integer. - `redirectUrl` (string) URL to redirect the customer to when a deposit is completed. The default value is the website URL. - `expirationTime` (string) Date and time at which the deposit request expires. The default expiration time is one hour from the time the request is created. - `propertiesSchema` (object,null) Defines properties the user can complete when they use the hosted deposit form. This field accepts [JSON-schema](https://json-schema.org/) drafts 4, 6, and 7. Example: {"type":"object","properties":{"email":{"type":"string"},"max":{"type":"integer","minimum":0,"exclusiveMaximum":100}},"required":["email"]} - `properties` (object,null) Properties that are available for the user to complete when they use the hosted deposit form. Use this object to describe fields that are rendered and completed on the hosted deposit form. Example: {"email":"email@example.com","max":"33"} - `notificationUrl` (string,null) URL where a server-to-server POST notification is sent. This notification is sent when the transaction result is finalized after a timeout or an offsite interaction. Do not interpret this notification as a confirmation, complete a request to confirm the result of the transaction. To ensure the request is not reattempted, when the result is confirmed, respond with a HTTP status code. The following placeholders are available to use in this URI: and . These placeholders are replaced the with the transaction ID and result accordingly. - `cashierToken` (string,null) JSON Web Token (JWT) used to complete the deposit request. This value is if the deposit request is or . - `customFields` (object) Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see [Custom fields](https://www.rebilly.com/catalog/all/custom-fields). Example: {"foo":"bar"} - `createdTime` (string) Date and time which is set automatically when the resource is created. - `updatedTime` (string) Date and time which updates automatically when the resource is updated. - `_links` (array) Related links. - `_links.href` (string) Link URL. - `_links.rel` (string) Type of link. Enum: "self", "deposit", "transactions" - `_embedded` (object) Embedded objects that are requested by the query parameter. - `_embedded.customer` (object) - `_embedded.website` (object) - `_embedded.transactions` (array) Most recent associated transactions. ## Response 401 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 403 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 422 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `invalidFields` (array) Invalid field details. Example: [{"field":"field1","message":"field1 is invalid"},{"field":"subObject.field2","message":"field2 is invalid"},{"field":"subObject.field2","message":"another error in the field2"}] - `invalidFields.field` (string) Name of the field. Dot notation is used for nested object field names. - `invalidFields.message` (string) Message field. ## Response 429 fields (application/json): - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". Example: "about:blank" - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. Example: "Rate Limit Exceeded" - `status` (integer) HTTP status code. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. Example: "A request cannot be executed because the user has sent too many requests within a certain period of time" - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.