Prerequisites
- Customer export enabled on your partner account. Contact your MoonPay account team.
- A customer with an approved KYC record with MoonPay.
- A server that can call the export endpoint with your secret key.
- The customer’s consent, captured by rendering a MoonPay-hosted consent frame on their device. See Capture consent.
Capture consent
Render the consent frame withclient.setupCustomerExport(), the same way
you’d render the Auth frame. The
customer reviews what’s being shared and authorizes the export inside the
MoonPay-hosted frame.
Capture consent
Export the data
The frame delivers the consent token on itscomplete event. Forward it to
your backend and call the export endpoint within its 5-minute validity
window.
Export customer data
Result
null or omitted. taxIdentifiers is included when the customer has one on file; each entry’s type is tin, ssn, or cpf, with country present only for tin. residentialAddress.subStreet and each file’s side (front or back) are included only when applicable, for example a two-sided ID document. Each file’s downloadUrl is pre-signed and expires after 60 minutes; if it expires before you fetch the file, get a fresh consent token and call the export endpoint again.
The consent token is consumed on the first call, whether it succeeds or not. Notable responses: 403 if the token isn’t bound to a customer, 409 if the customer has no approved KYC to export, and 429 (with a Retry-After header) if you’ve exceeded the rate limit.
Next steps
Onboarding via API
Bring a customer to an approved KYC record before you export their data.
API and SDK credentials
Understand the secret key the export endpoint accepts.