Create a cashier deposit request

Creates a cashier deposit request. To complete the deposit, the customer is redirected to the cashier link. After the deposit, the customer is redirected to the redirectUrl. Corresponding transaction webhooks are sent to webhooks subscribers.

SecuritySecretApiKey or JWT
Request
Request Body schema: application/json

Cashier request resource.

websiteId
required
string <= 50 characters

Website ID of the cashier. This value specifies the website with which the cashier is associated.

customerId
required
string (CustomerId) <= 50 characters

Customer resource ID.

currency
required
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

strategyId
string <= 50 characters

ID of a strategy to be applied for this request for amounts and customAmount. If this field is not specified, a randomly selected strategy with a matching filter value is applied for empty amounts and customAmount.

amounts
Array of numbers <double>

List of available deposit amounts.

If amounts is not specified when a cashier is created, amounts are determined from the chosen strategy. For more information, see the strategyId property.

object or null (CashierStrategyCustomAmount)

Custom amount restrictions. If this value is null, custom amounts are prohibited. If customAmount is not specified when a cashier is created, amount restrictions are determined from the chosen strategy. For more information, see the strategyId property.

minimum
required
number <double> >= 0.01

Minimum custom amount.

multipleOf
required
number <double> >= 0.01

Multiple by which the custom amount increases.

For example, if minimum is equal to 5.30, and multipleOf is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the maximum value is reached.

A valid custom amount must be equal to minimum + X * multipleOf, where X is any non negative integer.

maximum
required
number <double> >= 0.01

Maximum custom amount. This value must be equal to minimum + X * multipleOf, where X is any positive integer.

redirectUrl
string <uri>

URL to redirect the customer to when a deposit is completed. The default value is the website URL.

expirationTime
string <date-time>

Date and time at which the cashier request expires. The default expiration time is one hour from the time the request is created.

Responses
201

Cashier request created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
websiteId
required
string <= 50 characters

Website ID of the cashier. This value specifies the website with which the cashier is associated.

customerId
required
string (CustomerId) <= 50 characters

Customer resource ID.

currency
required
string (CurrencyCode) = 3 characters

Currency code in ISO 4217 format.

id
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

transactionId
string or null <= 50 characters

ID of the transaction that is used in the cashier request.

status
string

Status of the request.

Enum: Description
created

Request is created, but it has not been visited by a customer. This is a temporary state.

pending

Request has been visited by a customer, but no funds have been deposited yet. This is a temporary state.

completed

A funds deposit transaction has been initiated. This is a permanent state.

expired

Request expired without a deposit attempt. This is a permanent state.

amounts
Array of numbers <double>

List of available deposit amounts.

If amounts is not specified when a cashier is created, amounts are determined from the chosen strategy. For more information, see the strategyId property.

object or null (CashierStrategyCustomAmount)

Custom amount restrictions. If this value is null, custom amounts are prohibited. If customAmount is not specified when a cashier is created, amount restrictions are determined from the chosen strategy. For more information, see the strategyId property.

minimum
required
number <double> >= 0.01

Minimum custom amount.

multipleOf
required
number <double> >= 0.01

Multiple by which the custom amount increases.

For example, if minimum is equal to 5.30, and multipleOf is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the maximum value is reached.

A valid custom amount must be equal to minimum + X * multipleOf, where X is any non negative integer.

maximum
required
number <double> >= 0.01

Maximum custom amount. This value must be equal to minimum + X * multipleOf, where X is any positive integer.

redirectUrl
string <uri>

URL to redirect the customer to when a deposit is completed. The default value is the website URL.

expirationTime
string <date-time>

Date and time at which the cashier request expires. The default expiration time is one hour from the time the request is created.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "cashier" "transaction"
object

Embedded objects that are requested by the expand query parameter.

customer
object
website
object
transaction
object
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/cashier-requests
Request samples
application/json
{
  • "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "strategyId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "currency": "USD",
  • "amounts": [
    ],
  • "customAmount": {
    },
  • "redirectUrl": "http://example.com",
  • "expirationTime": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "transactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "status": "created",
  • "currency": "USD",
  • "amounts": [
    ],
  • "customAmount": {
    },
  • "redirectUrl": "http://example.com",
  • "expirationTime": "2019-08-24T14:15:22Z",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ],
  • "_embedded": {
    }
}