Skip to main content

Accrue Merchant API (1.0.0)

Download OpenAPI specification:Download

Introduction

Sandbox

Welcome to the Accrue API! Our detailed documentation will guide you through essential topics, including authentication, request formatting, and the handling of financial transactions, with a current focus on payments.

Accrue treats every client as a unique entity. This approach allows for the management of critical components such as API tokens and user access, directly through our API, ensuring that each organization can tailor its use of our services to fit its specific needs.

The introductory section aims to familiarize you with the core concepts required to effectively utilize the services offered by our platform.

Environments

Accrue offers its API across two distinct environments:

Environment Description API URL
Sandbox Environment Designed for testing and development. https://merchant-api-sandbox.accruesavings.com
Live Environment For real-time production operations. https://merchant-api.accruesavings.com/

Authentication

Accrue's API leverages the Bearer Token for request authentication. Every API call requires the inclusion of a bearer token, which is a Client Secret associated with the Client for which you are making requests.

:::caution

Any issues with the token, such as being invalid, missing, or expired, will lead to HTTP 401 Unauthorized responses.

:::

GET /payments HTTP/1.1
Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Retrying API Requests

When API requests fail due to network issues, rate limits, timeouts, or service incidents, it's a best practice to implement a retry mechanism. Guidelines for this mechanism include:

  • Retryable HTTP Status Codes:
    • 5xx: Server errors.
    • 429: Rate Limits.
    • 408: Timeouts.
  • Retry Strategy:
    • Use an exponential backoff and/or jitter for retries.
    • Implement idempotency keys where necessary.

Rate Limits

The rate limit, based on your IP address, is set at 10,000 requests per minute, applicable to both the sandbox and live environments separately. Exceeding this limit triggers HTTP 429 status codes and relevant messages in responses.

Timeouts

To ensure prompt failure and allow for retries, our APIs are designed with timeouts. It's recommended to set similar request timeouts on the client side. Timeouts are categorized as follows:

  • Short Timeout: A default timeout of 10 seconds for most APIs.
  • Long Timeout: Some APIs require up to 90 seconds for longer processes.

Refer to the specific API documentation to ascertain the timeout applicable to your request.

API Design

OpenAPI Specification

OpenAPI, a widely-recognized standard for defining RESTful APIs, enhances API usability and integration. It facilitates client library (SDK) generation, testing, and integration with various development tools. The Accrue API conforms to OpenAPI 3.1, with its specification accessible here.

The Accrue OpenAPI specification can be used in conjunction with tools like Swagger or OpenAPI generators to create Accrue API client libraries in your preferred programming language.

Please note, while SDKs can be auto-generated, their full compatibility with our API and coverage of all endpoints isn't guaranteed. Contributions, including feedback, bug reports, and pull requests from the Accrue SDKs community, are welcome to help improve and address any issues.

Pagination

List operations, like 'List Users', return a collection of resources. To navigate through a long list, use:

  • page[limit]: Limits the number of resources returned (1-200, default is 50).
  • page[offset]: Specifies the number of resources to skip (default is 0).

Idempotency

Accrue supports idempotency for certain API operations, allowing multiple requests while ensuring the operation is performed only once. Use any string up to 255 characters as an idempotency key (UUID version 4 is recommended).

Idempotency is vital for situations like network errors during sensitive operations (e.g., payment creation). It ensures that an operation, like a payment, is not duplicated despite multiple attempts.

Key Points:

  • Idempotency keys remain effective for 48 hours.
  • They are not shared across different API operations, but the same key can technically be used for different operations (not recommended).

About JSON API

Accrue's API is REST-based and adheres to the JSON:API specification.

JSON:API outlines how clients should request resources and how servers should respond. Accrue's resources encompass applications, customers, cards, accounts, transactions, among others.

Designed for efficiency, JSON:API reduces the number of requests and data transferred between clients and servers, achieving this without sacrificing readability, flexibility, or discoverability.

JSON:API mandates the use of the JSON:API media type (application/vnd.api+json) for data exchange.

Request and Response Structure

JSON:API structures all requests and responses as JSON documents. These documents must contain one of the following top-level members:

  • Data: Represents the document's "primary data". For example, in creating an application resource, the primary data includes personal information.
  • Errors: An array of error objects.

