PayString was previously known as PayID.

See also: PayString API Reference.

The PayString protocol has specific header requirements for requests and responses.

Request headers#

When you make a request, the HTTP Accept header of the request specifies the payment network and environment, and PayString is therefore capable of returning a user's address information for any network in which that user participates.

An example request has this form.

GET /{user} HTTP/1.1
Accept: application/xrpl-testnet+json

Some different header options are shown here, with example values.

CurrencyHeaderAddress payload
BTCapplication/btc-mainnet+json{ address: '1BvBMSEYstWetAu4m4GFg7xJaNVN2' }
XRPapplication/xrpl-mainnet+json{ address: "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg", tag: "67298042"}
ACHapplication/ach+json{ account: '363023456079',routing: '011302838'}
CROapplication/cro-mainnet+json{ address: "cro1w2kvwrzp23aq54n3amwav4yy4a9ahq2kz2wtmj", memo: "3979714512"}
Allapplication/payid+jsonVariable, depending on the contents of each address

If you create your own Accept header for another currency:

  1. Follow the pattern for BTC Accept headers and use the currency code for the currency, as shown.
  2. Consider creating a PR on the PayString docs site to update this list.
  3. Consider updating IANA registration section in the PayString protocol RFC for supported Media-types by sending an email to rfcs@paystring.org.

Headers for GET requests#

This launch of PayString includes those headers specific to the XRPL community. Each payment network is free to establish its own standard headers. These headers should be submitted with every GET request, but not POST.

Header for all addresses#

Accept headerDescription
application/payid+jsonReturns all addresses for a PayString

Headers for XRP#

Accept headerDescription
application/xrpl-mainnet+jsonReturns XRPL mainnet classic address (and tag if provided)
application/xrpl-testnet+jsonReturns XRPL testnet classic address (and tag if provided)
application/xrpl-devnet+jsonReturns XRPL devnet xAddress classic address (and tag if provided)

Headers for ACH#

Accept headerDescription
application/ach+jsonReturns account and routing number

Headers for BTC#

Accept headerDescription
application/btc-mainnet+jsonReturns mainnet address
application/btc-testnet+jsonReturns testnet address

Headers for ETH#

Accept headerDescription
application/eth-mainnet+jsonReturns mainnet address
application/eth-ropsten+jsonReturns testnet address
application/eth-kovan+jsonReturns testnet address
application/eth-rinkeby+jsonReturns testnet address

Ethernet has a number of different testnets. Refer to EIP 155.

Headers for ILP#

Accept headerDescription
application/interledger-mainnet+jsonReturns mainnet address
application/interledger-testnet+jsonReturns testnet address

Headers for CRO#

Accept headerDescription
application/cro-mainnet+jsonReturns CRO mainnet address (and memo if provided)
application/cro-testnet+jsonReturns CRO testnet address (and memo if provided)