Background: using Bridge Server v0.0.30.0

I'm making payments to a test account and looking to receive callbacks. I've been successful so far, but I'm going through securing the callback endpoint. One of the ways to do this, according to the bridge README, is to configure the mac_key so that I can receive a HMAC-SH256 encoded payload in the X_PAYLOAD_MAC header.

I've configured the mac_key and so far I'm getting an error with bridge server:

bridge_1  | time="2018-05-07T15:36:59Z" level=info msg="Started 
listening for new payments" 
cursor=<redacted> service=PaymentListener
bridge_1  | time="2018-05-07T15:37:44Z" level=info msg="New received 
payment" id=<redacted> service=PaymentListener
bridge_1  | time="2018-05-07T15:37:44Z" level=info msg="Loaded memo" 
memo=<redacted> service=PaymentListener type=text
bridge_1  | time="2018-05-07T15:37:44Z" level=error msg="Payment 
processed with errors" err="Error sending request to receive callback: 
getMAC failed: invalid MAC key: base32 decode failed: illegal base32 
data at input byte 0" service=PaymentListener

Here's my bridge.cfg

 port = "8001"
 horizon = "https://horizon-testnet.stellar.org"
 network_passphrase = "Test SDF Network ; September 2015"
 mac_key = "y9Piry"

 code = "XLM"

 type = "postgres"
 url = "postgres://postgres:@db:5432/local_bridge?sslmode=disable"

 receiving_account_id = "<redacted>"

 receive = "http://docker.for.mac.host.internal:3000/stellar/bridge_callbacks"

Did I misunderstood the documentation? I've tried shortening the mac_key string. I also learned about not supplying " from this issue: https://stackoverflow.com/questions/40407819/golang-illegal-base64-data-at-input-byte-0?rq=1

But it seems the Bridge just errors out because bridge.cfg expects strings to be wrapped in ".

1 Answer 1


I misunderstood the documentation. The mac_key should be any valid Stellar Private Key. After changing it, I'm getting the HMAC-SHA256 encoded string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.