Welcome to the Raise API documentation. The Raise API is a powerful tool that enables businesses to integrate digital gift cards seamlessly into their existing business model.
With the Raise API, businesses can instantly drive customer loyalty and reward customers, vendors, and employees while enjoying the flexibility and cost savings of a digital gift card program.
Our playground environment is publicly accessible and can be utilized for a Proof of Concept integration prior to any formal agreements being made. We have a Postman collection available upon request that can be provided by your account manager.
You can start playing with the API in Playground. You don't need to register to use the playground.
To start using the API please Contact Support to request more information. Your account manager will walk you through the process of getting further access.
Once you have the Client ID
and Client Secret
, you can start using the API.
You can use the Sandbox environment for testing and development purposes. After you have tested your integration, you can use the Production environment for production purposes.
Contact your account manager to obtain the Client ID and Client Secret to authenticate your requests.
Required Headers
| Header | Value |
| ----------- | ----------- |
| X-Client | Client UUID |
| X-Timestamp | Timestamp |
| X-Signature | Signature |
To use the Raise API, you must have an Account and a Client ID. If you do not have an account, please contact Raise API Support
To successfully make an API call, you need to authenticate the request. Each request must contain specific headers:
Let's take a look at each header in detail.
Use the CLIENT_ID
you received from your account manager.
Getting the current timestamp
const timestamp = Math.floor(Date.now() / 1000);
Timestamp is the current UTC represented as Unix timestamp.
The value of the X-Signature
header is dynamic, and you need to generate it programmatically. Essentially this is a SHA256 hash based on the request details.
To calculate a valid signature, you should combine the following fields.
business/v1/cards
)X-Timestamp
header)CLIENT_SECRET
(Get this value from your account manager)50
from page[number]=50
)attributes
field.Creating a signature is tricky. Let's take an example to understand how to create a signature.
Example request
Method: POST
Endpoint: business/v1/cards
Request body
{
"data": {
"type": "cards",
"attributes": {
"brand_uuid": "1bfd8967-f3fb-4efa-939e-f969d1db4b8a",
"denomination": 3000,
"buyer": {
"external_id": "user_id_1234",
"email": "buyer@raise.com"
},
"metadata": {
"purchase_source": {
"kind": "STRING",
"value": "This item was purchased on Web"
}
}
}
}
}
Let's say you want to create a card. To do that, you need to send a POST
request to the business/v1/cards
endpoint. The request body contains all the required fields.
Step 1: Gather all required fields
const path = "business/v1/cards";
const timestamp = Math.floor(Date.now() / 1000);
const CLIENT_SECRET = "YOUR_OWN_CLIENT_SECRET";
const fields = [
path,
timestamp,
CLIENT_SECRET,
// all fields below are extracted from the request body (if it's a POST or a PUT request)
"1bfd8967-f3fb-4efa-939e-f969d1db4b8a", // -> brand_uuid
3000, // -> denomination
"user_id_1234", // -> external_id
"buyer@raise.com", // -> email
"STRING", // -> kind
"This item was purchased on Web", // -> value
];
First, gather all values in an array,
Mandatory Fields:
business/v1/cards
)X-Timestamp
header)CLIENT_SECRET
(Get this value from the developer section of the client portal)Optional Fields:
50
from page[number]=50
)attributes
field.How to get all field values
function getValues(obj) {
let values = [];
for (let key in obj) {
if (typeof obj[key] === "object") {
values = values.concat(getValues(obj[key]));
} else {
values.push(obj[key]);
}
}
return values;
}
const values = getValues(requestBody.data.attributes);
As the request body is dynamic and can have nested objects, You can use a recursive approach to get all values.
Request with Query Parameters
GET business/v1/brands?page[number]=1&page[size]=5
Fields array for a request with query parameters
const path = "business/v1/brands";
const timestamp = Math.floor(Date.now() / 1000);
const CLIENT_SECRET = "YOUR_OWN_CLIENT_SECRET";
const pageNumber = 1; // the value of page[number] query parameter
const pageSize = 5; // the value of page[size] query parameter
const fields = [path, timestamp, CLIENT_SECRET, pageNumber, pageSize];
We are not including the request body attributes as this is a GET request.
The contents of the field array are slightly different if the request has query parameters.
For example, if you want to list all brands, you need to send a GET
request to the business/v1/brands
endpoint. The request has two optional query parameters: page[number]
and page[size]
.
If the request has query parameters, you must extract the values
from the query parameters.
Step 2: Sort the values alphabetically, and join them by ";" .
fields = fields.sort();
const request = fields.join(";");
Then, sort the values alphabetically and join them by ";"
Step 3: Generate the signature
const signature = "v1:" + CryptoJS.SHA256(request).toString(CryptoJS.enc.Hex);
Finally, create the SHA256
value of the request
, and append v1:
with it.
Now you must pass this signature
as the value of X-Signature
header.
Make a request. (Using
curl
)
curl --location --request POST 'https://sandbox-commerce-api.raise.com/business/v1/cards' \
--header 'X-Client: CLIENT_ID' \
--header 'X-Signature: REQUEST_SIGNATURE' \
--header 'X-Timestamp: TIMESTAMP' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "cards",
"attributes": {
"brand_uuid": "1bfd8967-f3fb-4efa-939e-f969d1db4b8a",
"denomination": 3000,
"buyer": {
"external_id": "user_id_1234",
"email": "buyer@raise.com"
},
"metadata": {
"purchase_source": {
"kind": "STRING",
"value": "This item was purchased on Web"
}
}
}
}
}'
Now you have the signature
value of the request, and we are ready to make the API call to create a card.
This is a living document intended to help you enjoy working with the Raise API .
The Raise API is organized around REST.
All responses will be in JSON. Input data passed through the request body will be form-encoded or JSON-encoded. If using a JSON body, please specify the Content-Type
header as application/json
.
To use Raise API, you must register your company as one of our business clients.
Each Client has a unique CLIENT_ID
and CLIENT_SECRET
.
Name | Description |
---|---|
CLIENT_ID |
A unique ID to identify each Client. |
CLIENT_SECRET |
To authenticate each Client, we assign a unique secret. |
You use these credentials to authenticate your requests.
Common definitions of systems and objects used across the API.
Name | Description |
---|---|
API | The Raise API. The API is a set of HTTP endpoints that can be used to access and integrate with the Raise platform. |
Business Client | The Business Client is a business or individual registered to use the API. |
Account | The Account is an account that belongs to the Owner and it is used to log in to the Client Portal. |
Client ID | Client ID is a UUID assigned to each Client during the registration process. The ID can be found in the in Developer section of the Client Portal. |
Client Secret | The Client Secret is a random, fixed length string used to sign the requests for authorization. The Client Secret can be found in the Developer section of the Client Portal. |
Signature | The Signature is a SHA256 sum based on the request details. Each request signature needs to be composed using different fields within the request. See the Generate Signature section for instructions. |
Client Portal | The Client Portal is a web based interface available to each Client to view and access transactional data, reports, dashboards, and manage API keys. |
Once you register your company, you can access the Client Portal. It provides access to both business level statistics and the Client API secrets.
ENVIRONMENT | URL |
---|---|
Production | https://portal.raise.com |
Sandbox | https://sandbox-portal.raise.com |
Raise provides three environments for testing and development purposes.
You can use the playground environment without registering. We provide a fixed set of credentials to use this API. We have a Postman collection available here.
Environment | Availability | URL |
---|---|---|
API | Public | https://playground-api.raise.com/business/v1 |
To use the playground environment, you can use the following credentials:
Name | Value |
---|---|
Client ID | fff75433-ffff-4fff-b625-c54e684dffff |
Client Secret | sandbox-client-secret-string |
Refer to the Authentication section to learn how to use these credentials to generate the X-Timestamp and the X-Signature headers and make an authenticated request to the API.
Registered Clients use the Sandbox
environment for testing and development purposes. In Sandbox
, all operations and data are production-like.
Environment type | Availability | URL |
---|---|---|
API | Registered Clients | https://sandbox-commerce-api.raise.com/business/v1 |
Portal | Registered Clients | https://sandbox-portal.raise.com |
To use the sandbox environment, please visit Getting Started. Manage your sandbox credentials by visiting the Raise Sandbox Portal.
Registered Clients use the production environment for production purposes.
Environment type | Availability | URL |
---|---|---|
API | Registered Clients | https://commerce-api.raise.com/business/v1 |
Portal | Registered Clients | https://portal.raise.com |
To use the production environment, please visit Getting Started. Manage your production credentials by visiting the Raise Client Portal.
For successful authentication, you need to send the following headers with each request.
Header | Value |
---|---|
X-Client | Client UUID |
X-Timestamp | Current Timestamp |
X-Signature | Generated Signature, based on the URL, request body, etc. |
Refer to the Authentication and Authorization section for more details.
Example request body
{
"data": {
"type": "resource_type",
"attributes": {
//.. mandatory fields
}
}
}
Raise API follows a consistent request structure.
The usual request body has a data
object with two keys.
type
- The name of the resource you are trying to access. Example: cards
, brands
, orders
, etc.attributes
- the fields you are trying to update or create.
Example request body with metadata
{
"data": {
"type": "resource_type",
"attributes": {
//.. mandatory fields
"metadata": {
//.. key-value pairs
}
}
}
}
Metadata is a key-value store that can be used to store additional information about a resource.
The metadata
is stored as a JSON object. The keys are strings, and the values are objects with a kind
and a value
field.
Refer to the metadata section for more information.
Raise API follows a consistent and predictable response structure.
Example response body
{
"data": {
"type": "resource_type",
"attributes": {
//.. mandatory fields
}
}
}
The response body is a JSON object with a data
field. The data
field is an object with a type
and an attributes
field.
The type
field is the name of the resource you are trying to access. The attributes
field is what you are trying to update or create.
Response body for a list of objects
{
"data": [
{
"type": "resource_type",
"attributes": {
//.. mandatory fields
}
},
{
"type": "resource_type",
"attributes": {
//.. mandatory fields
}
}
]
}
If the response returns a list of objects, the response body looks like
Example of a single metadata object:
{
"metadata": {
"first_example_field": {
"kind": "STRING",
"value": "Customized string"
}
}
}
Example of multiple metadata objects:
{
"metadata": {
"first_example_field": {
"kind": "STRING",
"value": "Customized string"
},
"second_example_field": {
"kind": "DATE",
"value": "2020-05-22T12:33:00+0000"
}
// ... additional metadata fields (can be any number of fields).
}
}
All of the endpoints in the API accept an optional metadata
attribute in the request body. Metadata can be used to store additional information about the request.
metadata
is defined as a single JSON object or a list of JSON objects,
Each JSON object will be keyed by field_name
( replace field_name
with your desired custom name)
see metadata field name restrictions
The JSON object will also have the following attributes.
kind
- identifies the data type of the field value. (See the Supported Field Types).value
- the value assigned to the field. (See the Supported Field Types).The following table lists the available metadata field types:
Data Type | Description |
---|---|
STRING | Any string value, not to exceed 256 characters. |
DATE | A date value formatted according to the RFC3339 specification. |
Metadata field names can be any string value with the following restrictions:
The Raise API supports idempotency for all POST
, PATCH
, PUT
, and DELETE
requests.
An idempotent API call produces the same result when called multiple times with the same parameters, enabling someone to execute the API call or operation multiple times without changing the result beyond the initial call.
For example, let's say that the CreateCard
method did not require idempotency, and you make a successful request (i.e., Raise successfully creates a new card). However, your connection fails before you receive the success confirmation.
You don't know if the request was successful or not. If you retry the request, Raise will create another card, which is not ideal because you will end up with multiple cards for the same order.
Idempotency allows you to retry the request without creating a new card.
Example Idempotency key generator (Using UUID)
const { v4: uuidv4 } = require("uuid");
const uuid = uuidv4();
Raise supports idempotency by allowing API operations to provide an optional idempotency key in the X-Client-Request
header.
Header | Value | Example |
---|---|---|
X-Client-Request | Alphanumeric Key | 268ad32d49c2c6d90e6432 |
The X-Client-Request
header is optional. The API will not check for idempotency if you don't provide it.
The key will be a unique alphanumeric string (with a maximum length of 64 characters). You are responsible for creating one.
Example request with idempotency key
curl --location --request POST '{BASE_URL}/business/v1/cards' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Signature: v1:6fc18229c3c1259624c551e101ffc3a4b5ea9046817c227b4e42fbe342bc5b15' \
--header 'X-Timestamp: 1610568277'
--header 'X-Client-Request: 268ad32d49c2c6d90e6432'
--data-raw '{
//... request body
}'
To retry a request with the same payload, use the same key. The API will return the same response as the original request.
Once you use a key, it becomes invalid. So, you must use a new key whenever you make a new request with a different payload. In the case of the preceding example,
CreateCard
request with the same idempotency key, the endpoint identifies it as a duplicate request and returns the same response as the original request.The support for idempotency ensures that you can execute API calls and operations confidently, knowing that they will always return the same result regardless of the number of retries.
The API supports versioning based on the URL path. The URL consists of the domain, the version, and the resource,
ex. https://sandbox-raise.com/business/v1/brands
The above URL means the requests will call version v1 of the brands' resources.
To change the version, replace v1
with the desired version.
The Raise API supports pagination for all endpoints that return a list of resources.
Refer to the endpoints section for a list of endpoints that support pagination.
Example URL for paginated data
'https://sandbox-commerce-api.raise.com/business/v1/brands?page[number]=1&page[size]=5'
Returns the brands on page 1, with five brands per page.
You must use query parameters to control the number of resources returned per page and the page number to return.
page[size]
: The number of resources to return per page.
page[number]
: The page number to return.
Example response of paginated data
{
"links": {
"first": "https://sandbox-commerce-api.raise.com/business/v1/brands?page[number]=0&page[size]=5",
"last": "https://sandbox-commerce-api.raise.com/business/v1/brands?page[number]=0&page[size]=5",
"next": "https://sandbox-commerce-api.raise.com/business/v1/brands?page[number]=2&page[size]=5",
"prev": "https://sandbox-commerce-api.raise.com/business/v1/brands?page[number]=0&page[size]=5"
},
"data": [
// ... data
]
}
The API will return a links
object in the response body containing links to the first
, last
, next
, and previous
results pages.
Any request that did not succeed will return a 4xx or 5xx error. The 4xx range means a problem with the request, like a missing parameter. The 5xx range means that something went wrong on our end.
Refer to the Error Response section for more information about the error response body.
The API provides the following HTTP response status codes:
Error Code | Description |
---|---|
200 | OK -- Everything worked as expected. |
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is incorrect. |
403 | There was some error with the authentication headers |
422 | Unprocessable Entry -- Your request is authenticated but unprocessable. |
406 | Not Acceptable -- You requested a format that is not JSON. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We are temporarily offline for maintenance. Please try again later. |
The status codes listed above are defined by RFC 9110
The Raise API returns an error response, a combination of an HTTP response status code combined with a JSON response body containing a Raise Error Code and Error Description.
Error Code | Description |
---|---|
ErrCodeInvalidDeviceUUID | The Client ID is invalid or missing |
ErrCodeInternal | Internal error occurred |
ErrCodeInvalidTransaction | Transaction object is invalid |
ErrCodeMissingAuthorization | Signature or other required headers are missing |
ErrCodeUnauthorized | Unauthorized access |
ErrCodeUnauthenticated | Failed to authenticate |
ErrCodeInvalidSignature | Invalid signature |
ErrCodeBadRequest | Request is invalid |
ErrCodeFailedRisk | Failed risk verification |
ErrCodeBrandDisabled | Brand is currently unavailable for purchase |
ErrCodeDailyPurchaseLimit | Daily purchase limit for a user has been reached |
ErrCodeNotFound | Requested object has not been found |
ErrCodeTooManyRequests | Too many requests are being made, rate limit has been reached |
ErrCodePaginationLimit | Invalid pagination limit |
ErrCodeAccountDeactivated | Account has been deactivated |
Error response body
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeInvalidDeviceUUID",
"title": "Missing device uuid"
}
]
}
Multiple errors example:
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeBadRequest",
"title": "Request is bad",
"detail": "Invalid brand uuid in request"
},
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66a123",
"code": "ErrCodeInternal",
"title": "Something went wrong"
}
]
}
The errors
field is an array of objects with the following fields:
Field | Type | Description |
---|---|---|
id | string | A unique identifier for this particular occurrence of the problem. |
code | string | An application-specific error code expressed as a string value. |
title | string | A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization |
detail | string | A short, human-readable detail of the error this will change depending on the specific error use case and can be empty |
Successful integration requires a lot of testing. You must test for different scenarios and ensure the integration works as expected.
So before you go live, we recommend you test the integration in our sandbox environment.
The sandbox environment is a copy of the production environment. It allows you to test the integration without worrying about the security of the cards.
The CreateCard
endpoint is an excellent place to start. We will use it to mimic different error scenarios and test the integration.
Example request body to simulate a slow request for the create card API
{
"data": {
"type": "cards",
"attributes": {
"denomination": 1002
// ... other fields
}
}
}
Response body for internal server error
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeInternal",
"title": "Something went wrong, try again later.",
"detail": "card generation failed"
}
]
}
You can force the CreateCard API to behave in a certain way by passing a particular value in the denomination
field in the request body.
The card generation is almost instant.
If the value of the denomination
field ends in 02
( for example: "denomination": 1002
), the request will be slower randomly between 2-20 seconds.
If the value of the denomination
field ends in 03
( for example: "denomination": 1003
), the request will fail with an internal error.
If the value of the denomination
field ends in 30
( for example: "denomination": 1030
), the request will fail with a context deadline timeout of 30 seconds.
Example request body to create a card with an expiration date
{
"data": {
"type": "cards",
"attributes": {
"denomination": 1097
// ... other fields
}
}
}
The process is the same as the one described in the Test Card Generation Errors section.
If the value of the denomination
field ends in 97
( for example: "denomination": 1097
), the response will include an expiration date on the created card.
If the value of the denomination
field ends in 98
( for example: "denomination": 1098
), the response will not include a number on the created card.
If the value of the denomination
field ends in 99
( for example: "denomination": 1099
), the response will not include a csc
on the created card.
Example request to produce a 400 error
{
"data": {
"type": "cards",
"attributes": {
"denomination": 1000
// ... other fields
}
}
}
Response body for a bad request
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeBadRequest",
"title": "Request is bad",
"detail": "validating create card params: Denomination invalid, min: 2500, max: 50000, increment: 1"
}
]
}
Each brand
allows a certain range of denominations (for example, 2500-50000)
Pass a value outside this range (for example, 1000) to force a BadRequest
with a 400
status code.
Response body for an unauthenticated request
{
"errors": [
{
"id": "4f9dbc6b-dcb7-49aa-98ca-85163e68e404",
"code": "ErrCodeUnauthenticated",
"title": "Could Not Authenticate",
"detail": "invalid signature"
}
]
}
Pass an invalid X-Signature
or missing X-Client
header to receive an Unauthenticated
error with the 403
status code.
If the signature is invalid, or the client is not authorized to access the API, the API will return this error. Refer to the Authentication section for more information.
Response body for a duplicate request
{
"errors": [
{
"id": "a6f0b73b-9232-45e5-8bd6-95851efef5df",
"code": "ErrCodeConflict",
"title": "Request already processed or in progress.",
"detail": "Idempotency check failed"
}
]
}
Pass a duplicate X-Client-Request
header to receive a Conflict
error with the 409
status code.
If the request is a duplicate, the API will return this error. Refer to the Idempotency section for more information.
Example request body to produce a 404 error
{
"data": {
"type": "cards",
"attributes": {
"brand_uuid": "aaaaaaaa-aaaa-4444-aaaa-aaaaaaaaaaaa"
// ... other fields
}
}
}
Response body for a not found error
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeNotFound",
"title": "Requested object has not been found",
"detail": "failed to get brand: sql: no rows in result set"
}
]
}
Pass an invalid brand id inside the brand_uuid
field of the request body to receive a NotFound
error with 404
status.
The Risk SDK enables the collection of device information and behavior biometrics during user sessions on your website.
The data collected is sent to Raise's systems for all device and user interactions on the website where the script is installed.
The information about an individual’s behavior and devices used to access the services helps identify potentially fraudulent transactions.
You can install the script in two steps.
Script for the latest version:
<script>
const clientId = "YOUR_CLIENT_ID";
const sessionKey = "USER_SESSION_KEY";
const isSandbox = false;
var loader = document.createElement("script");
loader.async = true;
loader.src = `https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-latest.min.js`;
loader.onload = function () {
window._Raise.initialize({ clientId, sessionKey, isSandbox });
};
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(loader, s);
</script>
To install the script on your website, you need three values.
clientId
: Contact your account manager to get that.
sessionKey
: Your sessionKey
will be a UUID for the user session. This will be a server-generated short-lived key. You have to generate it yourself. You can use the uuid package to generate the UUID.
isSandbox
: If you want to use the sandbox version of the script, set the isSandbox
variable to true.
Next, copy the following script into your website's header
section.
By default, The script loads the latest version.
To use a specific version, you need to update the src
of the script.
For example, If you want to use version 1.1.1
of the script:
Replace the following line in the script,
loader.src = https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-latest.min.js
with,
loader.src = https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-1.1.1.min.js
Script for the pixel integration
<noscript>
<img
src="https://www.raise.com/static/risk/assets/pixel/a.png?clientId=<REPLACE-ME>&sessionKey=<REPLACE-ME>&flow=<document.location>&ns=1"
style="display: none"
/>
</noscript>
Adding a fallback pixel is necessary to ensure we capture all data since some users might attempt to disable Javascript on their browsers. This script is specifically designed to capture data for users who have disabled Javascript.
Copy the following code into the body
section of your website.
After installing the script, you need to make some changes to the Create Card request.
Request body for card creation:
{
"data": {
"type": "cards",
"attributes": {
"buyer": {
"email": "Email address of the customer",
"email_verified": true,
"phone_number": "Phone number of the customer",
"phone_number_verified": true
}
// ... other fields
}
}
}
You must include some details about the buyer inside the card creation request. An example request can look like the following.
Pass an additional header with your requests to complete the integration.
Header | Description |
---|---|
X-Session |
Same as sessionKey in Step - 1 |
After you complete the integration, you can start using the Create Card endpoint. You need to wait some time for the data to be available in the Raise system.
X-Session: sessionKey
.The Brand object describes a single brand. It will be returned by the brands endpoint.
Field | Data Type | Description |
---|---|---|
unique ID | UUIDv4 | Unique identifier of the brand |
brand_name | string | Name of the brand |
icon_url | string | URL of the icon image |
legal_terms | string | Legal terms provided by the brand |
physical_legal_terms | string | Physical card legal terms provided by the brand |
description | string | User-facing description of the brand |
card_value_config | CardValueConfig | Brand cards configuration |
redemption_config | RedemptionConfig | Details surrounding card redemption |
categories | List of Category | List of categories the brand belongs to |
sorted_position | int32 | Position on the sorted list |
faceplate_url | string | Image suitable for gift card presentation |
balance_check_url | string | URL for manual balance check |
supported_features | List of Supported Feature | List of all actions suitable for the brand |
Value | Description |
---|---|
GENERATE | Card generation is allowed |
The Card value config stores the available card configurations which are supported by the brand
Field | Data Type | Description |
---|---|---|
unique ID | UUIDv4 | Unique identifier of the brand |
increment | int32 | Allowed cent increments for the purchased cards |
min_value | int32 | Minimum allowed value of the card in cents |
max_value | int32 | Maximum allowed value of the card in cents |
variable_load_supported | bool | Flag indicating the brand supports variable load (min/max/increment) |
denominations | List of int32 | Allowed card values if variable_load_supported is false |
The Redemption config describes how the cards can be used
Field | Possible values | Description |
---|---|---|
disclaimer | string | Possible denial rules |
kind | RedemptionKind | General type of the redemption config |
methods | List of RedemptionMethod | Available methods for redemption |
Value | Description |
---|---|
IN_STORE_ONLY | Card is redeemable only in store |
ONLINE_ONLY | Card is redeemable only on web |
IN_STORE_OR_ONLINE_ONLY | Card is redeemable on both web and in store |
IN_RESTAURANT_ONLY | Card is redeemable only in a restaurant |
APP_ONLY | Card is redeemable only in brand's application |
Field | Possible values | Description |
---|---|---|
kind | RedemptionMethodKind | General type of the method |
info | string | More detailed information about the redemption method |
Value | Description |
---|---|
ENTER_ONLINE | Enter gift card details online to redeem |
SHOW_BARCODE | Show barcode to cashier to redeem |
SHOW_DETAILS | Show details to cashier to redeem |
WRITE_ON_CHECK | Write gift card details on check |
The Category can be used for display purposes on Client's customer facing endpoint.
Field | Data Type | Description |
---|---|---|
unique ID | UUIDv4 | Unique identifier of the brand |
name | string | User facing category name |
available_brands | int32 | Number of brands for this category |
Card is the definition of a Gift Card (the main object of the system).
Field | Data Type | Description |
---|---|---|
unique ID | UUIDv4 | Unique identifier of the brand |
id | string | Human readable number of the transaction through which the card was created |
account_uuid | UUIDv4 | ID of the Account |
owner_uuid | UUIDv4 | ID of the Owner |
brand_uuid | UUIDv4 | ID of the Brand |
denomination | int32 | Initial value of the card |
card | CardDetails | Generated card details |
state | int32 | Current State of the order |
buyer | Person | Customer details |
Field is a generic field with a name and a value attached.
Field | Data Type | Description |
---|---|---|
label | string | A label that can be displayed to the customer |
value | string | Value of the field |
A list of all supported barcode types:
CODE128
PDF417
DATA_MATRIX
QR_CODE
PDF417_COMPACT
Barcode contains the type and value of the barcode.
Field | Data Type | Description |
---|---|---|
kind | BarcodeKind | Type of the barcode |
expression | string | Expression used to format the raw value |
value | string | Formatted value of the barcode |
raw | string | Raw value of the barcode, without formatting |
Card details holds more detailed information about the generated card. The details will always have at least one of the number, csc, and/or view_card_url fields populated.
Field | Data Type | Description |
---|---|---|
brand | Brand | Related brand |
account_uuid | UUIDv4 | ID of the Account |
number | Field | Number of the generated card |
csc | Field | Card security code of the generated card |
view_card_url | Field | Url to card details |
barcode | Barcode | Barcode definition to allow client-side barcode generation |
balance | int32 | Last balance of the card |
balance_checks_available | int32 | Number of available balance checks |
balance_check_supported | bool | Set to true if it is possible to check the card balance |
archived | bool | Flag indicating the current state of the card |
archived_at | date | When the card has been archived |
expired | bool | Flag indicating the current state of the card |
expired_at | date | When the card will expire, if applicable |
commission | int32 | Commission of the card |
Balance of the card returned by the card balances endpoint.
Field | Data Type | Description |
---|---|---|
card_uuid | UUIDv4 | ID of the Card |
balance | int32 | Current balance of the card |
State represents the transaction state.
Possible values | Description |
---|---|
0 | No state available |
1 | Failed state |
2 | Success state |
Person represents the customer or end user. This is also known as the buyer
in certain context.
Field | Data Type | Description |
---|---|---|
external_id | string | ID of the customer in the Client's application |
string | E-mail address of the customer | |
email_verified | bool | The e-mail address of the customer has been verified in the Client's application |
phone_number | string | Phone number of the customer |
phone_number_verified | bool | The phone number of the customer has been verified in the Client's application |
first_name | string | First name of the customer |
last_name | string | Last name of the customer |
external_created_at | date | Date the customer was created in the Client's application |
Raise API is a set of public-facing endpoints that Raise uses to empower our Clients to build solutions around gift cards.
Raise API has some core API's that enables the client to build a gift card solution.
Endpoint | Description | Use case |
---|---|---|
/brands |
Allows getting all configured brands | Show available brands to the customer or search for a brand |
/categories |
Returns all available categories | Show supported categories for better UX |
/cards |
Allows purchasing and retrieving cards | Purchase a new gift card or retrieve generated cards with filters |
Brand is a gift card issuer. Raise API supports a wide range of brands.
List all available brands
curl --location --request GET 'https://playground-api.raise.com/business/v1/brands' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Timestamp: 1598382330' \
--header 'X-Signature: v1:268ad32d49c2c6d90e663207da5e8b972fe031e89c7219055da216fefbfc5f6e'
GET
/business/v1/brands
This endpoint returns a list of brands. Searching, filtering, sorting, and pagination are supported.
To list all available brands, you can call the endpoint directly, as shown in the example.
Get details of one brand
curl --location --request GET 'https://playground-api.raise.com/business/v1/brands/75433552-3e87-43bb-b792-1dbd31cc912f' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Timestamp: 1618508569' \
--header 'X-Signature: v1:036b972e39486136856fe0cb0d7dbe62aee2f8d52161462e7f3f9be07eb03cd0'
GET
/business/v1/brands/:brand_id
It is possible to get one brand. To do this, please append the brand's ID to the URL, as shown in the example.
This endpoint supports filtering. You can filter results by using the query
parameter. Below are some examples.
Get Top Trending Brands
curl --location --request GET 'https://playground-api.raise.com/business/v1/brands?recommended=TOP_SELLING' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Timestamp: 1618508569' \
--header 'X-Signature: v1:036b972e39486136856fe0cb0d7dbe62aee2f8d52161462e7f3f9be07eb03cd0'
To get Top Selling Brands, replace
TOP_SELLING
withTOP_TRENDING
in the above example.
GET
/business/v1/brands?recommended={type}
Returns brands showing a recent spike in sales volume due to brands' merchandising, sales, and promotional events.
Example - /business/v1/brands?recommended=TOP_TRENDING
Returns brands that are top sellers, updated to reflect seasonal trends.
Example - /business/v1/brands?recommended=TOP_SELLING
Sample response:
{
"data": [
{
"type": "brands",
"id": "754338c4-d3a9-446a-b1fc-de2ded7e1765",
"attributes": {
"brand_name": "BrandName",
"icon_url": "https://www.raise.com/raise-content/ibi/BrandName-Logo.png",
"legal_terms": "This card can be used to purchase merchandise only in stores",
"physical_legal_terms": "This physical card can be used to purchase merchandise only in stores",
"description": "Buy stuff, buy lots of it.",
"card_value_config": {
"increment": 1,
"max_value": 50000,
"min_value": 500,
"variable_load_supported": true
},
"redemption_configs": {
"disclaimer": "Can only use 2 cards",
"kind": "IN_STORE_OR_ONLINE_ONLY",
"methods": [
{
"kind": "ENTER_ONLINE",
"info": "Enter the giftcard info online"
},
{
"kind": "SHOW_BARCODE",
"info": "Show the barcode to the cashier"
}
]
},
"categories": [
{
"name": "ENTERTAINMENT"
},
{
"name": "ELECTRONICS"
},
{
"name": "COMPUTER_AND_SOFTWARE"
}
]
}
}
// .. more brands
]
}
The response will either contain
data
field - if you requested a list of brands.data
field - if you requested a single brand.Refer to the Response Structure for more information.
This endpoint supports pagination, sorting, and searching operations.
Query parameter | Example | Result |
---|---|---|
query | query=ann | Returns all brands with names matching *ann* |
character | character=a | Returns all brands with names starting with a |
category | category=TRAVEL | Returns all brands within the category TRAVEL |
recommended | recommended=TOP_SELLING | Returns all brands which are TOP_SELLING |
Query parameter | Example | Result |
---|---|---|
page[size] | page[size]=10 | Returns 10 results per page |
page[number] | page[number]=5 | Returns 6th page (the first page is 0) |
Query parameter | Example | Result |
---|---|---|
sort_by | sort_by=name | The resulting list is sorted by brands name |
sort[order] | sort[order]=asc or desc | The resulting list has been sorted in ascending order |
Categories are used to group brands together. For example, all brands that sell electronics are grouped under the ELECTRONICS
category.
List all available categories
curl --location --request GET 'https://playground-api.raise.com/business/v1/categories' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Timestamp: 1598382330' \
--header 'X-Signature: v1:268ad32d49c2c6d90e663207da5e8b972fe031e89c7219055da216fefbfc5f6e'
To get Top Selling Brands, replace
TOP_SELLING
withTOP_TRENDING
in the above example.
GET
/business/v1/categories
This endpoint returns all brand categories.
Query parameter | Example | Result |
---|---|---|
sort[order] | sort[order]=asc | The resulting list will be sorted in ascending order |
Sample response:
{
"data": [
{
"type": "categories",
"id": "ENTERTAINMENT",
"attributes": {
"name": "Entertainment",
"available_brands": 3
}
}
// .. more categories
]
}
The response will contain a list of categories in the data
field.
Cards are gift cards that can be purchased through Raise API.
Here is the list of the available methods:
POST
/business/v1/cards
curl --location --request POST 'https://playground-api.raise.com/business/v1/cards' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Signature: v1:6fc18229c3c1259624c551e101ffc3a4b5ea9046817c227b4e42fbe342bc5b15' \
--header 'X-Timestamp: 1610568277' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "cards",
"attributes": {
"brand_uuid": "754338c4-d3a9-446a-b1fc-de2ded7e1765",
"denomination": 2500,
"buyer": {
"external_id": "internalID",
"email": "buyer@example.com"
},
"send_email": false,
"metadata": {
"purchase_source": {
"kind": "STRING",
"value": "This item was purchased on Web"
},
"user_local_time": {
"kind": "DATE",
"value": "2020-08-20T05:41:00+02:00"
}
}
}
}
}'
Cards endpoint allows for the creation of new Gift Cards.
This endpoint accepts a JSON object with the following fields:
Field name | Data Type | Optionality | Description |
---|---|---|---|
brand_uuid | string | Mandatory | UUID of the brand |
denomination | string | Mandatory | Value of cards in cents |
buyer | Person | Mandatory | Buyer details |
send_email | boolean | Optional | Set to true if the card should be delivered to the buyer. email |
metadata | Field | Optional | Optional metadata |
Some fields require more details. See the sections below for more information.
You must include the buyer's details in the request. The endpoint accepts a JSON object with the following fields:
Field name | Optionality | Description |
---|---|---|
external_id | Mandatory | This is the ID by which clients identify their customers |
Mandatory if send_email = true. Otherwise Optional | Email address of the buyer |
Sample response
{
"data": {
"type": "cards",
"id": "b837915b-903b-4666-92db-81d0a838dd4c",
"attributes": {
"id": "T43C3Q4WJALHS",
"account_uuid": "fff75433-ffff-4fff-b625-acc0868fffff",
"owner_uuid": "fff75433-ffff-4fff-b625-696e7fffffff",
"brand_uuid": "754338c4-d3a9-446a-b1fc-de2ded7e1765",
"denomination": 2500,
"card": {
"brand": {
"brand_name": "BrandName",
"icon_url": "https://www.raise.com/raise-content/ibi/BrandName-Logo.png",
"legal_terms": "This card can be used to purchase merchandise only in stores",
"physical_legal_terms": "This physical card can be used to purchase merchandise only in stores",
"description": "Buy stuff, buy lots of it.",
"card_value_config": {
"increment": 1,
"max_value": 50000,
"min_value": 500,
"variable_load_supported": true
},
"redemption_configs": {
"disclaimer": "Can only use 2 cards",
"kind": "IN_STORE_OR_ONLINE_ONLY",
"methods": [
{
"kind": "ENTER_ONLINE",
"info": "Enter the giftcard info online"
},
{
"kind": "SHOW_BARCODE",
"info": "Show the barcode to the cashier"
}
]
},
"categories": [
{
"name": "ENTERTAINMENT"
},
{
"name": "ELECTRONICS"
},
{
"name": "COMPUTER_AND_SOFTWARE"
}
]
},
"account_uuid": "fff75433-ffff-4fff-b625-acc0868fffff",
"number": {
"label": "number",
"value": "LLC33GB9FAR4UHK"
},
"csc": {
"label": "csc",
"value": "value"
},
"barcode": {
"kind": "code128",
"value": "LLC33GB9FAR4UHK"
},
"view_card_url": {
"label": "View Gift Card Details",
"value": "https://www.vcdelivery.com/vcert/2f8c9db6-cc12-4898-af01-9a286034b1f8"
},
"balance": 2500,
"archived": false,
"expired": false,
"commission": 50,
"merchant_url": "www.merchant.com"
},
"state": 2,
"buyer": {
"external_id": "internalID",
"email": "buyer@example.com"
},
"send_email": false,
"commission": 50
}
}
}
The response object will contain details about the purchased card. The card object will contain the card details along with other fields.
Their is a special field called state
which shows the status of the card. The possible values are:
Status | Description |
---|---|
0 | Transaction status not specified |
1 | Transaction failed |
2 | Transaction was successful |
The response object will contain the following fields:
Field name | Description |
---|---|
id | Unique ID of the card |
account_uuid | Unique ID of the account |
owner_uuid | Unique ID of the owner |
brand_uuid | Unique ID of the brand |
denomination | Value of the card in cents |
card | Card details. Refer to the Card for more information |
state | State of the card |
buyer | Buyer details |
send_email | Set to true if the card should be delivered to the buyer. email |
commission | Commission amount in cents |
The Card object contains details about the card. The card object will contain the following fields:
Field name | Description |
---|---|
brand | Brand details |
account_uuid | Unique ID of the account |
number | Card number |
csc | Card security code |
view_card_url | A url to view card details |
barcode | Barcode details |
balance | Balance of the card in cents |
archived | Set to true if the card is archived |
expired | Set to true if the card is expired |
commission | Commission amount in cents |
merchant_url | Merchant's website URL |
Sample request to get a single card:
curl --location --request GET 'https://playground-api.raise.com/business/v1/cards/b837915b-903b-4666-92db-81d0a838dd4c?buyer.id=internalID' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Signature: v1:6fc18229c3c1259624c551e101ffc3a4b5ea9046817c227b4e42fbe342bc5b15' \
--header 'X-Timestamp: 1610568277'
GET
/business/v1/cards/:card_id?buyer.id=buyer_internal_id
This functionality allows getting one card specified by the card's unique ID and the customer's ID passed in the request URL.
card_id
: The card's unique ID. It was returned from the response to Create Card request.
buyer_internal_id
: The customer's ID you passed in the buyers details to create the card.
Sample URL:
https://playground-api.raise.com/business/v1/cards/b837915b-903b-4666-92db-81d0a838dd4c?buyer.id=internalID
Sample request to get multiple cards:
curl --location --request GET 'https://playground-api.raise.com/business/v1/cards?page[number]=0&page[size]=50&buyer.id=7081317710107280' \
--header 'X-Client: 359e8708-ee2a-4deb-8c15-0e29fe934cda' \
--header 'X-Timestamp: 1603793344' \
--header 'X-Signature: v1:d5d19b2e0d0e63cc940bc5ff25443dd4900ea9e9fc6e7835a6c65488c1b5ee73'
GET
/business/v1/cards?buyer.id=buyer_internal_id
This endpoint returns a list of gift cards for a given customer. You have to pass the customer's ID in the request URL.
The customer's ID is the same as the buyer's ID you passed in the buyers details to create the card.
Query parameter | Example | Result |
---|---|---|
buyer.id | query=123456789 | Returns all wallet items that belong to the buyer with id 123456789 |
This endpoint supports pagination.
Query parameter | Example | Result |
---|---|---|
page[size] | page[size]=10 | Returns 10 results per page |
page[number] | page[number]=5 | Returns 6th page (the pages are starting with 0) |
Sample URL:
https://playground-api.raise.com/business/v1/cards?page[number]=0&page[size]=50&buyer.id=7081317710107280
Sample response (multiple cards):
{
"data": [
{
"type": "cards",
"id": "b837915b-903b-4666-92db-81d0a838dd4c",
"attributes": {
"id": "T43C3Q4WJALHS",
"account_uuid": "fff75433-ffff-4fff-b625-acc0868fffff",
"owner_uuid": "fff75433-ffff-4fff-b625-696e7fffffff",
"brand_uuid": "754338c4-d3a9-446a-b1fc-de2ded7e1765",
"denomination": 2000,
"card": {
"brand": {
"brand_name": "BrandName",
"icon_url": "https://www.raise.com/raise-content/ibi/BrandName-Logo.png",
"legal_terms": "This card can be used to purchase merchandise only in stores",
"physical_legal_terms": "This physical card can be used to purchase merchandise only in stores",
"description": "Buy stuff, buy lots of it.",
"card_value_config": {
"increment": 1,
"max_value": 50000,
"min_value": 500,
"variable_load_supported": true
},
"redemption_configs": {
"disclaimer": "Can only use 2 cards",
"kind": "IN_STORE_OR_ONLINE_ONLY",
"methods": [
{
"kind": "ENTER_ONLINE",
"info": "Enter the giftcard info online"
},
{
"kind": "SHOW_BARCODE",
"info": "Show the barcode to the cashier"
}
]
},
"categories": [
{
"name": "ENTERTAINMENT"
},
{
"name": "ELECTRONICS"
},
{
"name": "COMPUTER_AND_SOFTWARE"
}
]
},
"account_uuid": "fff75433-ffff-4fff-b625-acc0868fffff",
"number": {
"label": "number",
"value": "LLC33GB9FAR4UHK"
},
"csc": {
"label": "csc",
"value": "value"
},
"barcode": {
"kind": "code128",
"value": "LLC33GB9FAR4UHK"
},
"balance": 2000,
"archived": false,
"expired": false,
"commission": 50
},
"state": 2,
"buyer": {
"external_id": "internalID",
"email": "buyer@example.com"
},
"commission": 50
}
}
]
}
The response will either contain
data
field - If you requested multiple cards.data
field - If you requested a single card.Raise API supports additional endpoints that can be used to enhance the gift card experience. Please work with your account manager on pricing and approval for these additional features.
Endpoint | Description | Use case |
---|---|---|
/card_balances | Returns current balance of the card | To refresh the gift card balance |
Example request to get a card's balance
curl --location --request GET 'https://playground-api.raise.com/business/v1/card_balances/b837915b-903b-4666-92db-81d0a838dd4c' \
--header 'X-Client: fff75433-ffff-4fff-b625-c54e684dffff' \
--header 'X-Signature: v1:6fc18229c3c1259624c551e101ffc3a4b5ea9046817c227b4e42fbe342bc5b15' \
--header 'X-Timestamp: 1610568277'
Sample successful response:
{
"data": {
"type": "card_balances",
"id": "c36d0958-7d3a-40c7-81a4-3f448e916b69",
"attributes": {
"card_uuid": "c36d0958-7d3a-40c7-81a4-3f448e916b69",
"balance": 2502
}
}
}
Response after all balance checks has been used:
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeBadRequest",
"title": "Request is bad",
"detail": "balance checks depleted"
}
]
}
GET
/business/v1/card_balances/:card_id
This endpoint returns a card's current balance.
A sample request is a simple GET with the unique ID of the card created through /business/v1/cards endpoint.
The endpoint can return the following errors:
Error Code | HTTP Status | Reason | Possible solution |
---|---|---|---|
ErrCodeBadRequest |
400 | Invalid request | Verify the request body. The body is probably not formatted properly. |
ErrCodeUnavailableFunctionality |
422 | Brand does not support the functionality | N/A |
ErrCodeNotFound |
404 | Requested card has not been found | Verify the ID of the card. It's the value of id field directly under the data tag in /cards endpoint response. |
ErrCodeInvalidUUID |
400 | An invalid UUID was entered | Value of request's card_uuid field is not valid. Verify it's a valid UUIDv4. |
Let's get ourselves familiarized with the most common use cases of the Raise API. We'll be using the Raise API Sandbox to test out the API. The sandbox is a testing environment that allows you to test the API without affecting your production environment.
This use case is the most common use case for the Raise API.
The process involves generating gift cards for various brands. Here are the three main steps:
GET /brands
The first step is to retrieve all available brands. This is done by sending a GET
request to the /brands
endpoint. The response will include a list of available brands that can be used to create gift cards.
POST /cards
The second step is to generate a gift card. To do this, you'll need to send a POST
request to the /cards
endpoint, along with the desired denomination (which is determined by the available denominations in the brand CardValueConfig object), and the Brand UUID (which you obtained from step 1).
The endpoint will generate a gift card based on the provided information and return a response containing the generated card object.
GET /cards
The third step is to retrieve all cards associated with a specific buyer. This is done by sending a GET
request to the /cards
endpoint, along with the buyer identifier that you set on the POST /cards
endpoint when you generated the gift card.
The cards will return a list of all cards associated with that buyer. The endpoint also supports pagination, so you can retrieve the cards in batches if there are many of them.
This use case is used to retrieve the balance of a gift card.
The process involves retrieving the balance of a gift card. Here are the two main steps:
GET /cards/card_id
The first step is to retrieve the card. To do this, you'll need to send a GET
request to the /cards/{card_uuid}
endpoint, along with the card UUID. The endpoint will return a response containing the card object.
GET /cards/card_balances/:card_id
The second step is to retrieve the balance of the card. To do this, you'll need to send a GET
request to the /cards/{card_uuid}/balance
endpoint, along with the card UUID. The endpoint will return a response containing the card object.
Version | Date Released | What changed |
---|---|---|
1 | January 14, 2021 | Update optional credit card payment method |
1 | February 15, 2021 | Update transaction state details |
1 | March 3, 2021 | Update Create Card required fields |
1 | April 13, 2021 | Updated Balance Check functionality |
1 | October 11, 2021 | Add Recommended Brands |
1 | March 4, 2022 | Add Physical Card Legal Terms |
1 | June 1, 2022 | Remove credit card details and address info from cards endpoint |
1 | August 19, 2022 | Updated idempotency key handling on POST /cards endpoint |
1 | August 25, 2022 | Add rZero integration documentation |
1 | September 8, 2022 | Add Commission rate attribute to CardDetails |
1 | September 27, 2022 | Add View Card Url attribute to CardDetails |
1 | November 29, 2022 | Add Daily purchase limit error to Errors |
1 | March 14, 2023 | Fix exchange examples and sandbox portal link |
1 | July 6, 2023 | Update error examples and codes |
1 | December 21, 2023 | Remove deprecated functions exchange, refunds, payment method params |
Welcome to the Raise API documentation. The Raise API is a powerful tool that enables businesses to integrate digital gift cards seamlessly into their existing business model.
With the Raise API, businesses can instantly drive customer loyalty and reward customers, vendors, and employees while enjoying the flexibility and cost savings of a digital gift card program.
The Raise API is organized around REST. This documentation provides comprehensive guidance on how to interact with our RESTful API, which will always respond in JSON format. Our API allows developers to seamlessly integrate our services into their applications.
If you are a new client or a client migrating from v1 to v2, you can begin with your Initial Integration to get started.
Sandbox & Playground environments are available for testing and development purposes, which doesn’t affect your live data. For more information, refer to the Raise Environments section.
Our API is built on REST principles, providing a standardized approach for communication between clients and servers over the web. By leveraging HTTP methods and status codes, developers can perform CRUD (Create, Read, Update, Delete) operations on resources in a consistent and intuitive manner.
The Raise API utilizes OAuth 2.0 for authentication. To authenticate your requests, you will use the Tokens Resource to obtain your token which you will utilize on on all subsequent API calls.
EXAMPLE REQUEST
{
"data": {
"type": "resource_type",
"id": "resource_id",
"attributes": {
//.. fields
}
}
}
Raise API follows a consistent request structure.
The usual request body has a data
object with two keys.
type
- The name of the resource you are trying to access. Example: cards
, brands
, orders
, etc.attributes
- The fields you are trying to update or create.
EXAMPLE REQUEST WITH METADATA
{
"data": {
"type": "resource_type",
"attributes": {
//.. mandatory fields
"metadata": {
//.. key-value pairs
}
}
}
}
Metadata is a key-value map that can be used to store additional information about a resource.
The metadata
is stored as a JSON object in order to save dynamic details on the resource. The keys are strings, and the values are objects with a kind
and value
field.
Refer to the Transactions Resource for more information.
EXAMPLE
{
"data": {
"type": "resource_type",
"id": "resource_id",
"attributes": {
//.. fields
}
}
}
Raise API follows a consistent and predictable response structure.
The response body is a JSON object with a data
field. The data
field is an object with a type
and an attributes
field.
The type
field is the name of the resource you are trying to access. The attributes
field is what you are trying to update or create.
EXAMPLE LIST RESPONSE
{
"data": [
{
"type": "resource_type",
"id": "resource_id_1",
"attributes": {
//.. fields
}
},
{
"type": "resource_type",
"id": "resource_id_2",
"attributes": {
//.. fields
}
}
],
"meta": {
"total_results": 2
}
}
Raise API supports multiple currencies. The default currency is USD. You can specify the currency in the request headers.
All amounts are an integer
type in the appropriate subunit of the currency. For example, USD and EUR are in cents, GBP is in pence, etc.
The only exception to this are Crypto amounts are represented in floating-point numbers.
You can start familiarizing yourself with the Raise API in Playground
To begin an official integration with our API please Contact Us to request more information. Your account manager will walk you through the process of getting further access.
The Sandbox environment is used for testing and development purposes utilizing a combination of test and mocked data.
The Production environment is used for live transactions and data.
To get started, you need to authenticate your requests.
Servers: Utilize the Tokens Resource to obtain your token which you will utilize on all subsequent API calls.
App/Web: Utilize the Auth Resource to obtain your token which you will utilize on all subsequent API calls.
We recommend that you integrate with the resources in the following order:
Step | Required | Resource | Description |
---|---|---|---|
1 | true |
Tokens OR Auth Resource | Auth Oauth2 token handling |
2 | true |
Brands Resource | Retrieve our brand catalog |
3 | false |
Categories Resource | Optional: Retrieve our brand catalog groupings by category |
4 | false |
Countries Resource | Optional: Retrieve our supported countries |
5 | false |
Crypto Assets Resource | Retrieve our crypto assets, this depends on your use case and is only required if you are offering crypto as a payment method |
6 | false |
Crypto Quote Resource | Retrieve the current exchange rate of a crypto asset to a fiat currency, to provide payment estimates |
78 | true |
Cards Resource | Retrieve gift card details and take actions on the cards such as balance checks, etc |
Raise provides three environments for testing and development purposes.
Our playground environment is publicly accessible and can be utilized for a Proof of Concept integration prior to any formal agreements being made. We provide a fixed set of credentials to use this API. A Postman collection is available here.
Environment | Availability | URL |
---|---|---|
API | Public | https://playground-api.raise.com/business/v2 |
To use the playground environment, you can use the following credentials:
Name | Value |
---|---|
Client ID | fff75433-ffff-4fff-b625-c54e684dffff |
Client Secret | sandbox-client-secret-string |
Refer to the Tokens Resource to learn how to use these credentials to make authenticated request to the API.
Registered Clients use the Sandbox
environment for testing and development purposes. In Sandbox
, all operations and data are production-like.
Environment type | Availability | URL |
---|---|---|
API | Registered Clients | https://sandbox-commerce-api.raise.com/business/v2 |
Portal | Registered Clients | https://sandbox-portal.raise.com |
To start using the sandbox environment, please visit Initial Integration to get started. Manage your sandbox credentials by visiting the Raise Sandbox Portal.
Registered Clients use the production environment for production purposes.
Environment type | Availability | URL |
---|---|---|
API | Registered Clients | https://commerce-api.raise.com/business/v2 |
Portal | Registered Clients | https://portal.raise.com |
Manage your production credentials by visiting the Raise Client Portal.
Token Integration: Integrating with our OAuth2 "tokens" resource is seamless. Follow these steps to incorporate token handling into your application:
EXAMPLE POST TOKEN REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/tokens' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "tokens",
"attributes": {
"type": "BEARER"
}
}
}'
EXAMPLE POST TOKEN RESPONSE
{
"data": {
"type": "tokens",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"type": "BEARER",
"expires_at": 1714494953
}
}
}
POST /business/v2/tokens
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Basic Auth with your Client ID and Secret. |
Content-Type | true |
string |
The content type of the request. |
This endpoint returns a Bearer token that can be used to authenticate requests to the API.
Attribute | Required | Value | Description |
---|---|---|---|
type | true |
string | The type of token. |
Value | Description |
---|---|
BEARER | Bearer authorization token. |
A successful response will have a data
object that contains the Token Object.
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be tokens |
id | string |
The unique identifier of the token. |
attributes | object | The token attributes. |
Attribute | Value | Description |
---|---|---|
access_token | string |
The token value. |
type | string | The token type. |
expires_at | integer |
Unix timestamp for when the token expires. |
Key Pair authentication is a method that allows the mobile app to sign a nonce with the customer's private key which is then verified by Raise using the customer's public key.
EXAMPLE KEY PAIR POST AUTH METHODS REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/auth/methods' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-Country: US' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/methods",
"attributes": {
"type": "SR25519_KEY_PAIR",
"method": "0x8ca7f551da8775159c2ac65b26e3efefad06e9676cbedc3fa05e2c3801b2b87e"
}
}
}'
EXAMPLE KEY PAIR POST AUTH METHODS RESPONSE
{
"data": {
"type": "auth/methods",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"type": "SR25519_KEY_PAIR", // or RSA_KEY_PAIR
"nonce": "0x18b021c8d8de3ac1d1fd5500c034df9f5b94567893b70b62324c3e0a784521e4"
}
}
}
EXAMPLE TOTP POST AUTH METHODS REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/auth/methods' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-Country: US' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/methods",
"attributes": {
"type": "TOTP"
}
}
}'
EXAMPLE TOTP POST AUTH METHODS RESPONSE
{
"data": {
"type": "auth/methods",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"type": "TOTP",
"qr_code_image": "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaElEQVR42mL8//8/AyUY"
}
}
}
EXAMPLE SMS POST AUTH METHODS REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/auth/methods' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-Country: US' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/methods",
"attributes": {
"type": "SMS",
"method": "2345678901"
}
}
}'
EXAMPLE SMS POST AUTH METHODS RESPONSE
{
"data": {
"type": "auth/methods",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"type": "SMS",
"method": "2345678901"
}
}
}
SMS authentication is a method that allows customers to receive a verification code via SMS to authenticate themselves.
TOTP authentication is a method that allows customers to receive a qr code image to be saved to an authenticator app, which generates timebound verification codes.
The auth methods endpoints are used to manage the authentication methods for a customer.
POST /business/v2/auth/methods
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Basic Auth with your Client ID and Secret. |
Content-Type | true |
string |
The content type of the request. |
X-Country | false |
string | ISO 3166-1 alpha-2 country code for the transaction. Default is US. |
X-CustomerID | true |
string |
The customer ID. |
This endpoint is used to create a new authentication method for a customer. An error will be returned if the customer already had an authentication method set. Depending on the method type use the appropriate request body SR25519 or RSA Key Pair Auth Method Request, SMS Auth Method Request or TOTP Auth Method Request.
A successful response will have a data
object that contains the Auth Methods Object.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE PATCH AUTH METHODS REQUEST
curl --location --request PATCH 'https://playground-api.raise.com/business/v2/auth/methods/fff75433-ffff-4fff-b625-c5423tk90d' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "auth/methods",
"attributes": {
"type": "TOTP"
}
}
}'
EXAMPLE PATCH AUTH METHODS RESPONSE
{
"data": {
"type": "auth/methods",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"type": "TOTP",
"qr_code_image": "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaElEQVR42mL8//8/AyUY"
}
}
}
PATCH /business/v2/auth/methods/:id
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token. |
Content-Type | true |
string |
The content type of the request. |
X-Country | false |
string | ISO 3166-1 alpha-2 country code for the transaction. Default is US. |
This endpoint is used to update the authentication method for a customer. Depending on the method type use the appropriate request body SR25519 or RSA Key Pair Auth Method Request, SMS Auth Method Request or TOTP Auth Method Request.
A successful response will have a data
object that contains the Auth Methods Object.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE SR25519 KEY PAIR GENERATION
const { schnorrkel } = require('@polkadot/util-crypto');
function generateKeyPair() {
// Generate SR25519 key pair
const { publicKey, secretKey } = await schnorrkel.generateKeypair();
// Encode public key to hexadecimal string
const srPublicKeyHex = publicKey.toString("hex");
return { srPrivateKey: secretKey, srPublicKeyHex };
}
EXAMPLE RSA KEY PAIR GENERATION
const crypto = require("crypto");
// Function to generate RSA key pair and hex encode public key
function generateKeyPair() {
const { privateKey, publicKey } = crypto.generateKeyPairSync("rsa", {
modulusLength: 2048, // RSA key size in bits
publicKeyEncoding: {
type: "spki", // SubjectPublicKeyInfo (SPKI)
format: "pem", // PEM format
},
privateKeyEncoding: {
type: "pkcs8", // PrivateKeyInfo (PKCS#8)
format: "pem", // PEM format
},
});
// Encode public key to Hexadecimal
const publicKeyHex = publicKey.toString("hex");
// publicKeyHex will then be used as the `method` in the request body
return { privateKey, publicKey: publicKeyHex };
}
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be auth/methods |
id | string |
The unique identifier of the method. |
attributes | object | The method attributes. |
Attribute | Required | Value | Description |
---|---|---|---|
type | true |
string | The type of method. |
method | true |
string |
Hex encoded public key. |
Attribute | Required | Value | Description |
---|---|---|---|
type | true |
string | The type of method. |
method | true |
string |
The phone number to send verification codes to. |
verification_type | false |
string | The verification type. This is only required for types that support more than one verification type. Most types only support a single verification type so this field is not required. |
Attribute | Required | Value | Description |
---|---|---|---|
type | true |
string | The type of method. |
Attribute | Value | Description |
---|---|---|
type | string | The type of method. |
method | string |
The associated method to the type if applicable. |
verification_type | string | The verification type. |
qr_code_image | string |
The base64 encoded qr code image for TOTP method. This should be rendered to the user in order for them to add to an authenticator app |
Value | Description |
---|---|
SR25519_KEY_PAIR | SRSR25519 Key Pair method, will receive a nonce to be signed by the private key. |
RSA_KEY_PAIR | RSA Key Pair method, will receive a nonce to be signed by the private key. |
SMS | SMS method, will receive a text message with a code. |
TOTP | TOTP method, will receive an qr image on creation to be saved to an authenticator app. |
Value | Description |
---|---|
NONCE | The auth method will be verified via a 32 bit nonce this is used in conjunction with the SIGNED_CHALLENGE |
SIGNED_CHALLENGE | The auth method will be verified via a signed challenge. This will be created by signing the NONCE with the customers private key. |
CODE | The auth method will be verified via verification code. |
Token Integration: Integrating with our OAuth2 auth resource is seamless. Follow these steps to incorporate token handling into your application:
EXAMPLE SR25519 KEY PAIR NONCE SIGNING
const crypto = require("crypto");
const merlin = require("merlin");
function signChallenge(challengeNonce, privateKey) {
// Decode challengeNonce from hexadecimal string
const cn = Buffer.from(challengeNonce, "hex");
// Create a new transcript
const transcript = new merlin.Transcript("raise-auth");
transcript.appendMessage(Buffer.from("challenge-nonce"), cn);
// Sign the transcript with the private key
const signature = privateKey.sign(transcript);
// Encode the signature to hexadecimal string
const sigHex = signature.toString("hex");
return sigHex;
}
EXAMPLE RSA KEY PAIR NONCE SIGNING
function signChallenge(challengeNonce, privateKey) {
const signer = crypto.createSign("RSA-SHA256"); // Use "RSA-SHA256" for RSA signatures
signer.update(challengeNonce);
const signature = signer.sign(privateKey, "hex");
// The signature will be hex encoded, and should be used as the `signed_nonce` in the request body
return signature;
}
EXAMPLE KEY PAIR GENERATE NONCE POST TOKEN REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/tokens' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-Country: US' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/tokens",
"attributes": {
"action": "GENERATE_NONCE"
}
}
}'
EXAMPLE KEY PAIR GENERATE NONCE POST TOKEN RESPONSE
{
"data": {
"type": "auth/tokens",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"type": "SR25519_KEY_PAIR",
"nonce": "0x18b021c8d8de3ac1d1fd5500c034df9f5b94567893b70b62324c3e0a784521e4"
}
}
}
EXAMPLE KEY PAIR VALIDATE SIGNED NONCE POST TOKEN REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/tokens' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-Country: US' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/tokens",
"attributes": {
"action": "VALIDATE_VERIFICATION",
"signed_nonce": "0x18b021c8d8de3ac1d1fd5500c034df9f5b94567893b70b62324c3e0a784asdfg"
}
}
}'
EXAMPLE SMS AND TOTP VALIDATE VERIFICATION POST TOKEN REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/tokens' \
-u 'client-id:sandbox-client-secret-string' \
--header 'Content-Type: application/json' \
--header 'X-CustomerID: 123456' \
--data-raw '{
"data": {
"type": "auth/tokens",
"attributes": {
"action": "VALIDATE_VERIFICATION",
"code": "123456"
}
}
}'
EXAMPLE VALIDATE VERIFICATION & REFRESH POST TOKEN RESPONSE
{
"data": {
"type": "auth/tokens",
"id": "fff75433-ffff-4fff-b625-c5423tk90d",
"attributes": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"type": "BEARER",
"expires_at": 1714494953
}
}
}
POST /business/v2/auth/tokens
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Basic Auth with your Client ID and Secret. |
Content-Type | true |
string |
The content type of the request. |
X-Country | false |
string |
ISO 3166-1 alpha-2 country code for the customer. Default is US. |
X-CustomerID | true |
string |
The customer ID. |
The initial request to this endpoint with the correct type set will send a verification to the customer's authentication method. The customer will receive a verification code that they will need to provide in the next request to the POST Auth Tokens endpoint.
For customers with a TOTP method, the code should be set on the initial request. Which will then return the token in the response.
This endpoint returns a Bearer token that can be used to authenticate requests to the API.
Attribute | Required | Value | Description |
---|---|---|---|
action | true |
string | The desired action of token request. |
code | false |
string |
The verification code provided by the customer. Required for SMS and OTP. |
signed_nonce | false |
string |
The hex encoded bytes signed nonce provided by the customer. Required for RSA Key Pair. |
A successful response will have a data
object that contains the Token Object.
Attribute | Type | Description |
---|---|---|
id | string |
The unique identifier of the token. |
type | string |
Value will always be tokens |
attributes | object | The token attributes. |
Attribute | Value | Description |
---|---|---|
token | string |
The token value. |
type | string | The token type. |
expires_at | integer |
Unix timestamp for when the token expires. |
nonce | string |
The hex encoded bytes challenge nonce value. Ensure to hex decode to bytes prior to generating signed nonce with private key. |
Value | Description |
---|---|
GENERATE_NONCE | Generates a nonce for the customer to sign. |
SEND_VERIFICATION | Sends a verification to the customer's authentication method. |
VALIDATE_VERIFICATION | Validates the verification code provided by the customer. |
REFRESH | Refreshes the token. |
Value | Description |
---|---|
BEARER | Bearer authorization token. |
The brands endpoints support live querying for the most up to date information. However, we recommend caching the brands within your application and refreshing them every hour to ensure the best performance.
You will use this brand to create transactions and allow users to browse available brands.
Brands are separated by country and currency. Amazon US is a different brand than Amazon UK. However they will have the same group_id
. This is applicable to all brands. The names of the brands will commonly match however country code and currency will be different amongst other country specific attributes.
EXAMPLE GET BRAND REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/brands/a5daa05b-bd95-4d3d-94b5-0ea26480a7e7' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
EXAMPLE GET BRAND RESPONSE
{
"data": {
"type": "brands",
"id": "a5daa05b-bd95-4d3d-94b5-0ea26480a7e7",
"attributes": {
//.. reference The Brand Object
}
}
}
GET
/business/v2/brands/:id
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This brand endpoint returns a single brand object, which can be used to display detailed information about the brand.
The response will have a data
object that contains the Brand Object
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE GET BRANDS REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/brands' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD'
EXAMPLE GET BRANDS RESPONSE
{
"data": [
{
"type": "brands",
"id": "a5daa05b-bd95-4d3d-94b5-0ea26480a7e7",
"attributes": {
//.. reference The Brand Object
}
},
{
"type": "brands",
"id": "a5asdf5b-bd95-4d3d-94b5-0ea26480a7e2",
"attributes": {
//.. reference The Brand Object
}
}
// .. more brands
],
"meta": {
"total_results": 2
}
}
GET
/business/v2/brands
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
X-Country | false |
string |
The country code for the brands. This ensures brands are returned for the proper context. Default is US. |
X-Currency | false |
string |
The currency code for the brands. This ensures brands are returned for the proper context. Default is USD. |
This brand endpoint returns a list of brands. The brands are paginated and can be sorted and searched.
This endpoint supports pagination, sorting, and searching operations. All search and pagination parameters are optional and will utilize the default values if not provided.
Attribute | Value | Description |
---|---|---|
query | string |
The value passed will be used to query for brands by name, the value must be at least 3 characters in length, it is case insensitive, and will filter out special characters. |
character | character |
Queries all brands that start with the character provided. a |
category | category | Queries all brands by the provided category. |
ids | array of uuidv4 |
Queries all brands by the provided ids. |
Attribute | Value | Description |
---|---|---|
page[size] | integer |
Returns the specified number of results per page. The maximum results allowed per page are 500. Default is 10. |
page[number] | integer |
The first page is 0. If 5 is specified the 6th page will be returned. Default is 0. |
Attribute | Value | Description |
---|---|---|
sort[field] | string |
Sorts by name or popularity . |
sort[order] | string |
Sort ASC or DESC . |
The response will have a data
array that contains the Brand Objects and a meta
object that contains total_results
which is the total number of resources. This can be utilized to determine the number of pages available based on the page[size]
parameter.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE BRAND OBJECT
{
"type": "brands",
"id": "a5daa05b-bd95-4d3d-94b5-0ea26480a7e7",
"attributes": {
"group_id": "2345a05b-bd95-4d3d-94b5-0ea26480a788",
"icon_url": "https://www.raise.com/raise-content/Raise+Brand+Tiles/64X64/a5daa05b-bd95-4d3d-94b5-0ea26480a7e7.png",
"name": "Amazon",
"currency": "USD",
"country": "US",
"commission_rate": 400,
"description": "Amazon.com Gift Cards* never expire and can be redeemed towards millions of items at www.amazon.com",
"terms": "The Amazon.com Conditions of Use apply. No fees apply to Gift Cards. We reserve the right to require additional verification of your identity, Gift Card or account ownership, or provision of an additional payment instrument, before you are able to apply a Gift Card to your account or your Amazon.com Balance to a purchase. When you purchase, receive, or apply a Gift Card to your account, or your Amazon.com Balance to a purchase, you agree that the laws of the State of Washington, without regard to principles of conflict of laws, will govern these terms and conditions and any dispute that may arise between you and ACI Gift Cards LLC, and its affiliates related to your use of a Gift Card or your Amazon.com Balance. We reserve the right to change these terms and conditions without notice, from time to time at our sole discretion. All terms and conditions are applicable to the extent permitted by law. If any of these terms and conditions are deemed invalid, void, or for any reason unenforceable, that unenforceable term will be deemed severable and will not affect the validity and enforceability of any remaining terms and conditions.",
"merchant_url": "https://www.amazon.com/",
"balance_check_url": "https://www.amazon.com/gp/css/gc/balance",
"redemption_config": {
"disclaimer": "",
"methods": [
{
"info": "To redeem your gift card, follow these steps:\n1.\tVisit www.amazon.com/redeem\n2.\tEnter the Claim Code when prompted.\n3.\tGift card funds will be applied automatically to eligible orders during the checkout process.\n4.\tYou must pay for any remaining balance on your order with another payment method.\n\nYour gift card claim code may also be entered when prompted during checkout. To redeem your gift card using the Amazon.com 1-Click® service, first add the gift card funds to Your Account.\nIf you have questions about redeeming your gift card, please visit www.amazon.com/gc-redeem.",
"kind": "ONLINE"
}
]
},
"transaction_config": {
"disclaimer": "Restrictions apply, see [amazon.com/gc-legal](amazon.com/gc-legal)",
"variable_load": {
"increment": 1,
"minimum_amount": 500,
"maximum_amount": 199999
}
},
"categories": ["ENTERTAINMENT", "HOME"]
}
}
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be brands |
id | uuidv4 |
The unique identifier of the brand. |
attributes | object | The transaction attributes. |
Attribute | Type | Description |
---|---|---|
group_id | uuidv4 |
Unique identifier for the brand group. Example: Amazon US and Amazon UK are in the same group. |
name | string |
Name of the brand. |
commission_rate | integer |
The commission rate that the client will earn on the sale of the brand. This value is in basis point format. Example: 400 = 4% |
description | string |
Description of the brand. |
currency | string | ISO 4217 currency code for the brand. |
country | string | ISO 3166-1 alpha-2 country code for the brand. |
icon_url | string |
URL to the brand's icon. |
faceplate_url | string |
URL to the brand's faceplate. The faceplate is a rectangle gift card image. |
balance_check_url | string |
URL to manually check the balance of the brand's gift card. This can be utilized in case automatic balance checks are not available. If no balance check url is available, it will default to match the merchant url. |
balance_checks_supported | boolean |
Indicates if the brand supports automatic balance checks. |
merchant_url | string |
URL to the brand's website. |
legal_terms | string |
Legal terms for the brand. |
transaction_config | object | Configuration for the purchase transaction of a brand's gift cards. |
redemption_config | object | Configuration for the brand's gift card redemption. |
categories | array | Categories for the brand. |
Note: variable_load and fixed_load are mutually exclusive. A transaction config will have one or the other.
Attribute | Type | Description |
---|---|---|
disclaimer | string |
Disclaimer for the brand's gift card transaction. |
variable_load | object | Configuration for the variable load of the brand's gift cards. |
fixed_load | object | Configuration for the fixed load of the brand's gift cards. |
Attribute | Type | Description |
---|---|---|
increment | integer |
The increment amount for variable loads of the brand's gift cards. By default, this is set to 1 currency increment. |
minimum_amount | integer |
The minimum amount, in the brand's applicable currency, for variable loads of the brand's gift cards. Reference Currency |
maximum_amount | integer |
The maximum amount, in the brand's applicable currency, for variable loads of the brand's gift cards. Reference Currency |
Attribute | Type | Description |
---|---|---|
amounts | array of integers |
The fixed load amounts, in the brand's applicable currency, for the brand's gift cards. For USD, this is in cents. |
Attribute | Type | Description |
---|---|---|
disclaimer | string |
Disclaimer for the brand's gift card redemption. |
methods | array | Methods for redeeming the brand's gift card. |
Attribute | Type | Description |
---|---|---|
info | string |
Information on how to redeem the brand's gift card. |
kind | string | The method of redemption for the brand's gift card. |
Value | Description |
---|---|
ONLINE |
The brand's gift card can be redeemed online. |
IN_STORE |
The brand's gift card can be redeemed in-store. |
APP |
The brand's gift card can be redeemed in-app. |
RESTAURANT |
The brand's gift card can be redeemed at a restaurant. |
Value | Description |
---|---|
APPAREL |
Apparel |
AUTOMOTIVE |
Automotive |
BABY_AND_KIDS |
Baby and Kids |
BEAUTY |
Beauty |
DINING_AND_DELIVERY |
Dining and Delivery |
ENTERTAINMENT |
Entertainment |
GROCERY |
Grocery |
HOME |
Home |
PETS |
Pets |
SHOES |
Shoes |
SPORTS_AND_OUTDOORS |
Sports and Outdoors |
TRAVEL |
Travel |
Categories are a way to group brands together. This resource provides a list of categories that are available to the Raise API.
EXAMPLE GET CATEGORIES REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/categories' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD'
EXAMPLE GET CATEGORIES RESPONSE
{
"data": [
{
"type": "categories",
"id": "ENTERTAINMENT",
"attributes": {
"name": "Entertainment",
"available_brands": 3
}
},
{
"type": "categories",
"id": "GROCERY",
"attributes": {
"name": "Groceries",
"available_brands": 10
}
}
// .. more categories
],
"meta": {
"total_results": 2
}
}
GET
/business/v2/categories
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
X-Country | false |
string |
The country code for the categories. This ensures categories are returned for the proper context. Default is US. |
X-Currency | false |
string |
The currency code for the categories. This ensures categories are returned for the proper context. Default is USD. |
This category endpoint returns a list of categories. The categories can be sorted as needed.
Attribute | Value | Description |
---|---|---|
sort[order] | string |
Sort ASC or DESC |
The response will have a data
array that contains the Category Objects and a meta
object that contains total_results
which is the total number of resources.
Reference Error Response for a list of possible errors and their descriptions.
Attribute | Type | Description |
---|---|---|
id | string | The unique identifier for the category. |
name | string |
A user friendly name for the category. |
available_brands | integer |
The number of brands available in the category. |
Countries are a way to group brands together. This resource provides a list of countries that are available to the Raise API.
EXAMPLE GET COUNTRIES REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/countries' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD'
EXAMPLE GET COUNTRIES RESPONSE
{
"data": [
{
"type": "countries",
"id": "US",
"attributes": {
"currency": "USD",
"available_brands": 832
}
},
{
"type": "countries",
"id": "CA",
"attributes": {
"currency": "CAD",
"available_brands": 135
}
}
// .. more countries
],
"meta": {
"total_results": 2
}
}
GET
/business/v2/countries
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This country endpoint returns a list of countries.
The response will have a data
array that contains the Country Objects and a meta
object that contains total_results
which is the total number of resources.
Reference Error Response for a list of possible errors and their descriptions.
Attribute | Type | Description |
---|---|---|
id | string | ISO 3166-1 alpha-2 country code identifier for the country. |
currency | string | ISO 4217 currency code. |
available_brands | integer |
The number of brands available in the country. |
Crypto assets are digital assets that are designed to work as a medium of exchange that uses cryptography to secure financial transactions, control the creation of additional units, and verify the transfer of assets. The Raise API supports a variety of crypto assets that can be utilized as a payment method to facilitate transactions within your application.
EXAMPLE GET CRYPTO ASSETS REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/crypto_assets' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
EXAMPLE GET CRYPTO ASSETS RESPONSE
{
"data": [
{
"type": "crypto_assets",
"id": "e901d27a-9003-44f4-93cf-2998f291c286",
"attributes": {
"disclaimer": "In minutes",
"icon_url": "https://www.raise.com/raise-content/Raise+Wallet/Wallet+Connect+Icons/Crypto+Icons/basicUSDC.png",
"name": "USDC",
"network": "SEPOLIA_TESTNET"
}
},
{
"type": "crypto_assets",
"id": "e901d27a-9003-44f4-93cf-2998f291c281",
"attributes": {
"disclaimer": "In minutes",
"icon_url": "https://www.raise.com/raise-content/Raise+Wallet/Wallet+Connect+Icons/Crypto+Icons/basicUSDC.png",
"name": "USDT",
"network": "SEPOLIA_TESTNET"
}
}
],
"meta": {
"total_results": 2
}
}
GET /business/v2/crypto_assets
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This crypto assets endpoint returns a list of crypto assets that are available currently supported by the Raise API. We recommend caching this list within your application and refreshing them every 24 hours.
The response will have a data
array that contains the Crypto Asset Objects and a meta
object that contains total_results
which is the total number of resources.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE CRYPTO ASSET OBJECT
{
"type": "crypto_assets",
"id": "e901d27a-9003-44f4-93cf-2998f291c281",
"attributes": {
"disclaimer": "In minutes",
"icon_url": "https://www.raise.com/raise-content/Raise+Wallet/Wallet+Connect+Icons/Crypto+Icons/basicUSDC.png",
"name": "USDT",
"network": "SEPOLIA_TESTNET"
}
}
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be crypto_assets |
id | string |
The unique identifier of the crypto asset. |
attributes | object | The crypto asset attributes. |
Attribute | Type | Description |
---|---|---|
disclaimer | string |
The disclaimer of the crypto asset, if applicable. |
icon_url | string |
The URL of the crypto asset icon. |
name | string | The name of the crypto asset. |
network | string | The network of the crypto asset. |
Asset | Network | Description | Processing Time Disclaimer |
---|---|---|---|
DOT | POLKADOT | Polkadot. | In seconds |
DOT | POLKADOT_ASSET_HUB | Polkadot on the Asset Hub network. | In seconds |
USDC | POLKADOT_ASSET_HUB | USD Coin on the Polkadot network. | In seconds |
USDT | POLKADOT_ASSET_HUB | Tether on the Polkadot network. | In seconds |
BTC | BITCOIN | The original cryptocurrency built on the Bitcoin network. | Up to 30 minutes |
ETH | ETHEREUM | Ether, the native cryptocurrency of the Ethereum blockchain. | In minutes |
USDC | ETHEREUM | USD Coin on the Ethereum network. | In minutes |
USDT | ETHEREUM | Tether on the Ethereum network. | In minutes |
BAT | ETHEREUM | Basic Attention Token on the Ethereum network. | In minutes |
ETH | ARBITRUM | Ethereum on the Arbitrum network. | In minutes |
USDC | ARBITRUM | USD Coin on the Arbitrum network. | In minutes |
USDT | ARBITRUM | Tether on the Arbitrum network. | In minutes |
ETH | BASE | Ethereum on the Base network. | In minutes |
USDC | BASE | USD Coin on the Base network. | In minutes |
MATIC | POLYGON | Polygon. | In minutes |
USDC | POLYGON | USD Coin on the Polygon network. | In minutes |
USDC.e | POLYGON | USD Coin on the Polygon network. | In minutes |
USDT | POLYGON | Tether on the Polygon network. | In minutes |
BAT | POLYGON | Basic Attention Token on the Polygon network. | In minutes |
BNB | BNB | Binance Coin on the Binance Smart Chain network. | In minutes |
USDC | BNB | USD Coin on the Binance Smart Chain network. | In minutes |
USDT | BNB | Tether on the Binance Smart Chain network. | In minutes |
BUSD | BNB | Binance USD on the Binance Smart Chain network. | In minutes |
BAT | BNB | Basic Attention Token on the Binance Smart Chain network. | In minutes |
TRX | TRON | Tron. | In minutes |
USDT | TRON | Tether on the Tron network. | In minutes |
SOL | SOLANA | SOL on Solana network. | In minutes |
USDC | SOLANA | USDC on Solana network. | In minutes |
USDT | SOLANA | USDT on Solana network. | In minutes |
Asset | Network | Description |
---|---|---|
WND | POLKADOT_TESTNET | Westend on the Polkadot testnet |
DOT | POLKADOT_ASSET_HUB_TESTNET | Polkadot on the Asset Hub testnet |
USDC | POLKADOT_ASSET_HUB_TESTNET | USD Coin on the Asset Hub testnet |
BTC | BITCOIN_TESTNET | Bitcoin on the Bitcoin testnet |
ETH | SEPOLIA_TESTNET | Ethereum on the Sepolia testnet |
USDC | SEPOLIA_TESTNET | USDC on the Sepolia testnet |
USDT | SEPOLIA_TESTNET | USDT on the Sepolia testnet |
BAT | SEPOLIA_TESTNET | Basic Attention Token on the Sepolia testnet |
BAT | POLYGON_TESTNET | Basic Attention Token on the Polygon testnet |
USDC | POLYGON_TESTNET | USDC on the Polygon testnet |
USDT | POLYGON_TESTNET | USDT on the Polygon testnet |
MATIC | POLYGON_TESTNET | Polygon on the Polygon testnet |
BNB | BNB_TESTNET | Binance Coin on the Binance Smart Chain testnet |
SOL | SOLANA_DEVNET | SOL on Solana devnet |
USDC | SOLANA_DEVNET | USDC on Solana devnet |
Crypto quotes are used to get the current exchange rate of a crypto asset to a fiat currency, you can use this to calculate the amount of fiat currency you will receive when you convert a crypto asset for your users.
Please note, this is only a quote, the Transaction Resource is used to create a transaction which will return the final payment amount required.
EXAMPLE POST CRYPTO QUOTE REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/crypto_quotes' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "crypto_quotes",
"attributes": {
"from_currency": "DOT",
"to_currency": "USD"
}
}
}'
EXAMPLE POST CRYPTO QUOTE RESPONSE
{
"data": {
"type": "crypto_quotes",
"id": "75433d5d-5649-4695-b444-901483221d1d",
"attributes": {
"from_currency": "DOT",
"to_currency": "USD",
"rate": 6.5487884741322855,
"expires_at": 1736875831
}
}
}
POST /business/v2/crypto_quotes
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
Content-Type | true |
string |
The content type of the request. Default is application/json . |
Attribute | Required | Type | Description |
---|---|---|---|
from_currency | true |
string | The crypto asset symbol to convert from. |
to_currency | true |
string |
The fiat currency symbol to convert to. Example: USD, GBP, CAD, etc. |
This crypto quote endpoint enables you to get the current exchange rate of a crypto asset to a fiat currency. The response will include the exchange rate and the expiration time of the quote.
The response will have a data
object that contains the Crypto Quote Object.
Reference Error Response for a list of possible errors and their descriptions.
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be crypto_quotes |
id | string |
The unique identifier of the crypto asset. |
attributes | object | The crypto asset attributes. |
Attribute | Type | Description |
---|---|---|
from_currency | string | The crypto asset symbol to convert from. |
to_currency | string |
The fiat currency symbol to convert to. Example: USD, GBP, CAD, etc. |
rate | float |
The exchange rate of the crypto asset to the fiat currency. |
expires_at | integer |
The expiration time of the quote in Unix timestamp format. |
The transaction resource allows you to create, retrieve, and list transactions. Transactions are the core of the Raise API and are used to create gift card orders.
EXAMPLE POST TRANSACTION REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/transactions' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "transactions",
"attributes": {
"type": "SYNC",
"cards": [{
"brand_id": "dd231d64-4b34-48e0-b6a7-ca1faab219a1",
"value": 2500,
"quantity": 1
}],
"customer": {
"id": "c7770f32-0034-4562-b504-a1b46d21072c"
},
"client_order_id": "order-1234"
}
}
}'
EXAMPLE POST TRANSACTION RESPONSE
{
"data": {
"type": "transactions",
"attributes": {
// .. Refer to the Transaction Object
}
}
}
POST
/business/v2/transactions
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
Content-Type | true |
string |
The content type of the request. Default is application/json . |
X-Country | false |
string | ISO 3166-1 alpha-2 country code for the transaction. Default is US. |
X-Currency | false |
string | ISO 4217 currency code for the transaction. Default is USD. |
X-Callback | false |
string |
The URL to receive the transaction status. Required for ASYNC transactions. |
This transaction endpoint creates a new transaction. If no payment method is provided the transaction will deduct from the client's account balance. Crypto payment methods are the only supported payment method at this time.
We recommend using the ASYNC transaction type for transactions unless there's an immediate need to deliver the gift card details to the customer. By opting for the ASYNC transaction type, you enable us to optimize successful transaction responses. You'll then receive transaction details via the Transaction Webhook.
Idempotency ensures safe retrying of requests without unintended duplicate operations. In case of a connection error, repeating the request with the same client_order_id
poses no risk of creating a duplicate transaction.
Raise’s idempotency mechanism stores the status code and body of the initial request made for any given client_order_id
, regardless of success or failure. Subsequent requests with the same ID yield the same result, including 500 errors.
Results are saved only after endpoint execution begins. Failed validation or conflicts with concurrent requests prevent the saving of idempotent results, allowing for retrying.
Idempotency facilitates request retrying without creating new transactions. If a request fails, retry it with the same client_order_id
for an identical response as the original request.
Attribute | Required | Type | Description |
---|---|---|---|
type | true |
string |
The type of the transaction process. Can be either SYNC or ASYNC . |
cards | true |
array | The cards requested in the transaction. Currently only the first card request object in the array will be processed, future updates will unlock the ability to pass additional cards. |
customer | true |
object | The customer of the transaction. ONLY required for clients using the Tokens Resource, optional for all other implementations. |
client_order_id | true |
string |
The client's order ID. This is a unique ID that is used to reference the order within your system and is used as an idempotency key. |
payment_method | false |
object | The payment method for the transaction. |
metadata | false |
object | The metadata for the transaction. |
Attribute | Required | Type | Description |
---|---|---|---|
brand_id | true |
uuidv4 |
The unique identifier of the brand. |
value | true |
integer |
The value of the card. Reference Currency |
quantity | true |
integer |
The quantity of cards. |
Attribute | Required | Type | Description |
---|---|---|---|
id | true |
string |
The customer's external ID. This is the ID you use within your system to identify your user. ONLY applicable for clients using the Tokens Resource, this attribute is ignored for all other implementations. |
false |
string |
The customer's email address. | |
phone_number | false |
string |
The customer's phone number. |
first_name | false |
string |
The customer's first name. |
last_name | false |
string |
The customer's last name. |
Attribute | Required | Type | Description |
---|---|---|---|
crypto | true |
object | The crypto payment method for the transaction. Refer to Crypto Payment for more information. |
Attribute | Required | Type | Description |
---|---|---|---|
asset | true |
string | The crypto asset for the transaction. |
network | true |
string | The crypto network for the transaction. |
A successful response will have a data
object that contains the Transaction Object.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE POST CRYPTO PAYMENT METHOD TRANSACTION REQUEST
curl --location --request POST 'https://playground-api.raise.com/business/v2/transactions' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "transactions",
"attributes": {
"type": "ASYNC",
"cards": {
"brand_id": "dd231d64-4b34-48e0-b6a7-ca1faab219a1",
"value": 2500,
"quantity": 1
},
"customer": {
"id": "c7770f32-0034-4562-b504-a1b46d21072c"
},
"payment_method": {
"crypto": {
"asset": "ETH",
"network": "SEPOLIA_TESTNET"
}
},
"client_order_id": "order-1234",
}
}
}'
EXAMPLE POST CRYPTO PAYMENT METHOD TRANSACTION RESPONSE
{
"data": {
"type": "transactions",
"id": "TCDQJB6ZDTRU94",
"attributes": {
"state": "PENDING",
"payment_method": {
"crypto": {
"payment_address": "0x7bbf5d0e55e32430fd79f71a295024feead93525",
"payment_total": "0.00867255000000000100",
"payment_expires_at": 1708702608,
"asset": "ETH",
"network": "SEPOLIA_TESTNET"
}
}
}
}
}
All transactions are processed asynchronously when using crypto payment methods.
Please talk to your Raise account manager to enable crypto payments for your account. Refer to Transaction Webook for more information on how to handle async transactions.
EXAMPLE PATCH TRANSACTION REQUEST
curl --location --request PATCH 'https://playground-api.raise.com/business/v2/transactions/TCYYLJDBCXTE6C' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'X-Country: US' \
--header 'X-Currency: USD' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"id": "TCYYLJDBCXTE6C",
"type": "transactions",
"attributes": {
"cards": [{
"brand_id": "dd231d64-4b34-48e0-b6a7-ca1faab219a1",
"value": 2300,
"quantity": 1
}]
}
}
}'
EXAMPLE PATCH TRANSACTION RESPONSE
{
"data": {
"type": "transactions",
"id": "TCYYLJDBCXTE6C",
"attributes": {
// .. Refer to the Transaction Object, only the Cards object is necssary to be passed
}
}
}
PATCH
/business/v2/transactions/:id
The PATCH transaction endpoint allows you to update a crypto payment transaction. The only attribute that can be updated is the cards object. The transaction must be in a PENDING state to be updated.
The response will have a data
object that contains the Transaction Object.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE GET TRANSACTION REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/transactions/TCYYLJDBCXTE6C' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
EXAMPLE GET TRANSACTION RESPONSE
{
"data": {
"type": "transactions",
"id": "TCYYLJDBCXTE6C",
"attributes": {
// .. Refer to the Transaction Object
}
}
}
GET /business/v2/transactions/:id
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This transaction endpoint retrieves a transaction by it's unique identifier. If the transaction is in a failed state, the related error will be returned.
The response will have a data
object that contains the Transaction Object.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE GET TRANSACTIONS REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/transactions' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
EXAMPLE GET TRANSACTIONS RESPONSE
{
"data": [
{
"type": "transactions",
"id": "TCYYLJDBCXTE6C",
"attributes": {
// .. Refer to the Transaction Object
}
}
],
"meta": {
"total_results": 1
}
}
GET /business/v2/transactions
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This transaction endpoint retrieves a list of transactions. The transactions are paginated and can be sorted and searched.
This endpoint supports pagination, sorting, and searching operations. All search and pagination parameters are optional and will utilize the default values if not provided. Clients using the Auth Resource will only able to query by the authenticated customer's transactions.
Attribute | Required | Value | Description |
---|---|---|---|
ids | false |
array of strings |
Queries by multiple transaction ids. |
customer[id] | false |
string |
Queries by the provided customer id. ONLY applicable for clients using the Tokens Resource, this attribute is ignored for all other implementations. |
client_order_id | false |
string |
Queries by the provided client order id. |
state | false |
string | Queries by the provided state. |
Attribute | Value | Description |
---|---|---|
page[size] | integer |
Returns the specified number of results per page. The maximum results allowed per page are 500. Default is 10. |
page[number] | integer |
The first page is 0. If 5 is specified the 6th page will be returned. Default is 0. |
Attribute | Value | Description |
---|---|---|
sort_by | string |
Sorts by created_at |
sort[order] | string |
Sort ASC or `DESC. |
The response will have a data
array that contains the Transaction Objects and a meta
object that contains total_results
which is the total number of resources. This can be utilized to determine the number of pages available based on the page[size]
parameter.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE TRANSACTION OBJECT
{
"type": "transactions",
"id": "TCYYLJDBCXTE6C",
"attributes": {
"state": "COMPLETED",
"total": 2500,
"total_commission": {
"amount": 100,
"rate": 400,
"currency": "USD"
},
"country": "US",
"currency": "USD",
"customer": {
"id": "c7770f32-0034-4562-b504-a1b46d21072c"
},
"cards": [
{
"id": "a27c1e40-8c1f-48b7-b366-5c006abea9cd",
"brand_id": "dd231d64-4b34-48e0-b6a7-ca1faab219a1",
"brand_name": "Lowe's",
"balance": 2500,
"currency": "USD",
"number": {
"label": "Card Number",
"value": "5281 5281 5281 5281",
"raw": "5281528152815281"
},
"csc": {
"label": "PIN",
"value": "1234",
"raw": "1234"
},
"url": {
"raw": "https://www.vcdelivery.com/vcert/b9ec093b-77cf-4c1e-bdf1-30857a8ed943"
},
"barcode": {
"kind": "qr_code",
"value": "5281528152815281"
},
"expires_at": "",
"balance_checks_available": 3,
"balance_check_supported": true,
"commission": {
"amount": 100,
"rate": 400,
"currency": "USD"
}
}
],
"client_order_id": "order-1234"
}
}
EXAMPLE CYPTO PAYMENT TRANSACTION OBJECT
{
"type": "transactions",
"id": "TCYYLJDBCXTE6C",
"attributes": {
"state": "COMPLETED",
"total": 5000,
"total_commission": {
"amount": 200,
"rate": 400,
"currency": "USD",
"crypto": {
"asset": "DOT",
"amount": 0.2949,
"conversion_rate": 0.1475
}
},
"country": "US",
"currency": "USD",
"customer": {
"id": "c7770f32-0034-4562-b504-a1b46d21072c"
},
"payment_method": {
"crypto": {
"payment_address": "0x7bbf5d0e55e32430fd79f71a295024feead93525",
"network_fee": 0.0005,
"payment_total": 7.367,
"asset": "DOT",
"network": "POLKADOT"
}
},
"cards": [
{
// ... the rest of the card details
"commission": {
"amount": 100,
"rate": 400,
"currency": "USD",
"crypto": {
"asset": "DOT",
"amount": 0.1475,
"conversion_rate": 0.1475
}
}
},
{
// ... the rest of the card details
"commission": {
"amount": 100,
"rate": 400,
"currency": "USD",
"crypto": {
"asset": "DOT",
"amount": 0.1475,
"conversion_rate": 0.1475
}
}
}
],
"client_order_id": "order-1235"
}
}
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be transactions |
id | string |
The unique identifier of the transaction. |
attributes | object | The transaction attributes. |
Attribute | Type | Description |
---|---|---|
state | string | The state of the transaction. |
total | integer |
The total value of the transaction and is associated with the currency specified on the transaction. Reference Currency |
total_commission | object | The total commission of the transaction. |
currency | string | ISO 4217 currency code for the transaction. |
country | string | ISO 3166-1 alpha-2 country code. |
customer | object | The customer of the transaction. |
payment_method | object | The payment method for the transaction. |
cards | array | The cards involved in the transaction. |
errors | array | The errors related to the transaction. If applicable. |
metadata | object | The metadata related to the transaction. |
Value | Description |
---|---|
PENDING |
The transaction is pending. The should only be received for ASYNC transactions or transactions awaiting a crypto payment. |
COMPLETED |
The transaction is completed. |
FAILED |
The transaction failed. There will be errors populated in the errors array if the transaction is in a failed state. |
CANCELED |
The transaction was canceled. This should only be received for ASYNC transactions and would typically be used when no crypto payment was received and it expired. |
Attribute | Type | Description |
---|---|---|
id | string |
The customer's external ID. This is the ID you use within your system to identify your user. ONLY applicable for clients using the Tokens Resource, this attribute is ignored for all other implementations. |
string |
The customer's email address. | |
phone_number | string |
The customer's phone number. |
first_name | string |
The customer's first name. |
last_name | string |
The customer's last name. |
Attribute | Type | Description |
---|---|---|
crypto | object | The crypto payment method for the transaction. |
Attribute | Type | Description |
---|---|---|
asset | string | The crypto asset for the transaction. Example: DOT, BTC, ETH |
network | string | The crypto network for the transaction. Example: POLKADOT, BITCOIN, ETHEREUM, ARBITRUM |
network_fee | float |
The network fee for the transaction, this will be populated upon the completion of a payment. |
payment_address | string |
The payment address for the transaction. |
payment_total | float |
The total amount to be paid for the transaction. In the specified crypto currency. |
payment_expires_at | integer |
The timestamp when the payment expires. |
transaction_hash | string |
The on-chain transaction hash of the payment, this will be populated upon completion of a payment. |
Attribute | Type | Description |
---|---|---|
amount | integer |
The commission amount. Reference Currency |
rate | integer |
The commission rate in basis point format. This is the percentage of the total amount. |
currency | string | ISO 4217 currency code. |
crypto | object | The crypto commission object. Only applicable when a crypto payment method is used. |
Attribute | Type | Description |
---|---|---|
asset | string | The crypto asset for the commission. Example: DOT, BTC, ETH |
amount | float |
The commission amount in crypto currency. |
conversion_rate | float |
The conversion rate from the currency to the crypto currency. |
Example of a single metadata object:
{
"metadata": {
"first_example_field": {
"kind": "STRING",
"value": "Customized string"
}
}
}
Example of multiple metadata objects:
{
"metadata": {
"first_example_field": {
"kind": "STRING",
"value": "Customized string"
},
"second_example_field": {
"kind": "DATE",
"value": "2020-05-22T12:33:00+0000"
}
// ... additional metadata fields (can be any number of fields).
}
}
All of the endpoints in the API accept an optional metadata
attribute in the request body. Metadata can be used to store additional information about the request.
metadata
is defined as a single JSON object or a list of JSON objects,
Each JSON object will be keyed by field_name
( replace field_name
with your desired custom name)
The JSON object will also have the following attributes.
kind
- identifies the data type of the field value. (See the Supported Field Types).value
- the value assigned to the field. (See the Supported Field Types).The following table lists the available metadata field types:
Data Type | Description |
---|---|
STRING | Any string value, not to exceed 256 characters. |
DATE | A date value formatted according to the RFC3339 specification. |
Metadata field names can be any string value with the following restrictions:
EXAMPLE GET CARDS REQUEST
curl --location --request GET 'https://playground-api.raise.com/business/v2/cards?customer[id]=abc-123' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
EXAMPLE GET CARDS RESPONSE
{
"data": [
{
"type": "cards",
"id": "a27c1e40-8c1f-48b7-b366-5c006abea9cd",
"attributes": {
// .. Refer to the Card Object
},
"relationships": {
"brands": {
"data": {
"type": "brands",
"id": "id-of-the-brand-associated-with-the-card"
}
}
}
}
],
"included": [
{
"type": "brands",
"id": "id-of-the-brand-associated-with-the-card",
"attributes": {
// .. Refer to the Brand Object
}
}
],
"meta": {
"total_results": 1
}
}
GET /business/v2/cards
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
This card endpoint retrieves a list of cards. The cards are paginated and can be sorted and searched.
This endpoint supports pagination, sorting, and searching operations. All search and pagination parameters are optional and will utilize the default values if not provided. Clients using the Auth Resource will only able to query by the authenticated customer's cards.
Attribute | Required | Value | Description |
---|---|---|---|
customer[id] | true |
string |
Queries by the provided customer id. ONLY required for clients using the Tokens Resource, this attribute is ignored for all other implementations. |
id | false |
string |
Queries by single card id. |
transaction_id | false |
string |
Queries all cards associated to a specific transaction. |
state | false |
string | Queries by the provided state. |
Attribute | Value | Description |
---|---|---|
page[size] | integer |
Returns the specified number of results per page. The maximum results allowed per page are 500. Default is 10. |
page[number] | integer |
The first page is 0. If 5 is specified the 6th page will be returned. Default is 0. |
Attribute | Value | Description |
---|---|---|
sort_by | string |
Sorts by created_at or updated_at . |
sort[order] | string |
Sort ASC or DESC . |
The response will have a data
array that contains the Card Objects and a meta
object that contains total_results
which is the total number of resources. This can be utilized to determine the number of pages available based on the page[size]
parameter.
The response may also include an included
deduped array that contains the Brand Objects associated with the cards. Which can be referenced from the relationships object on a card.
Reference Error Response for a list of possible errors and their descriptions.
EXAMPLE PATCH CARD REQUEST
curl --location --request PATCH 'https://playground-api.raise.com/business/v2/cards/a27c1e40-8c1f-48b7-b366-5c006abea9cd' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"type": "cards",
"id": "a27c1e40-8c1f-48b7-b366-5c006abea9cd",
"attributes": {
"action": "BALANCE_CHECK"
}
}
}'
EXAMPLE PATCH CARD RESPONSE
{
"data": {
"type": "cards",
"id": "a27c1e40-8c1f-48b7-b366-5c006abea9cd",
"attributes": {
// .. Refer to the Card Object
}
}
}
PATCH /business/v2/cards/:id
Header | Required | Value | Description |
---|---|---|---|
Authorization | true |
string |
Bearer token that was received from the Tokens Resource. |
Content-Type | true |
string |
Must be application/json . |
This card endpoint updates a card. The card can be updated with a balance check action.
Attribute | Required | Value | Description |
---|---|---|---|
action | true |
string | The action to perform on the card. |
balance | false |
integer |
The balance to update the card with. Only applicable with UPDATE_BALANCE action |
Value | Description |
---|---|
BALANCE_CHECK | Performs a balance check on the card. |
MARK_AS_REDEEMED | Updates the card state to REDEEMED and zeros out the recorded balance. |
UPDATE_BALANCE | Updates the card balance to the value provided. |
EXAMPLE CARD OBJECT
{
"type": "cards",
"id": "a27c1e40-8c1f-48b7-b366-5c006abea9cd",
"attributes": {
"brand_id": "dd231d64-4b34-48e0-b6a7-ca1faab219a1",
"brand_name": "Lowe's",
"balance": 2500,
"currency": "USD",
"number": {
"label": "Card Number",
"value": "5281 5281 5281 5281",
"raw": "5281528152815281"
},
"csc": {
"label": "PIN",
"value": "1234",
"raw": "1234"
},
"url": {
"label": "View Gift Card Details",
"raw": "https://www.vcdelivery.com/vcert/b9ec093b-77cf-4c1e-bdf1-30857a8ed943"
},
"barcode": {
"kind": "qr_code",
"value": "5281528152815281"
},
"expires_at": "",
"balance_checks_available": 3,
"balance_check_supported": true,
"commission": {
"amount": 100,
"rate": 400,
"currency": "USD"
},
"state": "ACTIVE",
"apple_pass_link": "https://commerce-api.raisestaging.com/business/v2/cards/apple/fe1afa62-3630-4136-b6d8-87bab99568c9",
"google_pass_link": "https://commerce-api.raisestaging.com/business/v2/cards/google/fe1afa62-3630-4136-b6d8-87bab99568c9"
}
}
Attribute | Type | Description |
---|---|---|
type | string |
Value will always be cards |
id | string |
The unique identifier of the card. |
attributes | object | The card attributes. |
Attribute | Type | Description |
---|---|---|
brand_id | string |
The unique identifier of the brand. |
brand_name | string |
The name of the brand. |
initial_balance | integer |
The initial balance of the card. Reference Currency |
balance | integer |
The current balance of the card. Reference Currency |
currency | string | ISO 4217 currency code of the card. |
number | object | An object containing card number data |
csc | object | An object containing card CSC data |
url | object | An object containing the card URL, the url opens up a web view version of the card. |
barcode | object | An object containing the card barcode, this field will only be populated for brands that are redeemable in-store. |
expires_at | string |
The expiration date of the card if applicable. Format: "2006-12-30" |
balance_checks_available | integer |
The number of automatic balance checks available for the card. |
balance_check_supported | boolean |
Indicates if the brand supports automatic balance checks for the card. |
commission | object | The commission for the card. |
state | string | The state of the card. |
created_at | integer |
The unix timestamp of when the card was created. |
updated_at | integer |
The unix timestamp of when the card was last updated. |
apple_pass_link | string |
This is the link to embed into a "Add To Apple Wallet" button for a given card. This field could be empty, if the brand does not support this feature. The given link is valid for 90 days. Note that a fresh link is provided in each request. Please, Refer to Apple's Wallet Guidelines for details on how they want you to display their platform on your site: https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/ |
google_pass_link | string |
This is the link to embed into a "Add To Google Wallet" button for a given card. This field could be empty, if the brand does not support this feature. The given link is valid for 90 days. Note that a fresh link is provided in each request. Please, Refer to Google's Wallet Guidelines for details on how they want you to display their platform on your site: https://developers.google.com/wallet/generic/resources/brand-guidelines |
Attribute | Type | Description |
---|---|---|
label | string |
The label of the card field. |
value | string |
A formatted user friendly value of the card field. |
raw | string |
The raw value of the card field. |
Attribute | Type | Description |
---|---|---|
type | string | The type of barcode. |
value | string |
The barcode value. |
Value | Description |
---|---|
CODE128 | Code 128 barcode type. |
DATA_MATRIX | Data Matrix barcode type. |
QR_CODE | QR Code barcode type. |
PDF417 | PDF417 barcode type. |
PDF417_COMPACT | PDF417 Compact barcode type. |
Value | Description |
---|---|
ACTIVE | The card is active. |
REDEEMED | The card is redeemed. |
EXPIRED | The card is expired. |
The Fraud SDK enables the collection of device information and behavior biometrics during user sessions on your website.
The data collected is sent to Raise's systems for all device and user interactions on the website where the script is installed.
The information about an individual’s behavior and devices used to access the services helps identify potentially fraudulent transactions.
You can install the script in two steps.
Script for the latest version:
<script>
const clientId = "YOUR_CLIENT_ID";
const sessionKey = "USER_SESSION_KEY";
const isSandbox = false;
var loader = document.createElement("script");
loader.async = true;
loader.src = `https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-latest.min.js`;
loader.onload = function () {
window._Raise.initialize({ clientId, sessionKey, isSandbox });
};
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(loader, s);
</script>
To install the script on your website, you need three values.
clientId
: Contact your account manager to get that.
sessionKey
: Your sessionKey
will be a UUID for the user session. This will be a server-generated short-lived key. You have to generate it yourself. You can use the uuid package to generate the UUID.
isSandbox
: If you want to use the sandbox version of the script, set the isSandbox
variable to true.
Next, copy the following script into your website's header
section.
By default, The script loads the latest version.
To use a specific version, you need to update the src
of the script.
For example, If you want to use version 1.1.1
of the script:
Replace the following line in the script,
loader.src = https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-latest.min.js
with,
loader.src = https://www.raise.com/static/risk/assets/sdk/raise-risk-sdk-1.1.1.min.js
Script for the pixel integration
<noscript>
<img
src="https://www.raise.com/static/risk/assets/pixel/a.png?clientId=<REPLACE-ME>&sessionKey=<REPLACE-ME>&flow=<document.location>&ns=1"
style="display: none"
/>
</noscript>
Adding a fallback pixel is necessary to ensure we capture all data since some users might attempt to disable Javascript on their browsers. This script is specifically designed to capture data for users who have disabled Javascript.
Copy the following code into the body
section of your website.
After installing the script, you need to make some changes to the Create Card request.
Request body for card creation:
{
"data": {
"type": "cards",
"attributes": {
"customer": {
"email": "Email address of the customer",
"email_verified": true,
"phone_number": "Phone number of the customer",
"phone_number_verified": true
}
// ... other fields
}
}
}
You must include some details about the customer inside the card creation request. An example request can look like the following.
Pass an additional header with your requests to complete the integration.
Header | Description |
---|---|
X-Session |
Same as sessionKey in Step - 1 |
After you complete the integration, you can start using the Create Card endpoint. You need to wait some time for the data to be available in the Raise system.
X-Session: sessionKey
.A POST request will be made to the webhook URL provided in the header X-Callback
of the original request.
As an authentication mechanism, the Authorization
header will be included in the POST request. The value of the header will be the same as the value passed in the original Tokens Resource. This will allow you to verify the authenticity of the request by comparing the client ID and secret.
Header | Value |
---|---|
Authorization | Basic Auth with your Client ID and Secret. |
Content-Type | Content type as application/json |
If the webhook fails to deliver the payload, it will be retried up to 10 times with an exponential backoff strategy. The exponential backoff duration is calculated using the formula backoff = 2^attempts * 5 minutes, where attempts is the number of delivery attempts made so far. The first retry will be after 5 minutes, the second after 10 minutes, the third after 20 minutes, and so on, up to a maximum of 10 attempts.
After 10 attempts, the webhook will be marked as failed and will not be retried again. Clients can manually retrieve the resource via a GET request to the Raise API as needed.
The webhook will be triggered when a transaction transitions from PENDING
to its final state. The webhook request will contain the identical parameters found in the Transaction Object.
Any request that did not succeed will return a 4xx or 5xx error. The 4xx range means a problem with the request, like a missing parameter. The 5xx range means that something went wrong on our end.
The Raise API uses a consistent error response format on all API endpoints.
Refer to the Error Response section for more information about the error response body.
The API provides the following HTTP response status codes:
Error Code | Description |
---|---|
200 | OK -- The request was successful. |
201 | Created -- The request was successful and a new resource was created. |
400 | Bad Request -- The request is invalid or malformed. |
401 | Unauthorized -- The request lacks valid authentication credentials. |
403 | Forbidden -- The server understood the request but refuses to authorize it. |
412 | Precondition Failed -- The server does not meet one of the preconditions that the requester put on the request. |
422 | Unprocessable Entry -- The request was well-formed but contains semantic errors. |
406 | Not Acceptable -- The server cannot generate a response that meets the requested format. |
500 | Internal Server Error -- The server encountered an unexpected condition and cannot fulfill the request. |
503 | Service Unavailable -- The server is currently unable to handle the request due to temporary overloading or maintenance of the server. |
The status codes listed above are defined by RFC 9110
The Raise API returns an error response, a combination of an HTTP response status code combined with a JSON response body containing a Raise Error Code and Error Description.
Error Code | Description |
---|---|
ErrCodeInvalidDeviceUUID | The Client ID is invalid or missing |
ErrCodeInternal | Internal error occurred |
ErrCodeInvalidTransaction | Transaction object is invalid |
ErrCodeMissingAuthorization | Signature or other required headers are missing |
ErrCodeUnauthorized | Unauthorized access |
ErrCodeUnauthenticated | Failed to authenticate |
ErrCodeInvalidSignature | Invalid signature |
ErrCodeBadRequest | Request is invalid |
ErrCodeFailedRisk | Failed risk verification |
ErrCodeBrandDisabled | Brand is currently unavailable for purchase |
ErrCodeDailyPurchaseLimit | Daily purchase limit for a user has been reached |
ErrCodeNotFound | Requested object has not been found |
ErrCodeTooManyRequests | Too many requests are being made, rate limit has been reached |
ErrCodePaginationLimit | Invalid pagination limit |
ErrCodeAccountDeactivated | Account has been deactivated |
ErrCodeInsufficientFunds | Insufficient funds in the account balance |
EXAMPLE ERROR RESPONSE
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeInvalidDeviceUUID",
"title": "Missing device uuid"
}
]
}
EXAMPLE MULTIPLE ERROR RESPONSE
{
"errors": [
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66aefe",
"code": "ErrCodeBadRequest",
"title": "Request is bad",
"detail": "Invalid brand uuid in request"
},
{
"id": "ef1a745c-fe31-4df7-a9dd-5893aa66a123",
"code": "ErrCodeInternal",
"title": "Something went wrong"
}
]
}
The errors
field is an array of objects with the following fields:
Field | Type | Description |
---|---|---|
id | string | A unique identifier for this particular occurrence of the error. |
code | string | An application-specific error code expressed as a string value. |
title | string | A short, human-readable summary of the error that typically will not change from occurrence to occurrence of the error, except for purposes of localization |
detail | string | A short, human-readable detail of the error this will change depending on the specific error use case and can be empty |
When encountering a request timeout or receiving a 5XX server error response, follow these steps:
client_order_id
to your designated support contact and your Account Manager.Version | Date Released | What changed |
---|---|---|
v2 | May 1st, 2024 | Creation of new V2 API |
v2 | July 7th, 2024 | Added new endpoints for auth methods and tokens. |
v2 | August 20th, 2024 | Added new PATCH transaction endpoint. |
v2 | September 25th, 2024 | Added Crypto Transaction Hash to Transaction Response. |
v2 | October 16th, 2024 | Added new Polkadot Asset Hub Crypto Assets. |
v2 | January 2nd, 2025 | Added balance check supported attribute to brands and timestamps to cards. |
v2 | January 15th, 2025 | Added new endpoint for crypto quotes. |
v2 | February 17th, 2025 | Add new properties to card object: apple_pass_link and google_pass_link |