Primary data must be either:

  • A single resource object for requests targeting individual resources.
  • An array of resource objects for requests targeting resource collections.
    {
        "data": {
            "type": "User",
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "attributes": {
                // ... this users's attributes
                },
            "relationships": {
                // ... this users's relationships
            }
        }
    }
    {
        "data": [
            {
                "type": "User",
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "attributes": {
                    // ... this users's attributes
                    },
                "relationships": {
                    // ... this users's relationships
                }
            },
            {
                "type": "User",
                "id": "123e4567-e89b-12d3-a456-426614174001",
                "attributes": {
                    // ... this users's attributes
                    },
                "relationships": {
                    // ... this users's relationships
                }
            }
        ]
    }

Resource Object

In JSON:API documents, resource objects are used to depict entities within the business domain, such as applications, customers, cards, accounts, transactions, etc., within Accrue's API.

Every resource object must include these two members:

  • id: The unique identifier of the resource.
  • type: The type of resource.

Note: The id member is not required for resource objects created on the client side that represent new resources to be created on the server.

Optional members of a resource object include:

  • attributes: This object represents the resource's data, like name, address, email, etc.
  • relationships: Describes connections between the current resource and other resources.
{
   "type": "User",
   "id": "123e4567-e89b-12d3-a456-426614174000",
   "attributes": {
      "disabled": false,
      "attachedProfile": {
          "referenceId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "email": "user@email.com",
          "phoneNumber": "+12125559999"
        }
      "updatedAt":"2020-01-12T19:41:01.323Z",
      "createdAt":"2020-01-11T19:40:01.323Z"
   },
   "relationships": {
      //relationships listed here
   }
}

Relationships

The relationships object in JSON:API defines the connections between the current resource and other related resources. Each entry in this object signifies a unique reference.

For instance, the relationship between a User and UserProfile is depicted here.

Relationship Object

A "relationship object" is required to include a data member, which can be one of the following:

  • Null: Indicating an empty 'to-one' relationship.
  • Empty Array ([]): For empty 'to-many' relationships.
  • Single Resource Identifier: With 'type' and 'id', for non-empty 'to-one' relationships.
  • Array of Resource Identifiers: Each with 'type' and 'id', for non-empty 'to-many' relationships.
{
   "type": "Wallet",
   "id": "123e4567-e89b-12d3-a456-426614174000",
   "attributes": {
       //attributes here
    }
   },
   "relationships":{
      "User":{
         "data":{
            "type": "User",
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
         }
      }
   }
}

Accrue's API supports the include query parameter in GET operations on specific resources like Cards. This parameter allows fetching multiple related resources in a single response. You can specify one or several relationships, separated by commas, in the query (refer to the example below). The response will include an included key containing these related resources.

Utilizing this feature simplifies the API interaction by consolidating what would typically be multiple calls into a single request. This not only streamlines your code but also addresses common data integrity concerns associated with

curl -X GET 'https://merchant-api.accruesavings.com/wallets/123e4567-e89b-12d3-a456-426614174000?include=User' \-H "Authorization: Bearer ${TOKEN}"
{
    "type": "Wallet",
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "attributes": {
            //attributes here
        },
        "relationships":{
            "User":{
                "data":{
                    "type": "User",
                    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                }
            }
        }
    },
    "included": [
        {
            "type": "User",
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "attributes":{
                //attributes here
        },
    ]
}

Errors

Accrue's API communicates the status of requests using standard HTTP Status Codes. Errors may occur at any point during processing, either as single or multiple instances. For example, schema validation issues often lead to multiple errors, while server processing problems typically result in a single error. Regardless, the response includes all identified errors.

An "error object" is required to have an HTTP status code. It may also include:

  • code: (Optional) A unique, underscored Accrue-specific code detailing the error. A comprehensive list of error codes is available in the Accrue Errors documentation.
  • detail: (Optional) A human-readable explanation providing more insights about the error.
  • Meta: (Optional) This object contains name/value pairs relevant to the error

Users

Users represent the end users and are the parent container of Wallets. A user is automatically created when the end-user signs into the Accrue product through various different methods using their phone number.

