Skip to main content
Payment requests are created by specifying the final settlement chain and token the recipient will receive for the payment. Here’s all it takes:
  const newPayReq = await client.orchestration.paymentRequests.create({
    amount: 10,
    chainId: chains.base.id,
    token: 'USDC',
    recipient: '0x...',
    note: 'payment request to receive 10 USDC on Base',
   });
   console.log('Payment request creation result:', JSON.stringify(newPayReq, null, 2));
A couple notes:
  • You can check the list of available chains by importing chains from the SDK.
  • amount is denominated in dollars
  • The only 2 acceptable tokens for token are 'USDC' and 'USDT', as settlement is only made available to stables.
Once created, you should receive a requestId and ephemeralWalletAddress. The ephemeralWalletAddress is the payment address that you will send to whoever is paying.

Tracking a Payment Request

Want to get a specific payment request? Just fetch the details using its requestId:
  const payReqDetails = await client.orchestration.paymentRequests.getDetails({
    requestId
  });
  console.log('Payment request details results:', JSON.stringify(payReqDetails, null, 2));
Want to get all of the payment requests created with details? Fetch with this:
 const allPayReqs = await client.orchestration.paymentRequests.list({
    direction: 'from',
    statuses: ['pending', 'inProgress', 'paid'],
    perPage: 10,
    page: 0
  });
  console.log('All payment requests:', JSON.stringify(incomingRequests, null, 2));