Yellowpay Partner API — Integration Guide
Production endpoint:
https://api.getyellowpay.com/partner/graphqlGraphiQL:
https://api.getyellowpay.com/partner/graphiqlSandbox:
https://staging-api.getyellowpay.com/partner/graphql— see EnvironmentsThis guide covers the integration flow and the meaning behind each operation. For the complete list of types, fields and arguments, use the Docs panel in GraphiQL — it is generated from the live schema and always current.
What the API does
Yellowpay lets a business that buys from you take net terms (30, 60, 90 days…): Yellowpay funds the invoice to you up front, invoices the buyer with the agreed terms, and collects the payment. The Partner API lets you offer this inside your own ordering flow: your buyer picks "net terms" at checkout, your platform creates the request with Yellowpay, the buyer e-signs a purchase agreement through DocuSign, and Yellowpay funds it.
Buyers can use the API too, with a read-only token, to follow the terms requests they've taken — see Access for buyers.
Terminology
Yellowpay's terms may differ from the ones your platform uses. In this guide and in the API:
| Term | Meaning |
|---|---|
| Buyer | The business buying from you and paying Yellowpay. If your platform calls these businesses something else — customers, installers, dealers, accounts — this is them. |
| Seller | You, the Yellowpay partner selling to the buyer. Where the API says "seller" (for example SELLER_DELINQUENCY or termsFeePayer: SELLER), it means you. |
| Terms request | A request to finance a single invoice on net terms. One invoice, one terms request. |
| Net terms | The number of days the buyer has to pay, e.g. 30, 60, 90. |
| Credit limit | The maximum a buyer can have outstanding across all their terms requests with Yellowpay. |
| Invoice · funding · payment | The three money movements, always named distinctly. You invoice the buyer. Yellowpay funds the invoice — the payout to you. The buyer makes the payment to Yellowpay. The API uses "payment" only for this, never for the invoice or the funding. |
Environments
| Sandbox | Production | |
|---|---|---|
| GraphQL endpoint | https://staging-api.getyellowpay.com/partner/graphql |
https://api.getyellowpay.com/partner/graphql |
| GraphiQL | https://staging-api.getyellowpay.com/partner/graphiql |
https://api.getyellowpay.com/partner/graphiql |
The sandbox is fully separate from production: no real money moves and no real credit decisions are made. See Testing in the sandbox for what to expect from it.
Authentication
All requests must carry an API token issued by Yellowpay, sent as a bearer token in the Authorization header:
POST /partner/graphql HTTP/1.1
Host: api.getyellowpay.com
Content-Type: application/json
Authorization: Bearer <your token>
API access is enabled for every company by default; Yellowpay can disable it for a company, and requests from a company without API access fail with HTTP 403. Production tokens are created and managed by you in the Yellowpay app under Settings → API access (https://app.getyellowpay.com/settings/api-access). Sandbox tokens are issued by Yellowpay and sent to you by email — see Testing in the sandbox.
Each token has:
-
Access levels — what the token may change. Every token can run queries; the levels add write access:
Level In the app Allows Who can have it READRead data Queries only — choose this alone for a read-only token Any company CREATE_BUYERRegister buyers and request credit limits createBuyer,addBuyerByDuns,requestCreditLimitSellers only CREATE_TERMS_REQUESTCreate and manage terms requests createTermsRequest,resendAgreement,cancelTermsRequestSellers only A full seller checkout integration needs
CREATE_BUYERandCREATE_TERMS_REQUEST. A buyer's token is always read-only: the seller levels can't be given to a token of a company that isn't a seller. -
An optional IP allowlist. If your token has one, requests from other IPs are rejected.
-
An expiry date.
A request without a valid token fails with the error code UNAUTHENTICATED; an operation your token or company isn't allowed fails with FORBIDDEN (see Errors).
To use GraphiQL, add the token in the Headers tab at the bottom of the editor:
{ "Authorization": "Bearer <your token>" }
Then verify your setup with tokenInfo — the simplest first call to make, and one that works with any token:
query TokenInfo {
tokenInfo {
name
companyId
accessLevels
expires
ipAllowlist
}
}
accessLevels lists the levels in effect for the token: READ is always included.
Conventions
- Protocol — standard GraphQL over HTTP
POSTwith a JSON body{ "query": "...", "variables": { ... } }.GETis not supported. - Money — invoices, fees and payments are USD
Floatwith two decimal places. Credit limits (requestCreditLimit.amount,requestedLimit,approvedLimit) are whole USDInt. Rates (netTermsRates) are percentages rounded to two decimal places:0.69means 0.69%, not a fraction. - Dates —
LocalDateisYYYY-MM-DD.UTCDateTimeis ISO 8601 with aZsuffix, e.g.2026-08-26T12:00:00Z. - Strings — trimmed on input and must be non-empty.
Emailvalues are lowercased and trimmed. - IDs —
Buyer.id,Seller.idandTermsRequest.idare integers. Treat them as opaque identifiers. - Lists —
buyersandtermsRequestsare Relay-style paginated connections: passfirst(page size) andafter(cursor), readedges[].nodeandpageInfo. See Change polling. - Errors — standard GraphQL
errorsarray with a machine-readableextensions.code. Some errors return usable data alongside the error. See Errors — including a client configuration note you should not skip. - Examples — every example below uses variables. Do the same in your integration: it keeps the operation static and lets your GraphQL client validate and cache it.
Integration flow at a glance
Two stages. The first happens once per buyer, the second once per order.
1. Onboard a buyer
Every buyer you work with must be linked to your account. A company becomes one of your buyers in exactly two ways: createBuyer (you register it with Yellowpay) or addBuyerByDuns (it's already registered — for example through another seller — and you link it). This section covers both.
1.1 Find the buyer's DUNS
Onboarding keys on the DUNS number. If you don't have it, search by company name and (optionally) two-letter state code:
query LookupDuns($name: String!, $state: String) {
lookupCompanyDuns(name: $name, state: $state) {
duns
name
address
isRegistered
}
}
{ "name": "Sunrise Solar Installers", "state": "CA" }
The query returns a list of candidate matches. Company names are rarely unique, so present the candidates (name and address) to the buyer and let them pick the right one rather than taking the first result. Including state narrows the results considerably. A name shorter than 3 characters, or an unknown state, fails with INVALID_INPUT.
isRegistered tells you which door to use next: true → link the buyer with addBuyerByDuns; false → register them with createBuyer. Both are in 1.2.
1.2 Register the buyer — or link an existing one
Already registered with Yellowpay (isRegistered: true) — link the buyer to your account:
mutation AddBuyerByDuns($duns: String!) {
addBuyerByDuns(duns: $duns) {
id
businessName
availableCredit
creditApplication { status approvedLimit }
}
}
It returns the full buyer, credit standing included — if they already have an approved limit, you can skip straight to step 2. If no company is registered with that DUNS, it fails with NOT_FOUND; register them instead. That fallback also makes a lookup-free shortcut possible when you already hold the DUNS: call addBuyerByDuns first, and on NOT_FOUND fall through to createBuyer.
Not yet registered (isRegistered: false) — register the buyer:
mutation CreateBuyer($input: BuyerInput!) {
createBuyer(input: $input) {
id
businessName
duns
}
}
{
"input": {
"businessName": "Sunrise Solar Installers LLC",
"duns": "123456789",
"address": {
"streetAddress": "2100 Geng Road",
"city": "Palo Alto",
"state": "CA",
"postalCode": "94304"
},
"primaryContact": {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@sunrisesolar.example",
"phone": "650-555-0142"
},
"accountsPayable": {
"name": "Bob Ledger",
"email": "ap@sunrisesolar.example",
"phone": "650-555-0143"
}
}
}
Note what's not here: no credit amount. Registration alone grants no credit; requesting a limit is the separate next step.
Field notes:
primaryContact— the buyer's main contact. This person signs purchase agreements unless you specify othersignerson a terms request.accountsPayable— the buyer's accounts-payable contact. Yellowpay sends payment notices here. All three fields are required.duns— from step 1.1, or your own records.
If a company with this DUNS is already registered, the mutation fails with DUPLICATE_DUNS and returns the existing buyer in data — see Errors for how to make sure your client actually receives it. That buyer isn't linked to your account yet: call addBuyerByDuns with the same DUNS, then continue with its id.
Store Buyer.id. It is the buyerId for every terms request for this buyer, and the argument to buyer(id).
1.3 Request a credit limit
mutation RequestCreditLimit($buyerId: Int!, $amount: Int!) {
requestCreditLimit(buyerId: $buyerId, amount: $amount) {
id
availableCredit
creditApplication {
status
requestedLimit
approvedLimit
created
}
}
}
{ "buyerId": 4821, "amount": 50000 }
amount is in whole USD. It must be at least the invoice you're about to finance, and it caps every future terms request for this buyer — so request what you expect the buyer to need over time, not just today's order.
Handling creditApplication.status:
| Status | Meaning | What to do |
|---|---|---|
APPROVED |
The limit is granted; approvedLimit and availableCredit reflect it. |
Continue to step 2. |
PENDING |
Yellowpay is underwriting the buyer manually. Yellowpay contacts the buyer directly, often asking for financials. | Poll buyer(id).creditApplication.status. You can create terms requests meanwhile, but they are held for manual review until the limit is approved — usually better to wait. |
REJECTED |
Yellowpay declined to extend credit. | Offer the buyer another way to pay. |
requestCreditLimit is also how you request a higher limit for an already-approved buyer. Calling it while an application is still PENDING fails with CREDIT_APPLICATION_PENDING and returns the buyer (with the pending application) in data.
2. Request terms for an order
2.1 Price the options
One call prices every available net terms option, so you can render the whole selector — "Net 30 — $x · Net 60 — $y · Net 90 — $z" — from a single round trip. The figures are the ones the buyer will see:
query TermsCalculations($invoiceAmount: Float!, $termsFeePayer: TermsFeePayer) {
termsCalculations(invoiceAmount: $invoiceAmount, termsFeePayer: $termsFeePayer) {
netTerms
invoiceAmount
feesAmount
totalAmount
}
}
{ "invoiceAmount": 18750.00, "termsFeePayer": "BUYER" }
Illustrative response (fee rates on your account will differ):
{
"data": {
"termsCalculations": [
{ "netTerms": 30, "invoiceAmount": 18750.00, "feesAmount": 235.00, "totalAmount": 18985.00 },
{ "netTerms": 60, "invoiceAmount": 18750.00, "feesAmount": 468.75, "totalAmount": 19218.75 },
{ "netTerms": 90, "invoiceAmount": 18750.00, "feesAmount": 703.00, "totalAmount": 19453.00 }
]
}
}
invoiceAmount— the amount you passed in, excluding the fee.feesAmount— the fee added to the buyer's invoice;0when you bear the fee.totalAmount— what the buyer pays on the due date. This is the amount on the purchase agreement.
termsFeePayer decides who bears the cost of the terms. It defaults to SELLER when omitted.
termsFeePayer |
Who bears the fee | feesAmount |
totalAmount (buyer pays) |
Your payout |
|---|---|---|---|---|
BUYER |
The buyer — the fee is added to the invoice | 468.75 | 19,218.75 | 18,750.00 |
SELLER (default) |
You — the fee is deducted from your payout | 0.00 | 18,750.00 | 18,750.00 minus your fee |
Figures for the Net 60 row of the example. When you bear the fee, the buyer never sees it: termsCalculations reports no fee, and your fee appears only on the terms request, as termsFeeAmount, for you. Re-run the query whenever the invoice amount or fee payer changes, and pass the same termsFeePayer to createTermsRequest, or the numbers the buyer saw won't match the request.
To show the buyer what applies if they pay late, netTermsRates lists the current recurring fee rates for each option — see 2.5.
2.2 Create the terms request
The invoice must exist before this call — Yellowpay finances a specific invoice, so issue it first and create the request against it.
Don't send this invoice to the buyer yourself. Yellowpay invoices the buyer directly, with the final amounts (including the fee when the buyer bears it), the agreed terms, and the payment details. Your invoice is the underlying document for the financing; if the buyer received it too, they'd hold two invoices with different amounts and the wrong payment instructions — and might pay you instead of Yellowpay.
mutation CreateTermsRequest($input: TermsRequestInput!) {
createTermsRequest(input: $input) {
id
status
amount
netTerms
termsFeePayer
termsFeeAmount
totalAmount
purchaseDate
dueDate
reviewReasons
signers {
name
email
signing { status }
}
}
}
{
"input": {
"buyerId": 4821,
"amount": 18750.00,
"netTerms": 60,
"termsFeePayer": "BUYER",
"invoiceNumber": "INV-2026-00123",
"invoiceFile": {
"name": "INV-2026-00123.pdf",
"base64": "<base64-encoded file>"
},
"poNumber": "PO-88412",
"poFile": {
"name": "PO-88412.pdf",
"base64": "<base64-encoded file>"
},
"signers": [
{ "name": "Jane Doe", "email": "jane@sunrisesolar.example" }
],
"signedAgreementCC": ["orders@yourcompany.example"]
}
}
Field notes:
buyerId— theBuyer.idfrom step 1.amount— the invoice amount, excluding any Yellowpay fee. The same value you priced withtermsCalculations.netTerms— one of the values fromnetTermsOptions/ the calculations.invoiceFile— the invoice, base64-encoded; PDF or most common image formats.invoiceNumber— your invoice number, unique across your requests. A duplicate fails withDUPLICATE_INVOICE_NUMBERand returns the existing request indata— which also makes a blind retry after a timeout safe.poNumber/poFile— optional purchase order or contract number and file.signers— who signs the purchase agreement. Optional; defaults to the buyer's primary contact.signedAgreementCC— optional. Addresses that receive a copy of the signed agreement, typically your own order desk.
File size — the request body is capped at 25 MB in total, shared by everything in it. Base64 encoding adds about a third, so budget roughly 18 MB of original files per request, split between invoiceFile and poFile. A typical invoice PDF is well under 1 MB; the ceiling only matters for large scans.
The request can also fail outright: CREDIT_APPLICATION_MISSING if no credit limit has been requested for the buyer, INSUFFICIENT_CREDIT if the buyer's credit application was rejected, and INVALID_NET_TERMS if netTerms isn't one of your options. Otherwise, what happens next depends on the buyer's credit:
- Approved limit covering the amount — Yellowpay emails the purchase agreement to the signers as a DocuSign envelope, and the request proceeds through the statuses below.
- Otherwise — the request is still created but held for Yellowpay's manual review.
reviewReasonsstates why (CREDIT_LIMIT,BUYER_DELINQUENCY,SELLER_DELINQUENCY), and the agreement is not sent while the review is open. Once Yellowpay clears the review it sends the agreement — no action is needed on your side.
If DocuSign itself fails, the mutation returns DOCUSIGN_ERROR but the request is created — don't create it again; contact Yellowpay and the agreement will be sent.
Store the returned id; the response also carries the committed economics, so you can render a confirmation without recalculating:
amount— the invoice amount on the purchase agreement, including the fee when the buyer bears it.termsFeeAmount— the terms fee, whoever bears it.totalAmount— what the buyer pays ondueDate(purchaseDate+netTermsdays).
2.3 Track the request
Yellowpay's side of the lifecycle is asynchronous — signing, review, funding, payment. There are no webhooks yet, so poll. A signing round trip takes hours to days; polling on the order of minutes is plenty.
Change polling — one query for "what changed since my last poll", instead of polling every open request individually:
query Changes($updatedSince: UTCDateTime!, $after: Cursor) {
termsRequests(first: 50, after: $after, filters: { updatedSince: $updatedSince }) {
edges {
node {
id
status
statusUpdated
reviewReasons
}
}
pageInfo { hasNextPage endCursor }
}
}
Pass the timestamp of your previous poll as updatedSince; page with after while hasNextPage is true. updatedSince is inclusive — a request whose status changed exactly at that time is returned again — so make your handling idempotent, keyed on id and statusUpdated.
Other filters on termsRequests:
status— only requests in one of these statuses.buyerId— only requests for one of your buyers.role—SELLERorBUYER: only requests where your company has that role. Omit it to get both; it matters only if your company also buys through Yellowpay.
buyerId can't be combined with role: BUYER, and fails with INVALID_INPUT if it is.
For one request in detail (per-signer progress, dates):
query TermsRequest($id: Int!) {
termsRequest(id: $id) {
id
status
reviewReasons
dueDate
invoiceNumber
poNumber
signers {
name
email
signing { status statusUpdated failureReason }
}
}
}
An ID that isn't one of your company's requests fails with NOT_FOUND.
| Status | Meaning | What to do |
|---|---|---|
REQUESTED |
Submitted. If reviewReasons is non-empty, the request is held for manual review; the agreement is sent automatically once the review clears. |
Wait. |
AGREEMENT_SENT |
The purchase agreement has been sent to the signers via DocuSign. | Tell the buyer to look for the DocuSign email. signers[].signing.status shows per-signer progress. |
SIGNED |
All signers have signed. | Yellowpay proceeds to funding. |
FUNDED |
Yellowpay has funded the invoice — your payout has been made. | The buyer now owes the payment to Yellowpay, not you. |
REPAID |
The buyer has paid Yellowpay. | Nothing — the cycle is complete. |
REFUSED |
Yellowpay declined the request. | Offer another way to pay. |
CANCELLED |
Cancelled — by the buyer, or by you via cancelTermsRequest. |
Offer another way to pay or close the order. |
REFUND_REQUESTED |
The buyer has requested a refund; Yellowpay handles this manually. | No action for you. |
UNCOLLECTIBLE |
Yellowpay could not collect the payment. | No action for you. |
reviewReasons is null when the request isn't under review.
Per-signer signing.status values: SENT, RECEIVED, OPENED, SIGNED, DECLINED, FAILED. FAILED means the DocuSign email couldn't be delivered — check failureReason and the signer's address, then fix it with resendAgreement. DECLINED means the signer refused to sign.
Once a request is funded, invoiceStatus follows Yellowpay's invoice to the buyer — OPEN, DELINQUENT, IN_DEFAULT or PAID — and settledDate is the date the buyer paid.
2.4 Fix problems: resend or cancel
Only you, the seller, can resend or cancel, with a CREATE_TERMS_REQUEST token. The buyer gets FORBIDDEN.
Agreement bounced or wrong signer — resend, optionally with a corrected signer list (a supplied list replaces the current signers; omit it to resend to the current ones):
mutation ResendAgreement($id: Int!, $signers: [SignerInput!]) {
resendAgreement(id: $id, signers: $signers) {
id
status
signers { name email signing { status } }
}
}
Allowed only while the status is AGREEMENT_SENT — after the agreement has gone out and before it's signed; otherwise it fails with REQUEST_STATUS_VIOLATION.
Order fell through — cancel:
mutation CancelTermsRequest($id: Int!) {
cancelTermsRequest(id: $id) {
id
status
}
}
Allowed while the status is REQUESTED, AGREEMENT_SENT or SIGNED — i.e. any time before funding. After FUNDED, contact Yellowpay instead.
2.5 Fees, payments and balance after funding
If a funded request isn't fully paid when the net terms end, a recurring fee is charged for each started week until it is. The fee is a fixed amount per week, calculated on the request's amount (less any deposit): partial payments reduce the balance, not the weekly fee. Where the request has an escalated rate, it replaces the standard rate from escalatedFeeStartDate. These fees are always the buyer's, whoever bears the terms fee. TermsRequest.financials shows where a request stands:
query TermsRequestFinancials($id: Int!) {
termsRequest(id: $id) {
id
status
dueDate
totalAmount
financials {
asOf
feeStartDate
recurringFeeAmount
escalatedFeeStartDate
escalatedFeeAmount
recurringFeeTotal
fixedFeeAmount
totalPaid
openBalance
feeCharges { date amount tier }
payments { date amount }
}
}
}
asOf— the business date the figures are calculated for, in Yellowpay's timezone. Figures are always current; there are no historical snapshots.feeStartDate/recurringFeeAmount— the first recurring fee date, the day after the net terms end (purchaseDate+netTerms+ 1 day; for requests created through the API, the day afterdueDate), and the standard fee per started week. Both are null when the request has no recurring fee schedule. WhenescalatedFeeStartDateis the same asfeeStartDate, every week is charged at the escalated rate, sorecurringFeeAmountis never charged.escalatedFeeStartDate/escalatedFeeAmount— when the escalated rate starts, and the fee per started week from then on. Null when no escalated rate applies.recurringFeeTotal— recurring fees accrued so far, both rates together. Zero before funding.fixedFeeAmount— any additional fixed fee, separate from recurring fees.totalPaid/payments— the payments recorded against the request, and their sum. Older requests settled without payment records showtotalPaid0 and nopayments; their status is what counts.openBalance— what the buyer owes now. Zero before funding. It follows Yellowpay's billing and settlement rules, settlement adjustments included, so read it rather than recomputing it from the other fields. A settlement can leave it non-zero on aREPAIDrequest.feeCharges— the recurring fees as dated lines, withtierSTANDARDorESCALATED; their sum isrecurringFeeTotal. Empty before funding.
feeCharges is recalculated on every read — it is not a ledger of posted charges. At the switch to the escalated rate, the week in progress is repriced at the escalated rate, so don't treat the difference between two reads as a list of new transactions.
Change polling only tracks status changes. Fee accrual, payments that don't complete the request, and invoiceStatus moving to DELINQUENT or IN_DEFAULT leave the status unchanged, so updatedSince doesn't return the request for them. For each funded request you follow, read financials and invoiceStatus directly — once a day is enough.
Current rates. netTermsRates returns today's rates, one entry per net terms option on your account:
query NetTermsRates {
netTermsRates {
netTerms
prepaidRate
recurringRate
escalatedRecurringRate
escalationDay
defaultDay
asOf
}
}
prepaidRate— the terms fee rate for this option on your account, before any deposit or delivery adjustment.recurringRate/escalatedRecurringRate— the standard and escalated recurring fee rates, as a percentage of the request'samountper started week. These are Yellowpay's current rates for buyers, the same for every seller, and Yellowpay can set different recurring fees for an individual buyer.recurringRateis null when no recurring rate is configured, andescalatedRecurringRatewhen there is no escalated rate.escalationDay— days afterpurchaseDateon which the escalated rate first applies for this option — never within the net terms. Null when there is no escalated rate.defaultDay— days afterpurchaseDateon which a request created through the API with this option is in default. It is a threshold;invoiceStatuschanges toIN_DEFAULTwhen Yellowpay next updates it.
These are current offers. An existing request keeps the rates it was created with — use its financials, never netTermsRates, for its fees. netTermsOptions still returns the plain list of days.
3. Checking a buyer's credit
Before offering net terms on an order, check whether the buyer can take it:
query BuyerCredit($id: Int!) {
buyer(id: $id) {
id
businessName
availableCredit
creditApplication { status approvedLimit }
}
}
availableCredit— what the buyer can request terms for right now. If it's lower than the order amount, the request isn't rejected outright — it goes into manual review withreviewReasons: [CREDIT_LIMIT].creditApplication— the latest application and its status; null if none has been made yet.- To raise a limit, call
requestCreditLimitwith the new amount.
buyers(first: 20, filters: { query: "sunrise" }) lists your buyers as a paginated connection, with free-text search. A buyer(id) that isn't one of your buyers fails with NOT_FOUND.
4. Access for buyers
A buyer can integrate too — for example to show its open terms requests in its own procurement or accounting system. The buyer creates a token with READ only.
A buyer reads the requests it has taken with the same termsRequests and termsRequest(id) queries, where seller identifies who sold to it:
query MyPurchases($after: Cursor) {
termsRequests(first: 50, after: $after, filters: { role: BUYER }) {
edges {
node {
id
status
invoiceNumber
totalAmount
dueDate
invoiceStatus
seller { id businessName }
}
}
pageInfo { hasNextPage endCursor }
}
}
- Filters —
sellerIdnarrows to one seller (aSeller.id); it can't be combined withrole: SELLER.statusandupdatedSincework as described in 2.3. - What the buyer doesn't see — what's confidential to the seller.
termsFeeAmountis null when the seller bears the fee, andreviewReasonsleaves outSELLER_DELINQUENCY. - Fees and balance —
financials(see 2.5) shows the buyer the same figures as the seller; everything in it — fees, payments and balance — is the buyer's own.netTermsRatesreturns an empty list for a company that isn't a seller. - What the buyer can't do — create, resend or cancel terms requests, or register other buyers. The seller levels aren't available to a buyer's token.
Errors
Errors follow the GraphQL convention: errors[] carries the details, with a machine-readable extensions.code and an extensions.status mirroring the equivalent HTTP status.
{
"data": { "buyers": null },
"errors": [
{
"message": "You have to log in to perform this action",
"locations": [{ "line": 2, "column": 3 }],
"path": ["buyers"],
"extensions": { "code": "UNAUTHENTICATED", "status": 401 }
}
]
}
| Code | Returned by | Meaning and recovery |
|---|---|---|
UNAUTHENTICATED |
any operation | Token missing, invalid, expired, or the request came from outside the IP allowlist. |
FORBIDDEN |
mutations | Your token doesn't have the access level for this operation, or your company can't use it — for example a buyer cancelling a request. See Authentication. |
NOT_FOUND |
addBuyerByDuns, buyer, termsRequest, resendAgreement, cancelTermsRequest, termsRequests with buyerId or sellerId |
No such company, or the buyer, seller or terms request isn't linked to your company. Other companies' records are always reported as not found. |
INVALID_INPUT |
lookupCompanyDuns, termsRequests |
A name shorter than 3 characters or an unknown state code; or conflicting termsRequests filters. |
DUPLICATE_DUNS |
createBuyer |
A company with this DUNS already exists. The existing buyer is returned in data — link it to your account with addBuyerByDuns, then continue with its id. |
CREDIT_APPLICATION_PENDING |
requestCreditLimit |
An application is already under review. The buyer (with the pending application) is returned in data. |
CREDIT_APPLICATION_MISSING |
createTermsRequest |
No credit limit has been requested for the buyer — call requestCreditLimit first. |
INSUFFICIENT_CREDIT |
createTermsRequest |
The buyer's credit application was rejected. Offer another way to pay. |
INVALID_NET_TERMS |
createTermsRequest |
netTerms is 0 or not one of your netTermsOptions. |
DUPLICATE_INVOICE_NUMBER |
createTermsRequest |
A request with this invoice number already exists. The existing request is returned in data — this makes retries after timeouts safe. |
REQUEST_STATUS_VIOLATION |
cancelTermsRequest, resendAgreement |
The request's status doesn't allow this operation — see the allowed statuses in section 2.4. |
DOCUSIGN_ERROR |
createTermsRequest, resendAgreement |
The DocuSign envelope could not be sent. The request still exists — on create, contact Yellowpay to get the agreement sent; on resend, try again. |
Two failures bypass this format entirely, with no errors array and no extensions.code:
- HTTP 403 — Yellowpay has disabled API access for your company, or its account is suspended. Contact Yellowpay.
- HTTP 413 — the request body is over 25 MB. If your client reports a parse failure or a bare 413 on
createTermsRequest, check the size of the attached files first (see File size).
⚠ Configure your client for error-plus-data responses
The three DUPLICATE_* / *_PENDING errors return the existing object alongside the error — that's what makes them recoverable in one step. But many GraphQL clients discard data when errors is present. Apollo Client's default errorPolicy: 'none' does exactly this — with the default configuration, the buyer or request Yellowpay hands back silently vanishes.
// Apollo Client — required for these mutations
const [createBuyer] = useMutation(CREATE_BUYER, {
errorPolicy: 'all', // keep data AND errors
});
Whatever your client, verify it surfaces both data and errors for these three mutations. Then branch on extensions.code, never on message text.
Operation reference
| Operation | Purpose | Access level |
|---|---|---|
tokenInfo |
Verify your token and its access levels | Any token |
lookupCompanyDuns(name, state) |
Find a company's DUNS by name; flags already-registered companies | Any token |
createBuyer(input) |
Register a buyer (no credit yet) | CREATE_BUYER |
addBuyerByDuns(duns) |
Link an already-registered buyer to your account | CREATE_BUYER |
requestCreditLimit(buyerId, amount) |
Apply for (or raise) a buyer's credit limit | CREATE_BUYER |
buyer(id) |
Fetch a buyer, their available credit and credit application | Any token |
buyers(first, after, filters) |
List / search your buyers (paginated) | Any token |
netTermsOptions |
Available net terms, in days | Any token |
netTermsRates |
Current rates for each net terms option, including recurring and escalated fee rates | Any token |
termsCalculations(invoiceAmount, termsFeePayer) |
Price all net terms options in one call | Any token |
createTermsRequest(input) |
Create a terms request for an invoice | CREATE_TERMS_REQUEST |
termsRequest(id) |
Fetch one terms request with signer detail and financials |
Any token |
termsRequests(first, after, filters) |
List / filter terms requests where you're the seller or the buyer; updatedSince for change polling |
Any token |
resendAgreement(id, signers) |
Resend the DocuSign agreement, optionally with new signers | CREATE_TERMS_REQUEST |
cancelTermsRequest(id) |
Cancel a request before funding | CREATE_TERMS_REQUEST |
CREATE_BUYER and CREATE_TERMS_REQUEST are for seller companies only. Full field-level documentation for every type is in the Docs panel in GraphiQL.
Testing in the sandbox
The sandbox runs the same API against test data. Current behaviour:
- Token — there is no self-service token page for the sandbox yet. Request a sandbox token from your Yellowpay contact; it arrives by email. To test the buyer side, ask for a read-only token for a sandbox buyer too.
lookupCompanyDuns— returns test data rather than querying Dun & Bradstreet. Live lookup in the sandbox is coming.- Credit — underwriting is mocked and approves instantly. To test the other outcomes, end the buyer's business name with
[pending]or[rejected]when registering. - Agreements — DocuSign emails are delivered only to
test+addresses (e.g.test+jane@yourdomain.com); everything else is suppressed. Usetest+signer emails to run the signing flow end to end — the same rule applies tosignedAgreementCC. - Funding — to move a signed request to
FUNDEDand beyond, ask your Yellowpay contact.
Go-live checklist
- Your integration points at the production endpoint (
https://api.getyellowpay.com/partner/graphql). - A production token created in the Yellowpay app (Settings → API access) with
CREATE_BUYERandCREATE_TERMS_REQUEST; IP allowlist configured if your egress IPs are static. - Your GraphQL client is configured to surface
dataalongsideerrors(Apollo:errorPolicy: 'all') forcreateBuyer,createTermsRequestandrequestCreditLimit. Buyer.idis persisted against the buyer on your side; both onboarding doors are wired —addBuyerByDunswhenisRegistered(or onDUPLICATE_DUNS),createBuyerotherwise.- Buyers with a
PENDINGcredit application are not offered net terms until it'sAPPROVED. - The
termsFeePayerused intermsCalculationsis the same one sent increateTermsRequest. - Invoice numbers are unique; the
DUPLICATE_INVOICE_NUMBER+ existing-request response is handled as a success path for retries. - Your invoicing flow does not send the invoice to the buyer for Yellowpay-funded orders — Yellowpay invoices the buyer directly.
REFUSED,CANCELLEDand signerDECLINED/FAILEDare handled in your order flow;resendAgreementis wired up for bounced agreements.- Change polling with
updatedSinceis in place forSIGNEDandFUNDED, and handles a request seen twice at the poll boundary.
Changelog
- 2026-11 —
TermsRequest.financials: fee schedule, accrued recurring fees, payments and open balance (see 2.5). NewnetTermsRatesquery with the current rates behind each net terms option;netTermsOptionsis unchanged. Schema descriptions now say "payment" where they said "repayment", and so does this guide; no field or enum names changed. Fixed: the escalated rate no longer applies within the net terms, sototalAmountnever includes escalated fees. - 2026-11 — Breaking renames: customers are now buyers, and vendors sellers.
Customer→Buyer,customer(id)/customers→buyer(id)/buyers,createCustomer/addCustomerByDuns→createBuyer/addBuyerByDuns,customerId→buyerId,CustomerInput→BuyerInput, access levelCREATE_CUSTOMER→CREATE_BUYER,termsFeePayer: CUSTOMER→BUYER, review reasonsCUSTOMER_DELINQUENCY/VENDOR_DELINQUENCY→BUYER_DELINQUENCY/SELLER_DELINQUENCY. Every token can now run queries, and the seller levels are for seller companies only. Buyers can read their terms requests with a read-only token.TermsRequestgainsseller,invoiceNumber,poNumber,settledDateandinvoiceStatus;termsFeeAmountis now nullable.termsRequestsgainsroleandsellerIdfilters, andupdatedSinceis inclusive and catches new requests. Other companies' records are reported asNOT_FOUND. ClarifiedtermsCalculations:invoiceAmountexcludes the fee, and the purchase agreement showstotalAmount. - 2026-09 — Production tokens are now self-service in the Yellowpay app.
- 2026-08 — Initial version.