Get Wallet Balance for User

path Parameters
userReference
string
Example: 123e4567-e89b-12d3-a456-426614174000

User ID or Attached User Profile Reference ID by which to get the wallet balance

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: user

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/users/:userReference/wallet-balance?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Wallet",
    • "attributes": {
      • "status": "Active",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z",
      • "balance": {
        • "available": {
          • "deposit": 1000,
          • "reward": {
            • "accrue": 20,
            • "merchant": 180,
            • "total": 200
            },
          • "total": 1200
          },
        • "pending": {
          • "deposit": 0,
          • "reward": {
            • "accrue": 0,
            • "merchant": 0,
            • "total": 0
            },
          • "total": 0
          },
        • "reserved": {
          • "total": 0
          },
        • "total": {
          • "deposit": 1500,
          • "reward": {
            • "accrue": 30,
            • "merchant": 270,
            • "total": 300
            },
          • "total": 1800
          },
        • "held": {
          • "total": 600
          }
        }
      },
    • "relationships": {},
    • "included": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "type": "User",
        • "attributes": {
          • "disabled": true,
          • "publicId": "string",
          • "profile": {
            • "firstName": "string",
            • "lastName": "string",
            • "email": "user@example.com",
            • "phoneNumber": "string"
            },
          • "attachedProfile": {
            • "referenceId": "Any string identifier provided by you.",
            • "email": "User email address kept in your system.",
            • "phoneNumber": "User phone number kept in your system."
            },
          • "updatedAt": "2019-08-24T14:15:22Z",
          • "createdAt": "2019-08-24T14:15:22Z"
          },
        }
      ]
    }
}

List Users

query Parameters
filter[phoneNumber]
string

Filter the list of objects by the value of the phoneNumber field.

filter[email]
string

Filter the list of objects by the value of the email field.

filter[referenceId]
string

Filter the list of objects by the value of the referenceId field.

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/users/users?filter%5BphoneNumber%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5BreferenceId%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "User",
      • "attributes": {
        • "disabled": true,
        • "publicId": "string",
        • "profile": {
          • "firstName": "string",
          • "lastName": "string",
          • "email": "user@example.com",
          • "phoneNumber": "string"
          },
        • "attachedProfile": {
          • "referenceId": "Any string identifier provided by you.",
          • "email": "User email address kept in your system.",
          • "phoneNumber": "User phone number kept in your system."
          },
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Update Users Attached Profile

path Parameters
userReference
string
Example: 123e4567-e89b-12d3-a456-426614174000

User ID or Attached User Profile Reference ID

Request Body schema: application/vnd.api+json
required
type
required
string
Value: "AttachedProfile"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "type": "AttachedProfile",
  • "attributes": {
    • "referenceId": "Any string identifier provided by you.",
    • "email": "User email address kept in your system.",
    • "phoneNumber": "User phone number kept in your system."
    }
}

Wallets

Wallets are where users save money and collect rewards for future payments to merchants. Each wallet is linked to a specific merchant and tracks the balance of deposits and rewards. Users can contribute to their wallet's balance as part of their payment planning, while also accruing rewards.

Get Wallet Balance

path Parameters
walletId
string
Example: 123e4567-e89b-12d3-a456-426614174000

ID of the wallet for which the balance is being fetched.

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: user

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Wallet",
    • "attributes": {
      • "status": "Active",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z",
      • "balance": {
        • "available": {
          • "deposit": 1000,
          • "reward": {
            • "accrue": 20,
            • "merchant": 180,
            • "total": 200
            },
          • "total": 1200
          },
        • "pending": {
          • "deposit": 0,
          • "reward": {
            • "accrue": 0,
            • "merchant": 0,
            • "total": 0
            },
          • "total": 0
          },
        • "reserved": {
          • "total": 600
          },
        • "total": {
          • "deposit": 1500,
          • "reward": {
            • "accrue": 30,
            • "merchant": 270,
            • "total": 300
            },
          • "total": 1800
          }
        }
      },
    • "relationships": {},
    • "included": [
      • {
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "type": "User",
        • "attributes": {
          • "disabled": true,
          • "publicId": "string",
          • "profile": {
            • "firstName": "string",
            • "lastName": "string",
            • "email": "user@example.com",
            • "phoneNumber": "string"
            },
          • "attachedProfile": {
            • "referenceId": "Any string identifier provided by you.",
            • "email": "User email address kept in your system.",
            • "phoneNumber": "User phone number kept in your system."
            },
          • "updatedAt": "2019-08-24T14:15:22Z",
          • "createdAt": "2019-08-24T14:15:22Z"
          },
        }
      ]
    }
}

