Cashiers

Use these operations to create and manage cashiers.

Important: These operations are experimental and may change.

Cashiers are customer-scoped configuration resources that define the deposit and payout (withdrawal) settings for a specific customer, website, and currency.

Create a cashier
Experimental

Request

Creates a cashier resource for a specific customer, website, and currency.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired
customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
websiteIdstring, <= 50 characters(WebsiteId)required

ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.

Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
redirectUrlstring or null, (uri), <= 2083 characters

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

depositLimitsobjectwrite-only

Deposit limits for the customer. This object is used to set the minimum and maximum deposit limits for the customer.

notificationUrlstring or null, (uri), <= 2083 characters

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 GET request to confirm the result of the transaction. To ensure the request is not reattempted, when the result is confirmed, respond with a 2xx HTTP status code.

The following placeholders are available to use in this URI: {id} and {result}. These placeholders are replaced the with the transaction ID and result accordingly.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/cashiers \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
    "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
    "currency": "USD",
    "redirectUrl": "http://example.com",
    "depositLimits": {
      "minimum": 1000,
      "maximum": 10000
    },
    "notificationUrl": "http://example.com"
  }'

Responses

Cashier retrieved.

Bodyapplication/json
idstring, <= 50 charactersread-onlyrequired

Unique identifier of the cashier resource.

Example:"cashier_0YV7DE4Z26DQSA1AC92FBJ7SEG"
customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
websiteIdstring, <= 50 characters(WebsiteId)required

ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.

Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
redirectUrlstring or null, (uri), <= 2083 charactersrequired

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

balancenumber, (double), >= 0read-onlyrequired

Customer's current balance.

Example:1500
bonusBalancenumber, (double), >= 0read-onlyrequired

Bonus balance available to the customer.

Example:0
notificationUrlstring or null, (uri), <= 2083 charactersrequired

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 GET request to confirm the result of the transaction. To ensure the request is not reattempted, when the result is confirmed, respond with a 2xx HTTP status code.

The following placeholders are available to use in this URI: {id} and {result}. These placeholders are replaced the with the transaction ID and result accordingly.

expirationTimestring or null, (date-time)required

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

pendingPayoutTotalnumber, (double), >= 0read-onlyrequired

Sum of all payout requests that are currently in a pending state. This value is also the maximum possible "reverse withdrawal" amount.

Example:100
canWithdrawbooleanread-onlyrequired

Specifies if the customer can initiate a withdrawal.

lastDepositRequestIdstring

ID of the last deposit request that is made for this cashier.

Example:"dep_req_01K2HMPNTBDS92TA6W4EX3VJPM"
cashierTokenstring or nullread-only

JSON Web Token (JWT) for the cashier. This value is null if the associated deposit request is expired or completed.

createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

Response
{ "id": "cashier_0YV7DE4Z26DQSA1AC92FBJ7SEG", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "currency": "USD", "redirectUrl": "http://example.com", "balance": 1500, "bonusBalance": 0, "notificationUrl": "http://example.com", "expirationTime": "2019-08-24T14:15:22Z", "pendingPayoutTotal": 100, "canWithdraw": true, "lastDepositRequestId": "dep_req_01K2HMPNTBDS92TA6W4EX3VJPM", "cashierToken": "string", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }