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
Create Asset Program experimental
This endpoint allows you to create an Asset Program.
Attributes
name
stringrequiredaccountId
stringrequiredassetTypes
arrayrequiredtermsOfServiceUrl
stringrequiredcollectionIds
arrayrequiredprivacyPolicyUrl
stringrequiredmediaUploadId
string
Errors
ACCOUNT_TYPE_INVALID
403MEDIA_UPLOAD_INVALID
403COLLECTION_IDS_INVALID
403
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", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ]}'{ "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", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ]}List Asset Programs experimental
This endpoint allows you to list published Asset Programs.
Attributes
pageKey
stringpaginationLimit
number
Response
items
arraynextPageKey
string
curl -X GET 'https://service.centrapay.com/api/asset-programs?test=true' \-H 'x-api-key: <TOKEN>'{ "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", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ] } ], "nextPageKey": "eyJjcmVhdGVkQXQiOiIyMDIxLTA4LTI1VDAwOjAyOjQ5LjQ4OFoifQ=="}Get Asset Program experimental
This endpoint allows you to retrieve a specific Asset Program.
Attributes
id
stringrequired
curl -X GET https://service.centrapay.com/api/asset-programs/ap_WRhAxxWpTKb5U7pXyxQjjY \-H 'x-api-key: <TOKEN>'{ "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", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ]}Set Asset Program Privacy Policy URL experimental
This endpoint allows you to set the privacy policy url for an Asset Program.
Attributes
privacyPolicyUrl
stringrequired
curl -X POST https://service.centrapay.com/api/asset-programs/ap_WRhAxxWpTKb5U7pXyxQjjY/set-privacy-policy-url \-H 'content-type: application/json' \-H 'x-api-key: <TOKEN>' \-d '{ "privacyPolicyUrl": "https://example.com/privacy-new"}'{ "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-new", "published": true, "termsOfServiceUrl": "https://example.com/terms", "test": true, "updatedAt": "2021-08-25T00:02:49.488Z", "updatedBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ]}Set Asset Program Terms of Service URL experimental
This endpoint allows you to set the terms of service url for an Asset Program.
Attributes
termsOfServiceUrl
stringrequired
curl -X POST https://service.centrapay.com/api/asset-programs/ap_WRhAxxWpTKb5U7pXyxQjjY/terms-of-service \-H 'content-type: application/json' \-H 'x-api-key: <TOKEN>' \-d '{ "termsOfServiceUrl": "https://example.com/terms-new"}'{ "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-new", "test": true, "updatedAt": "2021-08-25T00:02:49.488Z", "updatedBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99", "collectionIds": [ "c_Xv990BzkgfoDS7bBls50pd" ]}