List Wallets

query Parameters
filter[phoneNumber]
string

Filter the list of objects by the value of the phoneNumber field.

filter[email]
string

Filter the list of objects by the value of the email field.

filter[referenceId]
string

Filter the list of objects by the value of the referenceId field.

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/wallets/?filter%5BphoneNumber%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5BreferenceId%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "Wallet",
      • "attributes": {
        • "status": "Active",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        },
      • "relationships": {
        • "user": {
          • "data": [
            • {
              • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              • "type": "User"
              }
            ]
          }
        }
      }
    ]
}

PaymentIntents

Payment Intents represent a commitment to pay a specified amount, allowing for a structured process to handle payments from initiation to completion. This resource serves as a provisional step in the payment process, where the amount, payment method, and other details are specified by the initiator (e.g., a user, support staff, or merchant). Payment Intents can go through several states, such as requiring action, being canceled, or being promoted to an actual payment upon successful authorization.

Get a Payment Intent

path Parameters
paymentIntentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment Intent ID

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: client,payments

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/payment-intents/123e4567-e89b-12d3-a456-426614174000?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "PaymentIntent",
    • "attributes": {
      • "billingAddress": {
        • "street": "string",
        • "street2": "string",
        • "city": "string",
        • "state": "string",
        • "postalCode": "string",
        • "country": "string"
        },
      • "email": "user@example.com",
      • "error": "LinkedAccountUnverified",
      • "expiresAt": null,
      • "fullName": "string",
      • "phoneNumber": "string",
      • "reference": "MERCHANT-GENERATED-TOKEN",
      • "status": "PromotedToPayment",
      • "userId": "string",
      • "walletId": "123e4567-e89b-12d3-a456-426614174000",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "payments": {
        • "data": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "type": "Payment"
            }
          ]
        }
      }
    },
  • "included": []
}

List Payment Intents

query Parameters
filter[initiator]
string

Filter the list of objects by the value of the initiator field.

filter[status]
string

Filter the list of objects by the value of the status field.

filter[paymentMethod]
string

Filter the list of objects by the value of the paymentMethod field.

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

sort
string
Default: "sort=-createdAt"

Sorts the list of objects by the given criteria. The sort parameter value is a comma separated list of sort criteria. Each sort criteria is a field name optionally followed by a minus sign (-) to indicate descending order. Ascending order is assumed if no minus sign is present. The sort criteria are applied in the order in which they appear in the sort parameter.

include
required
string

Comma-separated list of resources to include. Supported resources: client,payments

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/payment-intents?filter%5Binitiator%5D=SOME_STRING_VALUE&filter%5Bstatus%5D=SOME_STRING_VALUE&filter%5BpaymentMethod%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "RequiresAction",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        },
      • "relationships": {
        • "payments": {
          • "data": [
            • {
              • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              • "type": "Payment"
              }
            ]
          }
        }
      }
    ]
}

Cancel Payment Intent

path Parameters
paymentIntentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment Intent ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request POST \
  --url https://merchant-api.accruesavings.com/api/v1/payment-intents/123e4567-e89b-12d3-a456-426614174000/cancel \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "PaymentIntent",
    • "attributes": {
      • "billingAddress": {
        • "street": "string",
        • "street2": "string",
        • "city": "string",
        • "state": "string",
        • "postalCode": "string",
        • "country": "string"
        },
      • "email": "user@example.com",
      • "error": "LinkedAccountUnverified",
      • "expiresAt": null,
      • "fullName": "string",
      • "phoneNumber": "string",
      • "reference": "MERCHANT-GENERATED-TOKEN",
      • "status": "Canceled",
      • "userId": "string",
      • "walletId": "123e4567-e89b-12d3-a456-426614174000",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      }
    }
}

