Account Creation
Last updated
Last updated
This step assumes you have successfully created a new customer record and verified it using Customer Creationand Customer Verification steps of the guide
Now that you have created and verified a first customer record, you are able to onboard the customer on OffBlocks accounts. To do so, you need to use /customers/{customerId}/account
POST
request.
Let's say we want to open a new card account (the only option for the time being) that's using Euro as a base currency (we don't support multi-currency accounts just yet):
If everything was successful, you will receive a response with status 201 (Created)
which looks similar to the following:
If everything went well, you will receive an account challenge to sign as a base64 encoded string. This is required to proceed to deployment stage. Signatures are not currently verified in our Sandbox environment, however they are still required to be submitted.
In order to submit a signed challenge, use a POST
request to /accounts/{accountId}/challenge/sign
endpoint.
Please, not that the signature also must be a base64 encoded string. If signature is verified, you will receive an empty response with status code 204 (No Content)
.
If, for any reason, the original challenge is lost or cannot be signed immediately, you can fetch it again using a dedicated endpoint. If we encounter an error during signature validation via /sign
endpoint, a new challenge will be issued for you to retrieve.
Once the challenge has been successfully signed, we will proceed to deployment stage. The account will be automatically deployed and activated, which you can verify by making a GET
request to /accounts/{accountId}
.
From there we can proceed to issuing cards for the account.
Creates new account for the customer and generates a challenge to be signed in order to create a related blockchain account
/customers/{customerId}/accounts
Unique customer ID
HTTP message signature
HTTP message signature input
Idempotency key (UUID)
Content digest
Type of the account
card_account
Signs previously issued challenge to sign account creation or deletion transaction on-chain
/accounts/{accountId}/challenge/sign
Unique account ID
HTTP message signature
HTTP message signature input
Idempotency key (UUID)
Content digest
Unique signer account ID in a form of a valid on-chain address
Original base64 encoded challenge provided by this API for owner to sign
Base64 encoded signature
No body
Retrieves challenge to sign account creation or deletion transaction on-chain. This operation invalidates any previously issued challenges for the account
/accounts/{accountId}/challenge
Unique account ID
HTTP message signature
HTTP message signature input
Retrieves account's details
/accounts/{accountId}
Unique account ID
HTTP message signature
HTTP message signature input