Create Value Message

There are two ways to create a value message:

  1. Create Value Message By Request Message

    POST /mintchip/payments/request

    Description

    Creates value using the authenticated MintChip using parameters contained in a value-request packet.

    Request Parameters

    POST body Parameters Description
    Value Request Message The request 'Content-Type' header should be set to application/vnd.scg.ecn-request. The request body should contain a base64-encoded MintChip value-request packet.

    Example URL

    https://remote.mintchipchallenge.com/mintchip/payments/request

    Response Data

    On successful value creation, the HTTP response code is 200 - OK.

    The response content-type is application/vnd.scg.ecn-message

    The response data is a base64-encoded value-message packet.

    Custom HTTP error codes

    Error Meaning
    452 System related
    453 Crypto related
    454 Format related
    455 MintChip related

    In all cases, the HTTP status message describes the details of the error. For example, if there is insufficient balance, the error will be:

    455 - "Invalid Amount"


  2. Create Value Message Without Annotation

    POST /mintchip/payments/{payeeid}/{currencycode}/{amountincents}

    Description

    Creates value using the authenticated MintChip.

    Request Parameters

    URI Parameters Description
    {payeeid} Specifies the MintChip ID of the intended recipient.
    {currencycode} Specifies the currency to use (presently only $CAD is supported with a code of 1).
    {amountincents} Specifies the amount to create, in cents.

    Example URL

    Create a value of $CAD 1.50 for payment to MintChip ID 1110-0000-0000-0005:

    https://remote.mintchipchallenge.com/mintchip/payments/1110000000000005/1/150

    Response Data

    On successful value creation, the HTTP response code is 200-OK.

    The response content-type is application/vnd.scg.ecn-message

    The response data is a base64-encoded value-message packet.

    Custom HTTP error codes

    Error Meaning
    452 System related
    453 Crypto related
    454 Format related
    455 MintChip related

    In all cases, the HTTP status message describes the details of the error. For example, if there is insufficient balance, the error will be:

    455 - "Invalid Amount"