Authorize Payment

path Parameters
paymentIntentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment Intent ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
required
object (AuthorizePaymentIntent)

AuthorizePaymentIntent

type
required
string
Value: "AuthorizePaymentIntent"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "AuthorizePaymentIntent",
    • "attributes": {
      • "amount": 0
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "PaymentIntent",
    • "attributes": {
      • "billingAddress": {
        • "street": "string",
        • "street2": "string",
        • "city": "string",
        • "state": "string",
        • "postalCode": "string",
        • "country": "string"
        },
      • "email": "user@example.com",
      • "error": "LinkedAccountUnverified",
      • "expiresAt": null,
      • "fullName": "string",
      • "phoneNumber": "string",
      • "reference": "MERCHANT-GENERATED-TOKEN",
      • "status": "PromotedToPayment",
      • "userId": "string",
      • "walletId": "123e4567-e89b-12d3-a456-426614174000",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "payments": {
        • "data": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "type": "Payment"
            }
          ]
        }
      }
    },
  • "included": []
}

Payments

Payments are the realization of payment intents, representing the actual transfer or authorization of funds. This resource encapsulates the details of completed transactions, including the payment status, amount, and any adjustments or refunds that have occurred post-initial authorization. Payments can have various statuses reflecting their current state, from pending to refunded, providing a comprehensive view of the transaction lifecycle.

Get a Payment

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: paymentIntent,refunds

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/payments/123e4567-e89b-12d3-a456-426614174000?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Payment",
    • "attributes": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "status": "Canceled",
      • "amount": 9999,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      },
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Get Virtual Debit Card

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url https://secure-api.accruesavings.com/api/v1/payments/123e4567-e89b-12d3-a456-426614174000/card \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "VirtualDebitCard",
    • "attributes": {
      • "number": "card_12a3b45cdefghi",
      • "expirationMonth": "6",
      • "expirationYear": "2028",
      • "cvc": "123",
      • "billingAddress": {
        • "street": "123 Main St.",
        • "street2": "Apt. 1",
        • "city": "San Francisco",
        • "state": "CA",
        • "postalCode": "94107",
        • "country": "US"
        }
      },
    • "relationships": {
      • "payment": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "Payment"
          }
        },
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          }
        }
      }
    }
}

List Payments

query Parameters
filter[status]
string

Filter the list of objects by the value of the status field.

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

sort
string
Default: "sort=-createdAt"

Sorts the list of objects by the given criteria. The sort parameter value is a comma separated list of sort criteria. Each sort criteria is a field name optionally followed by a minus sign (-) to indicate descending order. Ascending order is assumed if no minus sign is present. The sort criteria are applied in the order in which they appear in the sort parameter.

include
required
string

Comma-separated list of resources to include. Supported resources: paymentIntent,refunds

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/payments?filter%5Bstatus%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{}

Capture Payment

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
required
object (CapturePayment)

CapturePayment

