atum-escrow as a payment method on your mppx client, and your agent can pay for any MPP-gated resource that accepts it — no example repo required.
What’s happening
registerClientbuilds anatum-escrowclient method formppx— the sameMethod.toClient()idiom every MPP payment method (Stripe, Tempo) implements. The source account is derived from your key.- When the resource server returns a
402with a challenge namingatum-escrow,mppxhands it to this method’screateCredential. createCredentialreads the challenge’s corridor terms (destination, deadlines, settlement vault/proxy/role addresses), builds the AtumPaymentRequest, and signs the source-side Permit2 authorization with your key.mppxattaches the resulting credential to the retried request asAuthorization: Payment, and returns the200with aPayment-Receiptheader.
Past the gateway’s ~30s window, expect pending — not a hung request. The acceptance side submits and returns; when settlement is still in flight it answers pending and your client re-attempts the same purchase. Size the client’s HTTP read timeout for that ~30s window (plus a small buffer), not for the full fulfillment deadline.