Create and manage deposit requests and manage strategies that determine the deposit amounts to display on the page. Rebilly hosted deposit form provides a secure and compliant way to deposit funds. Deposit forms are customizable, and use fully responsive design, built-in error messaging and validation.
Important: These operations are experimental and may change.
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 redirectUrl. Corresponding transaction webhooks are sent to webhooks subscribers.
Deposit request resource.
ID of the website associated with the deposit.
ID of the customer resource.
ID of a deposit amount strategy to be applied for this request for amounts and customAmount. If this field is not specified, a randomly selected deposit amount strategy with a matching filter value is applied for empty amounts and customAmount. If there is no matching deposit amount strategy, the default strategy with the following parameters is applied for empty amounts and customAmount:
amounts:
calculator: absolute
baseAmount: 10
increments: [10, 20]
adjustBaseToLastDeposit: false
customAmount:
minimum: 1
multipleOf: 1
maximum: 10000For more information, see Create a deposit amount strategy.
List of available deposit amounts.
If amounts is not specified when a deposit request is created, amounts are determined from the chosen deposit amount strategy. For more information, see the strategyId property.
Deposit amount limit information. Set optional minimum and maximum deposit amounts. Limits override amounts and customAmount values. If this value is null, deposit amount limits are not set.
Custom amount restrictions. If this value is null, custom amounts are prohibited. If customAmount is not specified when a deposit request is created, amount restrictions are determined from the chosen deposit amount strategy. For more information, see the strategyId property.
URL to redirect the customer to when a deposit is completed. The default value is the website URL.
Date and time when the deposit request expires. The default expiration time is one hour after the time the request is created.
ID of a custom property set to apply to the request propertiesSchema.
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.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/deposit-requests
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/deposit-requests
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/deposit-requests
- SecretApiKey
- JWT
curl -i -X POST \
https://www.rebilly.com/_mock/catalog/all/deposit-requests \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
"customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
"strategyId": "dep_str_0YVJ64MAHTDPA97H8S7R5MYR1M",
"currency": "USD",
"amounts": [
0.01
],
"amountLimits": {
"minimum": 0,
"maximum": 0
},
"customAmount": {
"minimum": 0.01,
"multipleOf": 0.01,
"maximum": 0.01
},
"redirectUrl": "http://example.com",
"expirationTime": "2019-08-24T14:15:22Z",
"customPropertySetId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
"notificationUrl": "http://example.com"
}'Deposit request created.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
ID of the deposit request.
ID of the website associated with the deposit.
ID of the customer resource.
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 approved transaction in the list.
Status of the request.
| Enum Value | 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. |
| initiated | A funds deposit transaction has been initiated. This is a temporary state. |
| attempted | A funds deposit transaction was attempted and declined. This is a temporary state. |
| completed | A funds deposit transaction has been approved and completed. This is a permanent state. |
| expired | Request expired without an approved deposit transaction. This is a permanent state. |
Specifies if the deposit is a coin purchase that credits the coin balance instead of the cash balance. Determined by the deposit amount strategy that is applied to the deposit request.
List of available deposit amounts.
If amounts is not specified when a deposit is created, amounts are determined from the chosen deposit amount strategy. For more information, see the strategyId property.
Value of the default amount in the amounts list. This value is calculated from the defaultIndex property of the deposit strategy that is applied to the deposit request.
Custom amount restrictions. If this value is null, custom amounts are prohibited. If customAmount is not specified when a deposit request is created, amount restrictions are determined from the chosen strategy. For more information, see the strategyId property.
URL to redirect the customer to when a deposit is completed. The default value is the website URL.
Date and time when the deposit request expires. The default expiration time is one hour from the time the request is created.
Defines properties the user can complete when they use the hosted deposit form. This field accepts JSON-schema drafts 4, 6, and 7.
{ "type": "object", "properties": { "email": { … }, "max": { … } }, "required": [ "email" ] }
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.
{ "email": "email@example.com", "max": "33" }
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.
JSON Web Token (JWT) used to complete the deposit request. This value is null if the deposit request is expired or completed.
Custom fields related to the deposit request. Custom field values are copied to created transactions if matching custom fields (name, type) exist.
{ "foo": "bar" }
Date and time when the resource is created. This value is set automatically when the resource is created.
Date and time when the resource is updated. This value is set automatically when the resource is updated.
{ "id": "dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "transactionIds": [ "string" ], "status": "created", "coinPurchase": true, "currency": "USD", "amounts": [ 0.01 ], "defaultAmount": 0.01, "customAmount": { "minimum": 0.01, "multipleOf": 0.01, "maximum": 0.01, "buttonText": { … } }, "redirectUrl": "http://example.com", "expirationTime": "2019-08-24T14:15:22Z", "propertiesSchema": { "type": "object", "properties": { … }, "required": [ … ] }, "properties": { "email": "email@example.com", "max": "33" }, "notificationUrl": "http://example.com", "cashierToken": "string", "customFields": { "foo": "bar" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ { … } ], "_embedded": { "customer": {}, "website": {}, "transactions": [] } }