type
required
string
Value: "CapturePayment"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "CapturePayment",
    • "attributes": {
      • "amount": 0
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Payment",
    • "attributes": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "status": "Canceled",
      • "amount": 9999,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      },
    },
  • "links": {
    • "self": "/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/capture"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Increase Authorization Amount

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
required
object (IncreaseAuthorization)

IncreaseAuthorization

type
required
string
Value: "IncreaseAuthorization"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "IncreaseAuthorization",
    • "attributes": {
      • "increase": 0
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Payment",
    • "attributes": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "status": "Authorized",
      • "amount": 10500,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      }
    },
  • "links": {
    • "self": "/api/v1/payments/4cf95060-dd01-42ac-9020-8ca42004920d/increase-authorization"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Cancel Payment

The cancel endpoint can be called on a Payment that is in the Created or Waiting status, otherwise it will return an error. A Payment will be in the Waiting status if you the capture endpoint has been called but the capture is in the waiting period before it is actually committed. Cancelling is always the full amount so there’s no support for partial amounts with cancel. The status of the payment will transition to Canceled ONLY after successfully calling the cancel endpoint.

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: paymentIntent

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request POST \
  --url 'https://merchant-api.accruesavings.com/api/v1/payments/123e4567-e89b-12d3-a456-426614174000/cancel?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Payment",
    • "attributes": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "status": "Canceled",
      • "amount": 9999,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      },
    },
  • "links": {
    • "self": "/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Complete Payment

This endpoint is used to complete payments using Virtual Debit Cards. Once you have capture all the funds from the Virtual Debit Card, you can call this endpoint to complete the payment. That will mark the payment as complete and remaining funds will be released back to the user.

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

query Parameters
include
string

Comma-separated list of resources to include. Supported resources: paymentIntent

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request POST \
  --url 'https://merchant-api.accruesavings.com/api/v1/payments/123e4567-e89b-12d3-a456-426614174000/complete?include=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Payment",
    • "attributes": {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "status": "Complete",
      • "amount": 9999,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        }
      },
    },
  • "links": {
    • "self": "/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/complete"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Refund Payment

The refund endpoint can be called at any point after the capture endpoint has been called for that payment. It supports partial refunds regardless of whether the payment status is Processing or Waiting. Calling the refund endpoint will never change the status of the payment so the status of the payment cannot be used to determine if it has been refunded. When a Payment is refunded, an assocaited Refund object is created. The Refund object has an independent status representing the the refund. The refund endpoint returns the Refund object created and can be included in the get payment endpoint.

path Parameters
paymentId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Payment ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
required
object (RefundPayment)

RefundPayment

type
required
string
Value: "RefundPayment"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "RefundPayment",
    • "attributes": {
      • "amount": 0
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "123e4567-e89b-12d3-a456-426614174000",
    • "type": "Payment",
    • "relationships": {
      • "paymentIntent": {
        • "data": {
          • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          • "type": "PaymentIntent"
          },
        • "links": {
          • "self": "/api/v1/payment-intents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        },
      • "refunds": {
        • "data": [
          • {
            • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
            • "type": "Refund"
            }
          ]
        }
      },
    • "attributes": {
      • "id": "123e4567-e89b-12d3-a456-426614174000",
      • "status": "Sent",
      • "amount": 9999,
      • "expiresAt": "2019-08-24T14:15:22Z",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      }
    },
  • "links": {
    • "self": "/api/v1/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08/refund"
    },
  • "included": [
    • {
      • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
      • "type": "Refund",
      • "attributes": {
        • "status": "Pending",
        • "amount": 1000,
        • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
        • "createdAt": "2024-06-19T12:19:17.031Z",
        • "updatedAt": "2024-06-19T12:19:17.064Z"
        }
      },
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "status": "PromotedToPayment",
        • "amount": 9999,
        • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        • "expiresAt": "2024-12-19T10:39:59.447Z",
        • "createdAt": "2024-06-19T10:39:59.452Z",
        • "updatedAt": "2024-06-19T10:43:59.337Z"
        }
      }
    ],
  • "meta": {
    • "message": "Full refund will be initiated after the original payment is successfully received."
    }
}

Widgets

Widgets are components that are embedded into applications to enrich the user experience. Some of those require additional data loaded through API endpoints.

Learn more about the different widget types here.

Get Wallet Widget Data

path Parameters
walletId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Wallet ID for which widgets are loaded

query Parameters
filter[phoneNumber]
string

Filter the list of objects by the value of the phoneNumber field.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/widgets/wallet/123e4567-e89b-12d3-a456-426614174000?filter%5BphoneNumber%5D=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{}

Find Wallet Widget Data

query Parameters
filter[phoneNumber]
string

Filter the list of objects by the value of the phoneNumber field.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/widgets/wallet?filter%5BphoneNumber%5D=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{}

ExternalTransactions

External transactions are records of transfers that happened outside the Accrue Savings system. E.g. purchases in an online shop using a non-Accrue payment method.

List External Transactions

query Parameters
filter[phoneNumber]
string

Filter the list of objects by the value of the phoneNumber field.

filter[userId]
string

Filter the list of objects by the value of the userId field.

filter[referenceId]
string

