Asset Programs

An Asset Program is a container for one or more Asset Types .

An Asset Program is provided by an asset issuer as a mechanism that enables businesses to accept their assets as payment options. By participating in an Asset Program, businesses agree to the issuer's terms of service and privacy policy, establishing a formal relationship that allows customers to use the issuer's digital assets for payments.

Asset Program Model

Attributes

  • id

    string

    The unique identifier of the Asset Program.

  • name

    string

    The display name of the Asset Program.

  • assetTypes

    array

    One or more Asset Types that can be accepted as part of the Asset Program.

  • accountId

    string

    The Account that owns the Asset Program.

  • test

    boolean

    true if the Asset Program is for testing purposes only. This is based on the Account that owns the Asset Program.

  • mediaUploadId

    string

    The id of the Media Upload image of the Asset Program.

  • published

    boolean

    true if the Asset Program is published and visible to merchants. Defaults to true.

  • privacyPolicyUrl

    string

    URL to the Asset Program's privacy policy document.

  • termsOfServiceUrl

    string

    URL to the Asset Program's terms of service document.

  • createdAt

    timestamp

    When the Asset Program was created.

  • createdBy

    crn

    The User or API Key that created the Asset Program.

  • updatedAt

    timestamp

    When the Asset Program was updated.

  • updatedBy

    crn

    The User or API Key that updated the Asset Program.


Create Asset Program experimental

This endpoint allows you to create an Asset Program .

Attributes

  • name

    string required

    The display name of the Asset Program.

  • accountId

    string required

    The Account that will own the Asset Program.

  • assetTypes

    array required

    The list of Asset Types that are a part of the Asset Program.

  • termsOfServiceUrl

    string required

    URL to the Asset Program's terms of service document.

  • privacyPolicyUrl

    string required

    URL to the Asset Program's privacy policy document.

  • mediaUploadId

    string

    The id of the Media Upload image of the Asset Program.

Errors

  • ACCOUNT_TYPE_INVALID

    403

    The Account must be type org.

  • MEDIA_UPLOAD_INVALID

    403

    The media upload id does not reference a media upload.

Request
curl -X POST \
https://service.centrapay.com/api/asset-programs \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"name": "My Asset Program",
"assetTypes": [
"payap-debit"
],
"mediaUploadId": "8aoMfscvtuewsuJzmzBzAs",
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"termsOfServiceUrl": "https://example.com/terms",
"privacyPolicyUrl": "https://example.com/privacy"
}
'
Response
{
"id": "ap_WRhAxxWpTKb5U7pXyxQjjY",
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"assetTypes": [
"payap-debit"
],
"createdAt": "2021-08-25T00:02:49.488Z",
"createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99",
"mediaUploadId": "8aoMfscvtuewsuJzmzBzAs",
"name": "My Asset Program",
"privacyPolicyUrl": "https://example.com/privacy",
"published": true,
"termsOfServiceUrl": "https://example.com/terms",
"test": true,
"updatedAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99"
}

List Asset Programs experimental

This endpoint allows you to list published Asset Programs .

Attributes

  • test

    boolean

    Filter by test or live Asset Programs. If not specified, returns live Asset Programs only.

  • pageKey

    string

    The page key used in pagination to fetch the next page of results.

  • paginationLimit

    number

    The maximum number of results per page. Maximum value is 100. Defaults to 50.

Response

  • items

    array

    The list of Asset Programs.

  • nextPageKey

    string

    The page key to use for fetching the next page of results, if more results are available.

Request
curl -X GET \
'https://service.centrapay.com/api/asset-programs?test=true' \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"id": "ap_WRhAxxWpTKb5U7pXyxQjjY",
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"assetTypes": [
"payap-debit"
],
"createdAt": "2021-08-25T00:02:49.488Z",
"createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99",
"mediaUploadId": "8aoMfscvtuewsuJzmzBzAs",
"name": "My Asset Program",
"privacyPolicyUrl": "https://example.com/privacy",
"published": true,
"termsOfServiceUrl": "https://example.com/terms",
"test": true,
"updatedAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99"
}
],
"nextPageKey": "eyJjcmVhdGVkQXQiOiIyMDIxLTA4LTI1VDAwOjAyOjQ5LjQ4OFoifQ=="
}

Get Asset Program experimental

This endpoint allows you to retrieve a specific Asset Program .

Attributes

  • id

    string required

    The unique identifier of the Asset Program.

Request
curl -X GET \
https://service.centrapay.com/api/asset-programs/ap_WRhAxxWpTKb5U7pXyxQjjY \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "ap_WRhAxxWpTKb5U7pXyxQjjY",
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"assetTypes": [
"payap-debit"
],
"createdAt": "2021-08-25T00:02:49.488Z",
"createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99",
"mediaUploadId": "8aoMfscvtuewsuJzmzBzAs",
"name": "My Asset Program",
"privacyPolicyUrl": "https://example.com/privacy",
"published": true,
"termsOfServiceUrl": "https://example.com/terms",
"test": true,
"updatedAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99"
}