Before you start
- A payment you can already send. See Prepare a payment.
- A destination token on the EIP-3009 list for authorized fulfillment, on an EVM chain. See Where it works.
- An account on the destination chain with enough native token for gas. You send the delivery transaction, so you pay its gas.
- A delivery deadline with room for your own transaction. See Choosing a delivery deadline.
1. Ask for authorized fulfillment
Addexecutor to the payment request. The settlement operator takes the deposit and reserves the funds; you deliver.
fulfillment_proxy to the one on Contract addresses. /v1/defaults does not say whether the proxy it returns supports authorized fulfillment.
- SDK
- HTTP
payment_id. Stop after Submitted payment: do not copy its waitForStatus call, because on this path the payment stays pending until you deliver, so that call would only time out.2. Wait for the signed transfer
Once your deposit is confirmed and the settlement operator has authorized your delivery, the status response carriesfulfillment_authorization. Poll the status as in After submission until that field appears; the script below does this. Until you deliver, the payment stays pending and has no transactions.fulfillment.
fulfillment_authorization is a signed document from the settlement operator. Keep it exactly as you received it. The two parts you need are inside authorization:
Before you send anything, check that the transfer is the one you asked for:
to is your recipient, value is your fulfillment_amount, and domain.verifyingContract and domain.chainId are your destination token and chain.
Full shape: Get payment status.
3. Send the transfer
CalltransferWithAuthorization on the destination token with the signed values, before validBefore.
deliver.ts
4. Watch it complete
Keep following the status.transactions.fulfillment shows your transaction once it is mined. The statuses that follow are on After submission.
If the transfer is not used before validBefore, the token refuses it and the payment is refunded to the payer. See Refunds.