Filter the list of objects by the value of the referenceId field.

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/external-transactions?filter%5BphoneNumber%5D=SOME_STRING_VALUE&filter%5BuserId%5D=SOME_STRING_VALUE&filter%5BreferenceId%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "ExternalTransaction",
      • "attributes": {
        • "phoneNumber": "+12125550001",
        • "type": "Purchase",
        • "referenceId": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
        • "linkedExternalTransactionId": "f663bca2-496f-4979-9ada-9d2b8aedf3c5",
        • "amount": 1337,
        • "externallyCreatedAt": "2019-08-24T14:15:22Z",
        • "channel": "App",
        • "channelId": "NYC Store 1",
        • "paymentMethods": [
          • "Cash",
          • "GiftCard"
          ],
        • "payload": { },
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        },
      • "relationships": {
        • "user": {
          • "data": [
            • {
              • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              • "type": "User"
              }
            ]
          },
        • "linkedExternalTransaction": {
          • "data": [
            • {
              • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
              • "type": "ExternalTransaction"
              }
            ]
          }
        }
      }
    ]
}

Add External Transaction

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
required
object
type
required
string
Value: "ExternalTransaction"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "ExternalTransaction",
    • "attributes": {
      • "phoneNumber": "+12125550001",
      • "type": "Purchase",
      • "referenceId": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
      • "linkedExternalTransactionId": "",
      • "amount": 1337,
      • "externallyCreatedAt": "2019-08-24T14:15:22Z",
      • "channel": "App",
      • "channelId": "NYC Store 1",
      • "paymentMethods": [
        • "Cash",
        • "GiftCard"
        ],
      • "payload": { }
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "ExternalTransaction",
    • "attributes": {
      • "phoneNumber": "+12125550001",
      • "type": "Purchase",
      • "referenceId": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
      • "linkedExternalTransactionId": "",
      • "amount": 1337,
      • "externallyCreatedAt": "2019-08-24T14:15:22Z",
      • "channel": "App",
      • "channelId": "NYC Store 1",
      • "paymentMethods": [
        • "Cash",
        • "GiftCard"
        ],
      • "payload": { },
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "user": {
        • "data": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "type": "User"
            }
          ]
        },
      • "linkedExternalTransaction": {
        • "data": [
          • {
            • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
            • "type": "ExternalTransaction"
            }
          ]
        }
      }
    }
}

Get an External Transaction

path Parameters
externalTransactionId
required
string <uuid>

External Transaction ID

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url https://merchant-api.accruesavings.com/api/v1/external-transactions/%7BexternalTransactionId%7D \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "ExternalTransaction",
    • "attributes": {
      • "phoneNumber": "+12125550001",
      • "type": "Purchase",
      • "referenceId": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
      • "linkedExternalTransactionId": "f663bca2-496f-4979-9ada-9d2b8aedf3c5",
      • "amount": 1337,
      • "externallyCreatedAt": "2019-08-24T14:15:22Z",
      • "channel": "App",
      • "channelId": "NYC Store 1",
      • "paymentMethods": [
        • "Cash",
        • "GiftCard"
        ],
      • "payload": { },
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "relationships": {
      • "user": {
        • "data": [
          • {
            • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            • "type": "User"
            }
          ]
        },
      • "linkedExternalTransaction": {
        • "data": [
          • {
            • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
            • "type": "ExternalTransaction"
            }
          ]
        }
      }
    }
}

Webhooks

Webhook management APIs

Create a webhook

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
type
required
string
Value: "Webhook"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "type": "Webhook",
  • "attributes": {
    • "enabled": true,
    • "name": "string",
    • "url": "string",
    • "topics": [
      • "string"
      ]
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Webhook",
    • "attributes": {
      • "enabled": true,
      • "name": "string",
      • "url": "string",
      • "secret": "string",
      • "topics": [
        • "string"
        ],
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      }
    }
}

Get a webhook

path Parameters
webhookId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Webhook id

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url https://merchant-api.accruesavings.com/api/v1/webhooks/123e4567-e89b-12d3-a456-426614174000 \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Webhook",
    • "attributes": {
      • "enabled": true,
      • "name": "string",
      • "url": "string",
      • "secret": "string",
      • "topics": [
        • "string"
        ],
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      }
    }
}

Update a webhook

path Parameters
webhookId
required
string <uuid>

Webhook id

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Request Body schema: application/vnd.api+json
required
type
required
string
Value: "Webhook"
required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "type": "Webhook",
  • "attributes": {
    • "enabled": true,
    • "name": "string",
    • "url": "string",
    • "topics": [
      • "string"
      ]
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "Webhook",
    • "attributes": {
      • "enabled": true,
      • "name": "string",
      • "url": "string",
      • "secret": "string",
      • "topics": [
        • "string"
        ],
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      }
    }
}

Delete a webhook

path Parameters
webhookId
required
string <uuid>

Webhook id

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request DELETE \
  --url https://merchant-api.accruesavings.com/api/v1/webhooks/%7BwebhookId%7D \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

WebhookEvents

Webhook Event management APIs

List Webhook Events

query Parameters
filter[since]
string
Default: "wakawkaka"
Example: filter[since]=2021-01-01T00:00:00Z

Filter webhook events at or after the provided date

filter[until]
string
Example: filter[until]=2021-01-01T00:00:00Z

Filter webhook events at or before the provided date

page[limit]
number [ 1 .. 100 ]
Default: 100

Maximum number of objects that will be returned. Can not be greater than 100.

page[offset]
number >= 0
Default: 0

Offset from the beginning of the list of objects. Can not be negative.

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url 'https://merchant-api.accruesavings.com/api/v1/webhooks?filter%5Bsince%5D=2021-01-01T00%3A00%3A00Z&filter%5Buntil%5D=2021-01-01T00%3A00%3A00Z&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE' \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "WebhookEvent",
      • "attributes": {
        • "topic": "string",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

Get a webhook event

path Parameters
webhookId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

WebhookEvent id

header Parameters
Client-ID
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Authorization
required
string <uuid>
Example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Secure secret to access privileged endpoints.

Responses

Request samples

curl --request GET \
  --url https://merchant-api.accruesavings.com/api/v1/webhook-events/123e4567-e89b-12d3-a456-426614174000 \
  --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \
  --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "type": "WebhookEvent",
    • "attributes": {
      • "topic": "string",
      • "updatedAt": "2019-08-24T14:15:22Z",
      • "createdAt": "2019-08-24T14:15:22Z"
      },
    • "included": [
      • {
        • "id": "string",
        • "type": "string",
        • "attributes": { }
        }
      ]
    }
}

Webhook Topics

Webhook Topics

PaymentIntentCreated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

PaymentIntentUpdated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "PaymentIntent",
      • "attributes": {
        • "billingAddress": {
          • "street": "string",
          • "street2": "string",
          • "city": "string",
          • "state": "string",
          • "postalCode": "string",
          • "country": "string"
          },
        • "email": "user@example.com",
        • "error": "LinkedAccountUnverified",
        • "expiresAt": "2019-08-24T14:15:22Z",
        • "fullName": "string",
        • "phoneNumber": "string",
        • "reference": "MERCHANT-GENERATED-TOKEN",
        • "status": "Promotable",
        • "userId": "string",
        • "walletId": "123e4567-e89b-12d3-a456-426614174000",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

PaymentCreated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": []
}

PaymentUpdated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": []
}

RefundCreated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "Refund",
      • "attributes": {
        • "status": "Failed",
        • "amount": 9999,
        • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}

RefundUpdated Webhook

Request Body schema: application/vnd.api+json
required
id
required
string <uuid>

Unique identifier for the object.

type
required
string
Value: "WebhookEvent"
required
object
required
Array of objects

Responses

Request samples

Content type
application/vnd.api+json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "WebhookEvent",
  • "attributes": {
    • "topic": "string",
    • "updatedAt": "2019-08-24T14:15:22Z",
    • "createdAt": "2019-08-24T14:15:22Z"
    },
  • "included": [
    • {
      • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      • "type": "Refund",
      • "attributes": {
        • "status": "Failed",
        • "amount": 9999,
        • "id": "9f755746-13cb-4d0b-81f2-3b4f1b44f6d8",
        • "updatedAt": "2019-08-24T14:15:22Z",
        • "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
}