{"openapi":"3.1.0","info":{"title":"Deripay Partner API","version":"1.0.0","description":"Authorize customers, accept deposits, process withdrawals, transfer Wallet and Options funds, and retrieve reports. Authenticate partner requests with X-API-Key and send X-Deripay-API-Version: 2 to receive the responses documented here."},"servers":[{"url":"https://api.edgepro.site","description":"Production"}],"paths":{"/ping":{"get":{"operationId":"get_ping","summary":"Health check","description":"\n\nNo authentication required.\n\n### Request example\n\n```http\nGET /ping HTTP/1.1\nHost: api.edgepro.site\nAccept: application/json\n```","tags":["Partner API"],"security":[],"parameters":[],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false},"example":{"message":"pong"}}}}}}},"/api/deriv/customers/authorize":{"post":{"operationId":"post_api_deriv_customers_authorize","summary":"Authorize customer","description":"Connect a customer after they authorize your Deriv OAuth application. Send their access token and save the returned connection_id. Reauthorization refreshes the existing connection. Send the access token, not a refresh token.\n\nRequired API key scope: `authorize`.\n\n### Request example\n\n```http\nPOST /api/deriv/customers/authorize HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"client_id\": \"your-registered-client-id\",\n  \"external_customer_id\": \"customer-1001\",\n  \"deriv_api_token\": \"customer-oauth-access-token\",\n  \"preferred_account_id\": \"CR123456\",\n  \"token_expires_in\": 3600\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Connection"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Deriv customer authorized successfully","data":{"connection_id":"conn_example_01","external_customer_id":"customer-1001","id":"customer_example_01","email":"customer@example.com","name":"Example Customer","first_name":"Example","last_name":"Customer","profile_completed":true,"role":"user","default_phone_number":"254712345678","payment_methods":[],"deriv_account":{"client_id":"your-registered-client-id","user_id":123456,"fullname":"Example Customer","country":"ke","primary_login_id":"CR123456","selected_account":"CR123456","account_count":1,"accounts":[{"login_id":"CR123456","currency":"USD","is_virtual":false}],"token_expires_at":"2026-10-12T10:00:00Z","authorization_status":"active"}}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"410":{"description":"The requested operation has expired. Read its current state before starting another.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"EXPIRED","message":"The requested operation has expired. Read its current state before starting another."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"422":{"description":"The payment could not be accepted. Check account eligibility, balance, and limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_REJECTED","message":"The payment could not be accepted. Check account eligibility, balance, and limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRequest"},"example":{"client_id":"your-registered-client-id","external_customer_id":"customer-1001","deriv_api_token":"customer-oauth-access-token","preferred_account_id":"CR123456","token_expires_in":3600}}}}}},"/api/deriv/connections/{connection_id}":{"get":{"operationId":"get_api_deriv_connections_connection_id","summary":"Get connection","description":"Get customer details and linked Deriv accounts. Check authorization_status before requesting payments. The payment_methods array is normally empty for partner connections.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/connections/conn_example_01 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Connection"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Deriv connection retrieved successfully","data":{"connection_id":"conn_example_01","external_customer_id":"customer-1001","id":"customer_example_01","email":"customer@example.com","name":"Example Customer","first_name":"Example","last_name":"Customer","profile_completed":true,"role":"user","default_phone_number":"254712345678","payment_methods":[],"deriv_account":{"client_id":"your-registered-client-id","user_id":123456,"fullname":"Example Customer","country":"ke","primary_login_id":"CR123456","selected_account":"CR123456","account_count":1,"accounts":[{"login_id":"CR123456","currency":"USD","is_virtual":false}],"token_expires_at":"2026-10-12T10:00:00Z","authorization_status":"active"}}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/deriv/connections/{connection_id}/default-phone":{"patch":{"operationId":"patch_api_deriv_connections_connection_id_default_phone","summary":"Save default phone","description":"Save a default phone number for this connection. Include country if it differs from your workspace default. Saving the number does not verify its owner. Payment requests still require phone_number and customer consent.\n\nRequired API key scope: `authorize`.\n\n### Request example\n\n```http\nPATCH /api/deriv/connections/conn_example_01/default-phone HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"phone_number\": \"254712345678\",\n  \"country\": \"KE\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Connection"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Default phone number saved","data":{"connection_id":"conn_example_01","external_customer_id":"customer-1001","id":"customer_example_01","email":"customer@example.com","name":"Example Customer","first_name":"Example","last_name":"Customer","profile_completed":true,"role":"user","default_phone_number":"254712345678","payment_methods":[],"deriv_account":{"client_id":"your-registered-client-id","user_id":123456,"fullname":"Example Customer","country":"ke","primary_login_id":"CR123456","selected_account":"CR123456","account_count":1,"accounts":[{"login_id":"CR123456","currency":"USD","is_virtual":false}],"token_expires_at":"2026-10-12T10:00:00Z","authorization_status":"active"}}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultPhoneRequest"},"example":{"phone_number":"254712345678","country":"KE"}}}}}},"/api/deriv/connections/{connection_id}/balance":{"get":{"operationId":"get_api_deriv_connections_connection_id_balance","summary":"Get balances","description":"Get the Wallet balance and, when available, the Options balance. Withdrawals use the Wallet balance. This response represents amounts as JSON numbers.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/connections/conn_example_01/balance HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Balance"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Deriv wallet balances retrieved successfully","data":{"account_id":"CR123456","currency":"USD","balance":25,"wallet_type":"main","total_wallet_usd":25,"wallets":[{"type":"main","balances":{"USD":{"balance":25}}}],"options_account":{"account_id":"CR123456","currency":"USD","balance":10}}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"410":{"description":"The requested operation has expired. Read its current state before starting another.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"EXPIRED","message":"The requested operation has expired. Read its current state before starting another."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"422":{"description":"The payment could not be accepted. Check account eligibility, balance, and limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_REJECTED","message":"The payment could not be accepted. Check account eligibility, balance, and limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}}}},"/api/corridors":{"get":{"operationId":"get_api_corridors","summary":"List payment corridors","description":"List available mobile money countries, networks and deposit or withdrawal support. Payment requests must follow your workspace country permissions. An empty list means no mobile money markets are currently available.\n\nRequired API key scope: `rates:read`.\n\n### Request example\n\n```http\nGET /api/corridors HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"type":"object","properties":{"corridors":{"type":"array","items":{"$ref":"#/components/schemas/Corridor"}}},"required":["corridors"],"additionalProperties":false}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Corridors retrieved successfully","data":{"corridors":[{"country":"KE","name":"Kenya","currency":"KES","payment_method":"mobile_money","deposit_enabled":true,"withdrawal_enabled":true,"dialing_code":"254","national_number_length":9,"operators":[{"code":"mpesa","name":"M-Pesa"}],"requires_operator":false,"confirms_recipient_name":true}]}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/rates":{"get":{"operationId":"get_api_rates","summary":"Get exchange rate and limits","description":"Get exchange rates and payment limits for the selected country. Rates are local currency units per USD. Use deposit_rate to calculate the USD credited by a deposit and withdrawal_rate for withdrawals. Kenya also returns crypto_payment_rate: divide the KES deposit amount by this rate to estimate the USD to pay at crypto checkout. The checkout confirms the final payment amount. Rates and limits can change before submission. An unsupported country returns 404.\n\nRequired API key scope: `rates:read`.\n\n### Request example\n\n```http\nGET /api/rates?country=KE HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"country","in":"query","required":false,"description":"ISO country; defaults to assigned workspace country or KE.","schema":{"type":"string"},"example":"KE"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Rate"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Exchange rate retrieved successfully","data":{"country":"KE","base_currency":"USD","quote_currency":"KES","deposit_rate":140,"withdrawal_rate":130,"crypto_payment_rate":135,"min_deposit":140,"max_deposit":150000,"min_withdrawal_usd":1,"max_withdrawal_usd":1000,"effective_date":"2026-10-12","fetched_at":"2026-10-12T09:00:00Z"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/rates/usdkes":{"get":{"operationId":"get_api_rates_usdkes","summary":"Get Kenya exchange rate and limits","description":"Get exchange rates and payment limits for Kenya. Rates are local currency units per USD. Use deposit_rate to calculate the USD credited by a deposit and withdrawal_rate for withdrawals. Kenya also returns crypto_payment_rate: divide the KES deposit amount by this rate to estimate the USD to pay at crypto checkout. The checkout confirms the final payment amount. Rates and limits can change before submission. This endpoint always returns the USD/KES quote.\n\nRequired API key scope: `rates:read`.\n\n### Request example\n\n```http\nGET /api/rates/usdkes HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Rate"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Exchange rate retrieved successfully","data":{"country":"KE","base_currency":"USD","quote_currency":"KES","deposit_rate":140,"withdrawal_rate":130,"crypto_payment_rate":135,"min_deposit":140,"max_deposit":150000,"min_withdrawal_usd":1,"max_withdrawal_usd":1000,"effective_date":"2026-10-12","fetched_at":"2026-10-12T09:00:00Z"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/mpesa/deposit":{"post":{"operationId":"post_api_mpesa_deposit","summary":"Create mobile money deposit","description":"Collect mobile money and fund the customer’s Deriv Wallet. Send connection_id, phone_number, amount and an idempotency key. Kenya also accepts amount_kes. Follow next_action when present and monitor until the status is completed.\n\nRequired API key scope: `deposit`.\n\n### Request example\n\n```http\nPOST /api/mpesa/deposit HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\nIdempotency-Key: order-1001\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"phone_number\": \"254712345678\",\n  \"country\": \"KE\",\n  \"amount\": 700,\n  \"account_login_id\": \"CR123456\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1},"example":"order-1001","description":"Required unless idempotency_key is supplied in the JSON body. Header takes precedence."}],"responses":{"200":{"description":"Request accepted. Check the transaction status to confirm payment completion.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"examples":{"pending":{"summary":"pending","value":{"success":true,"message":"Deposit initiated successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"pending","country":"KE","network":"mpesa","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}},"action_required":{"summary":"action required","value":{"success":true,"message":"Deposit initiated successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"action_required","country":"UG","network":"mtn","local":{"amount":"20000","currency":"UGX"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":{"type":"one_time_code"},"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}},"completed_replay":{"summary":"completed replay","value":{"success":true,"message":"Existing deposit transaction returned for idempotency key","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"completed","country":"KE","network":"mpesa","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":"2026-10-12T09:00:00Z"}}}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"413":{"description":"Reduce the request body size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"REQUEST_TOO_LARGE","message":"Reduce the request body size."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileMoneyDepositRequest"},"example":{"connection_id":"conn_example_01","phone_number":"254712345678","country":"KE","amount":700,"account_login_id":"CR123456"}}}}}},"/api/crypto/deposit":{"post":{"operationId":"post_api_crypto_deposit","summary":"Create crypto deposit","description":"Create a crypto checkout with a quote in KES. Open next_action.url so the customer can choose an asset and network. Check the transaction after checkout and wait for completed to confirm Wallet funding.\n\nRequired API key scope: `deposit`.\n\n### Request example\n\n```http\nPOST /api/crypto/deposit HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\nIdempotency-Key: order-1001\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"amount_kes\": 700,\n  \"account_login_id\": \"CR123456\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1},"example":"order-1001","description":"Required unless idempotency_key is supplied in the JSON body. Header takes precedence."}],"responses":{"200":{"description":"Request accepted. Check the transaction status to confirm payment completion.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Crypto checkout created successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"crypto","status":"action_required","country":"KE","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":{"type":"redirect","url":"https://checkout.example.com/pay/example"},"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"413":{"description":"Reduce the request body size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"REQUEST_TOO_LARGE","message":"Reduce the request body size."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoDepositRequest"},"example":{"connection_id":"conn_example_01","amount_kes":700,"account_login_id":"CR123456"}}}}}},"/api/mpesa/transactions/{transaction_id}/otp":{"post":{"operationId":"post_api_mpesa_transactions_transaction_id_otp","summary":"Submit deposit verification","description":"Submit the mobile network’s verification code while next_action.type is one_time_code. Keep the code as a string to preserve leading zeros. The existing otp field is also accepted instead of code. Follow any next_action returned. On 429, stop submitting codes and check the transaction.\n\nRequired API key scope: `deposit`.\n\n### Request example\n\n```http\nPOST /api/mpesa/transactions/507f1f77bcf86cd799439011/otp HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"type\": \"one_time_code\",\n  \"code\": \"123456\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Verification submitted","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"pending","country":"KE","network":"mpesa","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"413":{"description":"Reduce the request body size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"REQUEST_TOO_LARGE","message":"Reduce the request body size."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositVerificationRequest"},"example":{"connection_id":"conn_example_01","type":"one_time_code","code":"123456"}}}}}},"/api/mpesa/withdrawal-verification":{"post":{"operationId":"post_api_mpesa_withdrawal_verification","summary":"Start withdrawal verification","description":"Start withdrawal email verification after the customer confirms the destination number and network. Save an idempotency key before calling. The status can be pending while the email is prepared. Submit the email code to /api/mpesa/withdraw.\n\nRequired API key scope: `withdraw`.\n\n### Request example\n\n```http\nPOST /api/mpesa/withdrawal-verification HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\nIdempotency-Key: withdrawal-order-1002\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"phone_number\": \"254712345678\",\n  \"country\": \"KE\",\n  \"amount_usd\": 5,\n  \"account_login_id\": \"CR123456\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1},"example":"withdrawal-order-1002","description":"Required unless idempotency_key is supplied in the JSON body. Header takes precedence."}],"responses":{"200":{"description":"Request accepted. Check the transaction status to confirm payment completion.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Withdrawal verification email sent successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"withdrawal","payment_method":"mobile_money","status":"action_required","country":"KE","network":"mpesa","local":{"amount":"650","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"withdrawal-order-1002","account_login_id":"CR123456","next_action":{"type":"email_code"},"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalVerificationRequest"},"example":{"connection_id":"conn_example_01","phone_number":"254712345678","country":"KE","amount_usd":5,"account_login_id":"CR123456"}}}}}},"/api/mpesa/withdrawal-verification/resend":{"post":{"operationId":"post_api_mpesa_withdrawal_verification_resend","summary":"Resend withdrawal verification","description":"Resend the email code for the same withdrawal. Supply its connection and transaction IDs. If throttled, wait before retrying; keep using the existing withdrawal.\n\nRequired API key scope: `withdraw`.\n\n### Request example\n\n```http\nPOST /api/mpesa/withdrawal-verification/resend HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"transaction_id\": \"507f1f77bcf86cd799439011\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Request accepted. Check the transaction status to confirm payment completion.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Withdrawal verification email resent successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"withdrawal","payment_method":"mobile_money","status":"action_required","country":"KE","network":"mpesa","local":{"amount":"650","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"withdrawal-order-1002","account_login_id":"CR123456","next_action":{"type":"email_code"},"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalResendRequest"},"example":{"connection_id":"conn_example_01","transaction_id":"507f1f77bcf86cd799439011"}}}}}},"/api/mpesa/withdraw":{"post":{"operationId":"post_api_mpesa_withdraw","summary":"Complete withdrawal","description":"Submit the email code to complete verification for this withdrawal. Payout may still be processing after a successful response. Monitor until completed. If reconciliation is required, keep the existing transaction and contact support.\n\nRequired API key scope: `withdraw`.\n\n### Request example\n\n```http\nPOST /api/mpesa/withdraw HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"connection_id\": \"conn_example_01\",\n  \"transaction_id\": \"507f1f77bcf86cd799439011\",\n  \"verification_code\": \"123456\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"}],"responses":{"200":{"description":"Request accepted. Check the transaction status to confirm payment completion.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Withdrawal processed successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"withdrawal","payment_method":"mobile_money","status":"processing","country":"KE","network":"mpesa","local":{"amount":"650","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"withdrawal-order-1002","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalCompleteRequest"},"example":{"connection_id":"conn_example_01","transaction_id":"507f1f77bcf86cd799439011","verification_code":"123456"}}}}}},"/api/mpesa/transactions":{"get":{"operationId":"get_api_mpesa_transactions","summary":"List transactions","description":"Get up to 20 of this connection’s newest transactions. This endpoint has no pagination parameters. Use statistics for payment totals and trends.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/mpesa/transactions?connection_id=conn_example_01 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"query","required":true,"description":"The connection_id returned when you authorized this customer.","schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transaction history retrieved successfully","data":[{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"pending","country":"KE","network":"mpesa","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":null}]}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/mpesa/transactions/{transaction_id}":{"get":{"operationId":"get_api_mpesa_transactions_transaction_id","summary":"Get transaction","description":"Get the current transaction status. This request can refresh an unresolved payment’s outcome. A completed status confirms Wallet funding for a deposit or payout for a withdrawal.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/mpesa/transactions/507f1f77bcf86cd799439011?connection_id=conn_example_01 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"},{"name":"connection_id","in":"query","required":true,"description":"The connection_id returned when you authorized this customer.","schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transaction"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transaction status retrieved successfully","data":{"id":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","type":"deposit","payment_method":"mobile_money","status":"completed","country":"KE","network":"mpesa","local":{"amount":"700","currency":"KES"},"settlement":{"amount":"5.00","currency":"USD"},"idempotency_key":"order-1001","account_login_id":"CR123456","next_action":null,"failure":null,"created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","completed_at":"2026-10-12T09:00:00Z"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}}}},"/api/mpesa/transactions/{transaction_id}/monitor":{"get":{"operationId":"get_api_mpesa_transactions_transaction_id_monitor","summary":"Monitor transaction","description":"Receive server-sent events for one transaction. status and complete events contain the transaction object. heartbeat contains {\"ts\":1791795600}; timeout contains {\"message\":\"reconnect\"}. Reconnect to the same URL after a timeout. Once the stream opens, HTTP stays 200. A fatal lookup error ends the stream with an error event containing the standard JSON error response, such as {\"success\":false,\"error\":{\"code\":\"NOT_FOUND\",\"message\":\"The requested resource was not found for this connection.\"}}. Deripay retries temporary lookup failures within the stream. Reconnecting returns current state without replaying earlier events.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/mpesa/transactions/507f1f77bcf86cd799439011/monitor?connection_id=conn_example_01 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: text/event-stream\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"text/event-stream"},{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"},{"name":"connection_id","in":"query","required":true,"description":"The connection_id returned when you authorized this customer.","schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"text/event-stream":{"schema":{"type":"string"},"example":"event: status\ndata: {\"id\":\"507f1f77bcf86cd799439011\",\"connection_id\":\"conn_example_01\",\"type\":\"deposit\",\"payment_method\":\"mobile_money\",\"status\":\"pending\",\"country\":\"KE\",\"network\":\"mpesa\",\"local\":{\"amount\":\"700\",\"currency\":\"KES\"},\"settlement\":{\"amount\":\"5.00\",\"currency\":\"USD\"},\"idempotency_key\":\"order-1001\",\"account_login_id\":\"CR123456\",\"next_action\":null,\"failure\":null,\"created_at\":\"2026-10-12T09:00:00Z\",\"updated_at\":\"2026-10-12T09:00:00Z\",\"completed_at\":null}\n\nevent: complete\ndata: {\"id\":\"507f1f77bcf86cd799439011\",\"connection_id\":\"conn_example_01\",\"type\":\"deposit\",\"payment_method\":\"mobile_money\",\"status\":\"completed\",\"country\":\"KE\",\"network\":\"mpesa\",\"local\":{\"amount\":\"700\",\"currency\":\"KES\"},\"settlement\":{\"amount\":\"5.00\",\"currency\":\"USD\"},\"idempotency_key\":\"order-1001\",\"account_login_id\":\"CR123456\",\"next_action\":null,\"failure\":null,\"created_at\":\"2026-10-12T09:00:00Z\",\"updated_at\":\"2026-10-12T09:00:00Z\",\"completed_at\":\"2026-10-12T09:00:00Z\"}\n\n"}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/deriv/connections/{connection_id}/transfers":{"post":{"operationId":"post_api_deriv_connections_connection_id_transfers","summary":"Create or retry Wallet–Options transfer","description":"Save a UUID as request_id before the first request. Retry with the same UUID and body. An unresolved transfer blocks new transfers on this connection. Only completed confirms that funds moved. For to_options, you can link a completed deposit using deposit_transaction_id.\n\nRequired API key scope: `transfers:write`.\n\n### Request example\n\n```http\nPOST /api/deriv/connections/conn_example_01/transfers HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"direction\": \"to_options\",\n  \"amount\": \"12.50\",\n  \"request_id\": \"f152a643-04b6-4f78-ae92-e6378fbc1e4b\"\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transfer"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transfer completed","data":{"request_id":"f152a643-04b6-4f78-ae92-e6378fbc1e4b","direction":"to_options","amount":"12.50","currency":"USD","options_account_id":"CR123456","status":"completed","created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"413":{"description":"Reduce the request body size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"REQUEST_TOO_LARGE","message":"Reduce the request body size."}}}}},"422":{"description":"The payment could not be accepted. Check account eligibility, balance, and limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_REJECTED","message":"The payment could not be accepted. Check account eligibility, balance, and limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"},"example":{"direction":"to_options","amount":"12.50","request_id":"f152a643-04b6-4f78-ae92-e6378fbc1e4b"}}}}},"get":{"operationId":"get_api_deriv_connections_connection_id_transfers","summary":"List Wallet–Options transfers","description":"Get up to 20 of this connection’s newest transfers. Filter by unresolved or by a linked deposit_transaction_id. Payment transaction lists and SSE streams do not include transfers.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/connections/conn_example_01/transfers?unresolved=true&deposit_transaction_id=507f1f77bcf86cd799439011 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"},{"name":"unresolved","in":"query","required":false,"description":"Return only unresolved transfers.","schema":{"type":"boolean"},"example":true},{"name":"deposit_transaction_id","in":"query","required":false,"description":"Filter by owned bound deposit.","schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/TransferList"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transfers retrieved","data":{"transfers":[{"request_id":"f152a643-04b6-4f78-ae92-e6378fbc1e4b","direction":"to_options","amount":"12.50","currency":"USD","options_account_id":"CR123456","status":"completed","created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z"}]}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}}}},"/api/deriv/connections/{connection_id}/transfers/{request_id}":{"get":{"operationId":"get_api_deriv_connections_connection_id_transfers_request_id","summary":"Get Wallet–Options transfer","description":"Get a transfer and check for an updated outcome. Deripay may confirm an unresolved transfer from account history. After a timeout or outcome_unknown, keep using the original request_id.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/connections/conn_example_01/transfers/f152a643-04b6-4f78-ae92-e6378fbc1e4b HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"},{"name":"request_id","in":"path","required":true,"schema":{"type":"string"},"example":"f152a643-04b6-4f78-ae92-e6378fbc1e4b"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transfer"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transfer retrieved","data":{"request_id":"f152a643-04b6-4f78-ae92-e6378fbc1e4b","direction":"to_options","amount":"12.50","currency":"USD","options_account_id":"CR123456","status":"completed","created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}}}},"/api/deriv/connections/{connection_id}/transfers/{request_id}/dismiss":{"post":{"operationId":"post_api_deriv_connections_connection_id_transfers_request_id_dismiss","summary":"Dismiss unconfirmed transfer","description":"Close an unresolved transfer after the customer checks both balances and confirms closure. This allows a new transfer. Dismissal does not reverse funds, refund the customer or confirm failure. Never dismiss automatically after a timeout.\n\nRequired API key scope: `transfers:write`.\n\n### Request example\n\n```http\nPOST /api/deriv/connections/conn_example_01/transfers/f152a643-04b6-4f78-ae92-e6378fbc1e4b/dismiss HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\nContent-Type: application/json\n\n{\n  \"customer_confirmed\": true\n}\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string"},"example":"conn_example_01"},{"name":"request_id","in":"path","required":true,"schema":{"type":"string"},"example":"f152a643-04b6-4f78-ae92-e6378fbc1e4b"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Transfer"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Transfer closed","data":{"request_id":"f152a643-04b6-4f78-ae92-e6378fbc1e4b","direction":"to_options","amount":"12.50","currency":"USD","options_account_id":"CR123456","status":"dismissed","created_at":"2026-10-12T09:00:00Z","updated_at":"2026-10-12T09:00:00Z","failure_code":"TRANSFER_UNCONFIRMED","failure_message":"Check the existing transfer and balances before starting another."}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"404":{"description":"The requested resource was not found for this connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"The requested resource was not found for this connection."}}}}},"409":{"description":"Read the existing operation and resolve it before retrying. Reuse its original identity and request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OPERATION_CONFLICT","message":"Read the existing operation and resolve it before retrying. Reuse its original identity and request."}}}}},"412":{"description":"Check the customer's account permissions, verification, balance, and payment limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCOUNT_NOT_ELIGIBLE","message":"Check the customer's account permissions, verification, balance, and payment limits."}}}}},"413":{"description":"Reduce the request body size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"REQUEST_TOO_LARGE","message":"Reduce the request body size."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"502":{"description":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"PAYMENT_UNCONFIRMED","message":"The payment outcome could not be confirmed. Read the existing operation; do not create a replacement."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"504":{"description":"The request timed out. Read the existing operation; do not create a replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"OUTCOME_UNKNOWN","message":"The request timed out. Read the existing operation; do not create a replacement."}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferDismissRequest"},"example":{"customer_confirmed":true}}}}}},"/api/deriv/statistics":{"get":{"operationId":"get_api_deriv_statistics","summary":"Get statistics","description":"Get reports for your integration. Filters are optional; unknown or repeated query parameters are rejected. The default period is the last 30 calendar days, including today. Amounts are decimal strings. Reporting statuses are successful, pending and failed. Missing percentages have no denominator. Use the same filters for JSON and CSV.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/statistics?from=2026-10-01&to=2026-10-01&timezone=UTC&granularity=day&type=deposit&status=successful&currency=KES&payment_method=mobile_money&reference=507f1f77bcf86cd799439011&customer_reference=customer-1001 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"from","in":"query","required":false,"description":"Inclusive calendar date. Window cannot exceed 366 days.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"Inclusive when supplied as a calendar date; exclusive when supplied as an RFC3339 timestamp.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"timezone","in":"query","required":false,"description":"IANA timezone; defaults to Africa/Nairobi.","schema":{"type":"string"},"example":"UTC"},{"name":"granularity","in":"query","required":false,"description":"Bucket interval; defaults to day.","schema":{"type":"string","enum":["day","week","month"]},"example":"day"},{"name":"type","in":"query","required":false,"description":"Optional transaction type.","schema":{"type":"string","enum":["deposit","withdrawal"]},"example":"deposit"},{"name":"status","in":"query","required":false,"description":"Reporting outcome filter.","schema":{"type":"string","enum":["successful","pending","failed"]},"example":"successful"},{"name":"currency","in":"query","required":false,"description":"ISO currency code for the collection or payout amount.","schema":{"type":"string"},"example":"KES"},{"name":"payment_method","in":"query","required":false,"description":"Payment method. mobile_money includes all supported mobile networks.","schema":{"type":"string","enum":["mobile_money","crypto","unknown"]},"example":"mobile_money"},{"name":"reference","in":"query","required":false,"description":"Exact transaction reference.","schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"},{"name":"customer_reference","in":"query","required":false,"description":"Your exact external customer reference.","schema":{"type":"string"},"example":"customer-1001"}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Analytics"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Statistics retrieved successfully","data":{"granularity":"day","partial_period":false,"summary":{"total":0,"successful":0,"pending":0,"failed":0,"deposits":0,"withdrawals":0,"action_required":0,"reconciliation_required":0,"pending_over_24h":0,"volumes":[],"deriv_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"deposit_volumes":[],"withdrawal_volumes":[],"deposit_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"withdrawal_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"active_users":0,"new_users":0,"registered_users":0,"retained_users":0,"unidentified_transactions":0},"comparison":{"from":"2026-09-30T00:00:00Z","to":"2026-10-01T00:00:00Z","summary":{"total":0,"successful":0,"pending":0,"failed":0,"deposits":0,"withdrawals":0,"action_required":0,"reconciliation_required":0,"pending_over_24h":0,"volumes":[],"deriv_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"deposit_volumes":[],"withdrawal_volumes":[],"deposit_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"withdrawal_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"active_users":0,"new_users":0,"registered_users":0,"retained_users":0,"unidentified_transactions":0},"earnings":{"currency":"USD","basis":"estimated_gross_fx_spread_by_completion","gross_earnings":"0.00","partner_earnings":"0.00","deripay_earnings":"0.00","partner_share_bps":4800,"deripay_share_bps":5200,"included_transactions":0,"excluded_transactions":0},"changes":[]},"breakdowns":{"types":[],"currencies":[],"payment_methods":[],"statuses":[],"failures":[]},"earnings":{"currency":"USD","basis":"estimated_gross_fx_spread_by_completion","gross_earnings":"0.00","partner_earnings":"0.00","deripay_earnings":"0.00","partner_share_bps":4800,"deripay_share_bps":5200,"included_transactions":0,"excluded_transactions":0},"definitions":["Counts and volumes use transactions created in the selected period and their current outcomes; historical reports can change after reconciliation.","Successful means completed settlement. Action-required and reconciliation-required transactions remain pending in reporting outcomes.","Success rate is successful / all attempts; settled success rate is successful / (successful + failed). Missing rates have no denominator.","Active users are distinct customers with activity in this workspace; unidentifiable transactions are excluded and counted separately.","New and registered users use the earliest workspace connection; retained users were active in both comparison periods.","Earnings estimate completed transaction FX spread at its recorded reference rate, recognized on completion. Partner share is 48 percent and Deripay share is 52 percent; values are estimates, not a payout balance.","The comparison is the preceding equal-duration interval, without prorating an incomplete current period."],"warnings":[],"as_of":"2026-10-12T09:00:00Z","from":"2026-10-01T00:00:00Z","to":"2026-10-02T00:00:00Z","timezone":"UTC","total":0,"successful":0,"pending":0,"failed":0,"deposits":0,"withdrawals":0,"volumes":[],"deriv_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"buckets":[{"from":"2026-10-01T00:00:00Z","to":"2026-10-02T00:00:00Z","active_users":0,"earnings":{"currency":"USD","basis":"estimated_gross_fx_spread_by_completion","gross_earnings":"0.00","partner_earnings":"0.00","deripay_earnings":"0.00","partner_share_bps":4800,"deripay_share_bps":5200,"included_transactions":0,"excluded_transactions":0},"action_required":0,"reconciliation_required":0,"pending_over_24h":0,"volumes":[],"deriv_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"deposit_volumes":[],"withdrawal_volumes":[],"deposit_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"withdrawal_usd_volume":{"currency":"USD","successful":"0.00","pending":"0.00","failed":"0.00"},"date":"2026-10-01","total":0,"successful":0,"pending":0,"failed":0,"deposits":0,"withdrawals":0}],"recent":[]}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/deriv/statistics/export":{"get":{"operationId":"get_api_deriv_statistics_export","summary":"Export statistics CSV","description":"Download a CSV report using the same filters as /api/deriv/statistics. The response includes Content-Disposition: attachment; filename=\"deripay-performance.csv\". Group amounts by currency and amount_basis before adding them. Total attempt and customer counts appear once, on USD rows.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/statistics/export?from=2026-10-01&to=2026-10-01&timezone=UTC&granularity=day&type=deposit&status=successful&currency=KES&payment_method=mobile_money&reference=507f1f77bcf86cd799439011&customer_reference=customer-1001 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: text/csv\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"text/csv"},{"name":"from","in":"query","required":false,"description":"Inclusive calendar date. Window cannot exceed 366 days.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"Inclusive when supplied as a calendar date; exclusive when supplied as an RFC3339 timestamp.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"timezone","in":"query","required":false,"description":"IANA timezone; defaults to Africa/Nairobi.","schema":{"type":"string"},"example":"UTC"},{"name":"granularity","in":"query","required":false,"description":"Bucket interval; defaults to day.","schema":{"type":"string","enum":["day","week","month"]},"example":"day"},{"name":"type","in":"query","required":false,"description":"Optional transaction type.","schema":{"type":"string","enum":["deposit","withdrawal"]},"example":"deposit"},{"name":"status","in":"query","required":false,"description":"Reporting outcome filter.","schema":{"type":"string","enum":["successful","pending","failed"]},"example":"successful"},{"name":"currency","in":"query","required":false,"description":"ISO currency code for the collection or payout amount.","schema":{"type":"string"},"example":"KES"},{"name":"payment_method","in":"query","required":false,"description":"Payment method. mobile_money includes all supported mobile networks.","schema":{"type":"string","enum":["mobile_money","crypto","unknown"]},"example":"mobile_money"},{"name":"reference","in":"query","required":false,"description":"Exact transaction reference.","schema":{"type":"string"},"example":"507f1f77bcf86cd799439011"},{"name":"customer_reference","in":"query","required":false,"description":"Your exact external customer reference.","schema":{"type":"string"},"example":"customer-1001"}],"responses":{"200":{"description":"Successful request.","content":{"text/csv":{"schema":{"type":"string"},"example":"section,dimension,as_of,from,to,timezone,currency,amount_basis,total,successful,pending,failed,deposits,withdrawals,successful_amount,pending_amount,failed_amount,active_users,new_users,success_rate,settled_success_rate,action_required,reconciliation_required,pending_over_24h,average_completion_seconds,gross_earnings,partner_earnings,deripay_earnings,earnings_included,earnings_excluded,registered_users,retained_users,retention_rate,unidentified_transactions,earnings_basis,partner_share_bps,deripay_share_bps,partial_period\nsummary,current,2026-10-12T09:00:00Z,2026-10-01T00:00:00Z,2026-10-02T00:00:00Z,UTC,USD,deriv_usd,0,0,0,0,0,0,0.00,0.00,0.00,0,0,,,0,0,0,,0.00,0.00,0.00,0,0,0,0,,0,estimated_gross_fx_spread_by_completion,4800,5200,false\nsummary,previous,2026-10-12T09:00:00Z,2026-09-30T00:00:00Z,2026-10-01T00:00:00Z,UTC,USD,deriv_usd,0,0,0,0,0,0,0.00,0.00,0.00,0,0,,,0,0,0,,0.00,0.00,0.00,0,0,0,0,,0,estimated_gross_fx_spread_by_completion,4800,5200,false\nseries,2026-10-01,2026-10-12T09:00:00Z,2026-10-01T00:00:00Z,2026-10-02T00:00:00Z,UTC,USD,deriv_usd,0,0,0,0,0,0,0.00,0.00,0.00,0,,,,0,0,0,,0.00,0.00,0.00,0,0,,,,,estimated_gross_fx_spread_by_completion,4800,5200,false\n"}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/deriv/statistics/earnings":{"get":{"operationId":"get_api_deriv_statistics_earnings","summary":"List earnings by transaction","description":"Sync estimated earnings incrementally. Each row is one completed transaction with its customer_reference and earnings, in completion order. Save next_cursor after storing a page and pass it alone on your next read; you receive each completion once. Upsert rows by reference. Reconcile with /api/deriv/statistics/earnings/customers, because corrected rows are not resent. Rows sum to the earnings in /api/deriv/statistics for the same completion period. Shares the statistics rate limit.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/statistics/earnings?completed_since=2026-10-01&cursor=eyJ2IjoxLCJwIjoiOWYyYzRlMWE3YjNkNWM2MCIsImsiOiJsZWRnZXIiLCJ0IjoiMjAyNi0xMC0xMlQwOTowMDowMFoiLCJpIjoiNTA3ZjFmNzdiY2Y4NmNkNzk5NDM5MDExIn0&customer_reference=customer-1001&timezone=UTC&limit=500 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"completed_since","in":"query","required":false,"description":"Where a first sync starts: an RFC3339 timestamp, or a calendar date in timezone. Defaults to the start of the last 30 days. Do not combine with cursor.","schema":{"type":"string"},"example":"2026-10-01"},{"name":"cursor","in":"query","required":false,"description":"next_cursor from your previous read. Resumes after the last row you received and keeps its customer_reference filter.","schema":{"type":"string"},"example":"eyJ2IjoxLCJwIjoiOWYyYzRlMWE3YjNkNWM2MCIsImsiOiJsZWRnZXIiLCJ0IjoiMjAyNi0xMC0xMlQwOTowMDowMFoiLCJpIjoiNTA3ZjFmNzdiY2Y4NmNkNzk5NDM5MDExIn0"},{"name":"customer_reference","in":"query","required":false,"description":"Only completions for this external customer reference. If sent with cursor, it must match the cursor.","schema":{"type":"string"},"example":"customer-1001"},{"name":"timezone","in":"query","required":false,"description":"IANA timezone for a date-only completed_since; defaults to Africa/Nairobi.","schema":{"type":"string"},"example":"UTC"},{"name":"limit","in":"query","required":false,"description":"Rows per page, 1 to 500. Defaults to 100.","schema":{"type":"integer"},"example":500}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/EarningsLedger"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Earnings retrieved successfully","data":{"as_of":"2026-10-12T09:05:00Z","complete_through":"2026-10-12T09:03:00Z","currency":"USD","basis":"estimated_gross_fx_spread_by_completion","partner_share_bps":4800,"deripay_share_bps":5200,"transactions":[{"reference":"507f1f77bcf86cd799439011","connection_id":"conn_example_01","customer_reference":"customer-1001","type":"deposit","payment_method":"mobile_money","currency":"KES","local_amount":"1400.00","usd_amount":"9.80","created_at":"2026-10-12T08:58:00Z","completed_at":"2026-10-12T09:00:00Z","earnings_included":true,"gross_earnings":"0.20","partner_earnings":"0.10","deripay_earnings":"0.10"}],"has_more":false,"next_cursor":"eyJ2IjoxLCJwIjoiOWYyYzRlMWE3YjNkNWM2MCIsImsiOiJsZWRnZXIiLCJ0IjoiMjAyNi0xMC0xMlQwOTowMDowMFoiLCJpIjoiNTA3ZjFmNzdiY2Y4NmNkNzk5NDM5MDExIn0"}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}},"/api/deriv/statistics/earnings/customers":{"get":{"operationId":"get_api_deriv_statistics_earnings_customers","summary":"Get earnings by customer","description":"Get estimated earnings for a completion period, one row per customer_reference, optionally split by day, week or month. totals covers every page and matches the earnings in /api/deriv/statistics for the same period. Use it to reconcile data synced from /api/deriv/statistics/earnings.\n\nRequired API key scope: `transactions:read`.\n\n### Request example\n\n```http\nGET /api/deriv/statistics/earnings/customers?from=2026-10-12&to=2026-10-12&timezone=UTC&granularity=day&cursor=eyJ2IjoxLCJwIjoiOWYyYzRlMWE3YjNkNWM2MCIsImsiOiJsZWRnZXIiLCJ0IjoiMjAyNi0xMC0xMlQwOTowMDowMFoiLCJpIjoiNTA3ZjFmNzdiY2Y4NmNkNzk5NDM5MDExIn0&limit=500 HTTP/1.1\nHost: api.edgepro.site\nX-API-Key: <your-api-key>\nX-Deripay-API-Version: 2\nAccept: application/json\n```","tags":["Partner API"],"security":[{"partnerAPIKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string"},"example":"<your-api-key>","description":"Your API key. Send requests from your server."},{"name":"X-Deripay-API-Version","in":"header","required":true,"schema":{"type":"string","const":"2"},"example":"2","description":"Selects the response and error format documented here. Without it, the same URL returns the original format."},{"name":"Accept","in":"header","required":false,"schema":{"type":"string"},"example":"application/json"},{"name":"from","in":"query","required":false,"description":"Inclusive completion date. Window cannot exceed 366 days.","schema":{"type":"string"},"example":"2026-10-12"},{"name":"to","in":"query","required":false,"description":"Inclusive when supplied as a calendar date; exclusive when supplied as an RFC3339 timestamp.","schema":{"type":"string"},"example":"2026-10-12"},{"name":"timezone","in":"query","required":false,"description":"IANA timezone; defaults to Africa/Nairobi.","schema":{"type":"string"},"example":"UTC"},{"name":"granularity","in":"query","required":false,"description":"Split each customer into periods. Omit for one row per customer.","schema":{"type":"string","enum":["day","week","month"]},"example":"day"},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page. It keeps the period and granularity, so other filters can be omitted; if sent, they must match.","schema":{"type":"string"},"example":"eyJ2IjoxLCJwIjoiOWYyYzRlMWE3YjNkNWM2MCIsImsiOiJsZWRnZXIiLCJ0IjoiMjAyNi0xMC0xMlQwOTowMDowMFoiLCJpIjoiNTA3ZjFmNzdiY2Y4NmNkNzk5NDM5MDExIn0"},{"name":"limit","in":"query","required":false,"description":"Rows per page, 1 to 500. Defaults to 100.","schema":{"type":"integer"},"example":500}],"responses":{"200":{"description":"Successful request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/CustomerEarnings"}},"required":["success","message","data"],"additionalProperties":false},"example":{"success":true,"message":"Earnings retrieved successfully","data":{"as_of":"2026-10-12T09:05:00Z","from":"2026-10-12T00:00:00Z","to":"2026-10-13T00:00:00Z","timezone":"UTC","granularity":"day","partial_period":true,"totals":{"currency":"USD","basis":"estimated_gross_fx_spread_by_completion","partner_share_bps":4800,"deripay_share_bps":5200,"gross_earnings":"0.20","partner_earnings":"0.10","deripay_earnings":"0.10","included_transactions":1,"excluded_transactions":0},"customers":[{"customer_reference":"customer-1001","period":"2026-10-12","first_completed_at":"2026-10-12T09:00:00Z","last_completed_at":"2026-10-12T09:00:00Z","currency":"USD","basis":"estimated_gross_fx_spread_by_completion","partner_share_bps":4800,"deripay_share_bps":5200,"gross_earnings":"0.20","partner_earnings":"0.10","deripay_earnings":"0.10","included_transactions":1,"excluded_transactions":0}],"has_more":false,"next_cursor":null}}}}},"400":{"description":"Check the request fields and current transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INVALID_REQUEST","message":"Check the request fields and current transaction state."}}}}},"401":{"description":"Check your API key and reconnect the customer's Deriv account if necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"AUTHENTICATION_REQUIRED","message":"Check your API key and reconnect the customer's Deriv account if necessary."}}}}},"403":{"description":"This operation is not permitted for this key, workspace, or connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"ACCESS_DENIED","message":"This operation is not permitted for this key, workspace, or connection."}}}}},"429":{"description":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"RATE_LIMITED","message":"Wait before retrying. Honor Retry-After when present and reuse the original operation identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}},"500":{"description":"The request could not be completed. Check the existing operation before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"The request could not be completed. Check the existing operation before retrying."}}}}},"503":{"description":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"This capability is temporarily unavailable. Read the existing operation and retry with the same identity."}}}},"headers":{"Retry-After":{"description":"Optional delay in seconds. Back off when absent.","schema":{"type":"string"},"example":"5"}}}}}}},"components":{"securitySchemes":{"partnerAPIKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"Analytics":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"breakdowns":{"additionalProperties":false,"properties":{"currencies":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"key":{"type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["key","total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume"],"type":"object"},"type":["array","null"]},"failures":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"key":{"type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["key","total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume"],"type":"object"},"type":["array","null"]},"payment_methods":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"key":{"type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["key","total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume"],"type":"object"},"type":["array","null"]},"statuses":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"key":{"type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["key","total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume"],"type":"object"},"type":["array","null"]},"types":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"key":{"type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["key","total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume"],"type":"object"},"type":["array","null"]}},"required":["types","currencies","payment_methods","statuses","failures"],"type":"object"},"buckets":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"active_users":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"date":{"type":"string"},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"earnings":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"currency":{"type":"string"},"deripay_earnings":{"type":"string"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"excluded_transactions":{"type":"integer"},"gross_earnings":{"type":"string"},"included_transactions":{"type":"integer"},"partner_earnings":{"type":"string"},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."}},"required":["currency","basis","gross_earnings","partner_earnings","deripay_earnings","partner_share_bps","deripay_share_bps","included_transactions","excluded_transactions"],"type":"object"},"failed":{"type":"integer"},"from":{"format":"date-time","type":"string"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"to":{"format":"date-time","type":"string"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["from","to","active_users","earnings","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume","date","total","successful","pending","failed","deposits","withdrawals"],"type":"object"},"type":["array","null"]},"comparison":{"additionalProperties":false,"properties":{"changes":{"items":{"additionalProperties":false,"properties":{"current":{"type":"number"},"difference":{"type":"number"},"metric":{"type":"string"},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"previous":{"type":"number"}},"required":["metric","current","previous","difference"],"type":"object"},"type":["array","null"]},"earnings":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"currency":{"type":"string"},"deripay_earnings":{"type":"string"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"excluded_transactions":{"type":"integer"},"gross_earnings":{"type":"string"},"included_transactions":{"type":"integer"},"partner_earnings":{"type":"string"},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."}},"required":["currency","basis","gross_earnings","partner_earnings","deripay_earnings","partner_share_bps","deripay_share_bps","included_transactions","excluded_transactions"],"type":"object"},"from":{"format":"date-time","type":"string"},"summary":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"active_users":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"new_users":{"type":"integer"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"registered_users":{"type":"integer"},"retained_users":{"type":"integer"},"retention_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"unidentified_transactions":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume","active_users","new_users","registered_users","retained_users","unidentified_transactions"],"type":"object"},"to":{"format":"date-time","type":"string"}},"required":["from","to","summary","earnings","changes"],"type":"object"},"definitions":{"items":{"type":"string"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"earnings":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"currency":{"type":"string"},"deripay_earnings":{"type":"string"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"excluded_transactions":{"type":"integer"},"gross_earnings":{"type":"string"},"included_transactions":{"type":"integer"},"partner_earnings":{"type":"string"},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."}},"required":["currency","basis","gross_earnings","partner_earnings","deripay_earnings","partner_share_bps","deripay_share_bps","included_transactions","excluded_transactions"],"type":"object"},"failed":{"type":"integer"},"from":{"format":"date-time","type":"string"},"granularity":{"type":"string"},"partial_period":{"type":"boolean"},"pending":{"type":"integer"},"recent":{"items":{"additionalProperties":false,"properties":{"action_required":{"type":"boolean"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_reference":{"type":"string"},"failure_code":{"type":"string"},"failure_message":{"type":"string"},"id":{"type":"string"},"local_amount":{"type":"string"},"normalized_status":{"type":"string"},"partner_id":{"type":"string"},"phone":{"type":"string"},"reconciliation_required":{"type":"boolean"},"reference":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"usd_amount":{"type":"string"}},"required":["id","partner_id","reference","type","status","normalized_status","currency","local_amount","usd_amount","created_at","updated_at","action_required","reconciliation_required"],"type":"object"},"type":["array","null"]},"successful":{"type":"integer"},"summary":{"additionalProperties":false,"properties":{"action_required":{"type":"integer"},"active_users":{"type":"integer"},"average_completion_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"deposit_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"deposit_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"deposits":{"type":"integer"},"deriv_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"failed":{"type":"integer"},"new_users":{"type":"integer"},"pending":{"type":"integer"},"pending_over_24h":{"type":"integer"},"reconciliation_required":{"type":"integer"},"registered_users":{"type":"integer"},"retained_users":{"type":"integer"},"retention_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"settled_success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"successful":{"type":"integer"},"total":{"type":"integer"},"unidentified_transactions":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawal_usd_volume":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"withdrawal_volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["total","successful","pending","failed","deposits","withdrawals","action_required","reconciliation_required","pending_over_24h","volumes","deriv_usd_volume","deposit_volumes","withdrawal_volumes","deposit_usd_volume","withdrawal_usd_volume","active_users","new_users","registered_users","retained_users","unidentified_transactions"],"type":"object"},"timezone":{"type":"string"},"to":{"format":"date-time","type":"string"},"total":{"type":"integer"},"volumes":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"failed":{"type":"string"},"pending":{"type":"string"},"successful":{"type":"string"}},"required":["currency","successful","pending","failed"],"type":"object"},"type":["array","null"]},"warnings":{"items":{"type":"string"},"type":["array","null"]},"withdrawals":{"type":"integer"}},"required":["granularity","partial_period","summary","comparison","breakdowns","earnings","definitions","warnings","as_of","from","to","timezone","total","successful","pending","failed","deposits","withdrawals","volumes","deriv_usd_volume","buckets","recent"],"type":"object"},"AuthorizeRequest":{"additionalProperties":true,"properties":{"client_id":{"type":"string","maxLength":256},"deriv_api_token":{"type":"string"},"external_customer_id":{"type":"string"},"preferred_account_id":{"type":"string"},"token_expires_in":{"type":"integer","description":"Optional remaining token lifetime in seconds; omit when unknown. Reauthorize when the connection reports reconnect_required."}},"required":["client_id","deriv_api_token"],"type":"object"},"Balance":{"additionalProperties":false,"properties":{"account_id":{"type":"string"},"balance":{"type":"number"},"currency":{"type":"string"},"options_account":{"anyOf":[{"additionalProperties":false,"properties":{"account_id":{"type":"string"},"balance":{"type":"number"},"currency":{"type":"string"}},"required":["account_id","currency","balance"],"type":"object"},{"type":"null"}]},"total_wallet_usd":{"type":"number"},"wallet_type":{"type":"string"},"wallets":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":{"additionalProperties":false,"properties":{"balance":{"type":"number"}},"required":["balance"],"type":"object"},"type":["object","null"]},"type":{"type":"string"}},"required":["type","balances"],"type":"object"},"type":["array","null"]}},"required":["account_id","currency","balance","wallet_type","total_wallet_usd","wallets"],"type":"object"},"Connection":{"additionalProperties":false,"properties":{"connection_id":{"type":"string"},"default_payment_method_id":{"type":"string"},"default_phone_number":{"type":"string"},"deriv_account":{"additionalProperties":false,"properties":{"account_count":{"type":"integer"},"accounts":{"items":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"is_virtual":{"type":"boolean"},"login_id":{"type":"string"}},"required":["login_id","currency","is_virtual"],"type":"object"},"type":["array","null"]},"authorization_status":{"type":"string"},"client_id":{"type":"string"},"country":{"type":"string"},"fullname":{"type":"string"},"primary_login_id":{"type":"string"},"selected_account":{"type":"string"},"token_expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"user_id":{"type":"integer"}},"required":["user_id","fullname","country","primary_login_id","selected_account","account_count","accounts","authorization_status"],"type":"object"},"email":{"type":"string"},"external_customer_id":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"last_name":{"type":"string"},"name":{"type":"string"},"payment_methods":{"items":{"additionalProperties":false,"properties":{"country":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"is_default":{"type":"boolean"},"operator":{"type":"string"},"operator_name":{"type":"string"},"phone_number":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["id","country","operator","operator_name","phone_number","verified","is_default","created_at"],"type":"object"},"type":["array","null"]},"profile_completed":{"type":"boolean"},"role":{"type":"string"}},"required":["connection_id","id","email","name","profile_completed","role","payment_methods","deriv_account"],"type":"object"},"Corridor":{"additionalProperties":false,"properties":{"confirms_recipient_name":{"type":"boolean"},"country":{"type":"string"},"currency":{"type":"string"},"deposit_enabled":{"type":"boolean"},"dialing_code":{"type":"string"},"name":{"type":"string"},"national_number_length":{"type":"integer"},"operators":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"type":"object"},"type":["array","null"]},"payment_method":{"type":"string"},"requires_operator":{"type":"boolean"},"withdrawal_enabled":{"type":"boolean"}},"required":["country","name","currency","payment_method","deposit_enabled","withdrawal_enabled","dialing_code","national_number_length","operators","requires_operator","confirms_recipient_name"],"type":"object"},"CryptoDepositRequest":{"additionalProperties":true,"properties":{"account_login_id":{"type":"string"},"amount_kes":{"type":"integer","minimum":1,"description":"Quote amount in whole Kenyan shillings. The customer chooses an asset and network in checkout."},"connection_id":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["connection_id","amount_kes"],"type":"object","description":"Idempotency-Key header or idempotency_key body value is required. Header takes precedence. Unknown fields are ignored. Send only the documented fields."},"CustomerEarnings":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"customers":{"items":{"additionalProperties":false,"properties":{"basis":{"type":"string","const":"estimated_gross_fx_spread_by_completion"},"currency":{"type":"string","const":"USD"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The connection’s current external_customer_id. Null groups transactions with no connection or no customer reference."},"deripay_earnings":{"type":"string"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"excluded_transactions":{"type":"integer"},"first_completed_at":{"format":"date-time","type":"string"},"gross_earnings":{"type":"string"},"included_transactions":{"type":"integer"},"last_completed_at":{"format":"date-time","type":"string"},"partner_earnings":{"type":"string"},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date of the calendar period in the requested timezone; it can precede from. Null when no granularity was requested."}},"required":["customer_reference","period","first_completed_at","last_completed_at","currency","basis","gross_earnings","partner_earnings","deripay_earnings","partner_share_bps","deripay_share_bps","included_transactions","excluded_transactions"],"type":"object"},"type":["array","null"]},"from":{"format":"date-time","type":"string"},"granularity":{"anyOf":[{"type":"string"},{"type":"null"}],"enum":["day","week","month",null]},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"partial_period":{"type":"boolean"},"timezone":{"type":"string"},"to":{"format":"date-time","type":"string"},"totals":{"additionalProperties":false,"properties":{"basis":{"type":"string","const":"estimated_gross_fx_spread_by_completion"},"currency":{"type":"string","const":"USD"},"deripay_earnings":{"type":"string"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"excluded_transactions":{"type":"integer"},"gross_earnings":{"type":"string"},"included_transactions":{"type":"integer"},"partner_earnings":{"type":"string"},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."}},"required":["currency","basis","gross_earnings","partner_earnings","deripay_earnings","partner_share_bps","deripay_share_bps","included_transactions","excluded_transactions"],"type":"object"}},"required":["as_of","from","to","timezone","granularity","partial_period","totals","customers","has_more","next_cursor"],"type":"object"},"DefaultPhoneRequest":{"additionalProperties":true,"properties":{"country":{"type":"string"},"phone_number":{"type":"string"}},"required":["phone_number"],"type":"object"},"DepositVerificationRequest":{"additionalProperties":false,"properties":{"code":{"type":"string","description":"Code sent by the customer’s network, kept as a string to preserve leading zeros. Submit only while next_action.type is one_time_code."},"connection_id":{"type":"string"},"otp":{"type":"string","description":"Existing alias for code. Send either code or otp; if both are supplied, they must match."},"type":{"type":"string","enum":["one_time_code"],"description":"Defaults to one_time_code. Submit only when the transaction requires this action."}},"required":["connection_id"],"type":"object","anyOf":[{"required":["code"]},{"required":["otp"]}]},"EarningsLedger":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"basis":{"type":"string","const":"estimated_gross_fx_spread_by_completion"},"complete_through":{"format":"date-time","type":"string","description":"Completions before this time are final positions in the ledger. Newer completions appear on a later read."},"currency":{"type":"string","const":"USD"},"deripay_share_bps":{"type":"integer","enum":[5200,9000],"description":"10000 minus partner_share_bps."},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","description":"Save this after processing the page. Pass it as cursor to continue, even when has_more is false."},"partner_share_bps":{"type":"integer","enum":[4800,1000],"description":"4800 on the revenue share: 48% of the spread. 1000 on standard pricing: 10% of the 2% platform markup, and the partner also keeps all of its own markup. Each transaction is split under the pricing it was quoted with."},"transactions":{"items":{"additionalProperties":false,"properties":{"completed_at":{"format":"date-time","type":"string"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"deripay_earnings":{"type":"string"},"earnings_included":{"type":"boolean"},"gross_earnings":{"type":"string"},"local_amount":{"type":"string"},"partner_earnings":{"type":"string"},"payment_method":{"type":"string","enum":["mobile_money","crypto","unknown"]},"reference":{"type":"string"},"type":{"type":"string","enum":["deposit","withdrawal"]},"usd_amount":{"type":"string"}},"required":["reference","connection_id","customer_reference","type","payment_method","currency","local_amount","usd_amount","created_at","completed_at","earnings_included","gross_earnings","partner_earnings","deripay_earnings"],"type":"object"},"type":["array","null"]}},"required":["as_of","complete_through","currency","basis","partner_share_bps","deripay_share_bps","transactions","has_more","next_cursor"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string","enum":["ACCESS_DENIED","ACCOUNT_NOT_ELIGIBLE","AUTHENTICATION_REQUIRED","EXPIRED","INTERNAL_ERROR","INVALID_REQUEST","NOT_FOUND","OPERATION_CONFLICT","OUTCOME_UNKNOWN","PAYMENT_REJECTED","PAYMENT_UNCONFIRMED","RATE_LIMITED","REQUEST_TOO_LARGE","SERVICE_UNAVAILABLE"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"success":{"type":"boolean","const":false}},"required":["success","error"],"type":"object"},"MobileMoneyDepositRequest":{"additionalProperties":true,"properties":{"account_login_id":{"type":"string","description":"An eligible USD account linked to the customer. Omit to use their selected account."},"amount":{"type":"integer","minimum":1,"description":"Deposit amount in whole local currency units. Kenya also accepts amount_kes. Send one field; a nonzero amount takes precedence."},"amount_kes":{"type":"integer","minimum":1,"description":"Deposit amount in whole local currency units. Kenya also accepts amount_kes. Send one field; a nonzero amount takes precedence."},"connection_id":{"type":"string"},"country":{"type":"string","description":"Country code. Defaults to your workspace country, or KE if none is assigned. The country must be permitted for your workspace."},"idempotency_key":{"type":"string","description":"Required here or in Idempotency-Key. The nonempty header takes precedence. Reuse the same key and exact payload across retries."},"operator":{"type":"string","description":"Network code returned by GET /corridors. Required when the selected market has multiple networks; otherwise optional."},"phone_number":{"type":"string"}},"required":["connection_id","phone_number"],"type":"object","anyOf":[{"title":"Local currency amount","required":["connection_id","phone_number","amount"]},{"title":"Kenya amount alias","required":["connection_id","phone_number","amount_kes"]}],"description":"Idempotency-Key header or idempotency_key body value is required. Header takes precedence. Unknown fields are ignored. Send only the documented fields."},"NextAction":{"additionalProperties":false,"properties":{"code":{"type":"string"},"type":{"type":"string","enum":["one_time_code","email_code","redirect","ussd","contact_support"]},"url":{"type":"string"}},"required":["type"],"type":"object","allOf":[{"if":{"properties":{"type":{"const":"redirect"}}},"then":{"required":["url"]}},{"if":{"properties":{"type":{"const":"ussd"}}},"then":{"required":["code"]}}]},"Rate":{"additionalProperties":false,"properties":{"base_currency":{"type":"string"},"country":{"type":"string"},"crypto_payment_rate":{"type":"number"},"deposit_rate":{"type":"number"},"effective_date":{"type":"string"},"fetched_at":{"type":"string"},"max_deposit":{"type":"integer"},"max_withdrawal_usd":{"type":"number"},"min_deposit":{"type":"integer"},"min_withdrawal_usd":{"type":"number"},"quote_currency":{"type":"string"},"withdrawal_rate":{"type":"number"}},"required":["country","base_currency","quote_currency","deposit_rate","withdrawal_rate","min_deposit","max_deposit","min_withdrawal_usd","max_withdrawal_usd","effective_date","fetched_at"],"type":"object"},"Transaction":{"additionalProperties":false,"properties":{"account_login_id":{"type":"string"},"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"connection_id":{"type":"string"},"country":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"failure":{"anyOf":[{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},{"type":"null"}],"description":"Error details for failed or unresolved payments; otherwise null. Check status before retrying."},"id":{"type":"string"},"idempotency_key":{"type":"string"},"local":{"additionalProperties":false,"properties":{"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"network":{"type":"string"},"next_action":{"anyOf":[{"$ref":"#/components/schemas/NextAction"},{"type":"null"}],"description":"The action the customer needs to take. Check status even when this is null. Never ask for a mobile money PIN."},"payment_method":{"type":"string","enum":["mobile_money","crypto","unknown"]},"settlement":{"additionalProperties":false,"properties":{"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"currency":{"type":"string","const":"USD"}},"required":["amount","currency"],"type":"object"},"status":{"type":"string","enum":["pending","action_required","processing","completed","failed","reconciliation_required"]},"type":{"type":"string","enum":["deposit","withdrawal"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","connection_id","type","payment_method","status","country","local","settlement","idempotency_key","next_action","failure","created_at","updated_at","completed_at"],"type":"object"},"Transfer":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"deposit_transaction_id":{"type":"string"},"direction":{"type":"string","enum":["to_options","to_wallet"]},"failure_code":{"type":"string","enum":["TRANSFER_UNCONFIRMED","TRANSFER_NOT_COMPLETED"],"description":"Details of an unresolved or unsuccessful transfer. Check status before retrying."},"failure_message":{"type":"string"},"options_account_id":{"type":"string"},"request_id":{"type":"string"},"status":{"type":"string","enum":["submitting","completed","rejected","not_submitted","outcome_unknown","dismissed"]},"updated_at":{"format":"date-time","type":"string"}},"required":["request_id","direction","amount","currency","options_account_id","status","created_at","updated_at"],"type":"object"},"TransferList":{"additionalProperties":false,"properties":{"transfers":{"items":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"deposit_transaction_id":{"type":"string"},"direction":{"type":"string"},"failure_code":{"type":"string"},"failure_message":{"type":"string"},"options_account_id":{"type":"string"},"request_id":{"type":"string"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["request_id","direction","amount","currency","options_account_id","status","created_at","updated_at"],"type":"object"},"type":["array","null"]}},"required":["transfers"],"type":"object"},"TransferRequest":{"additionalProperties":false,"properties":{"amount":{"oneOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,2})?$"},{"type":"number","exclusiveMinimum":0,"maximum":999999999.99,"multipleOf":0.01}],"description":"Positive USD amount with at most two decimals. Exponent notation is rejected; prefer a decimal string. Zero is rejected even as a string."},"deposit_transaction_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"A completed deposit belonging to this connection. Use only with to_options. An existing active or completed transfer prevents transferring the same deposit twice."},"direction":{"type":"string","enum":["to_options","to_wallet"]},"request_id":{"type":"string","format":"uuid"}},"required":["direction","amount","request_id"],"type":"object"},"WithdrawalCompleteRequest":{"additionalProperties":true,"properties":{"connection_id":{"type":"string"},"transaction_id":{"type":"string"},"verification_code":{"type":"string"}},"required":["connection_id","transaction_id","verification_code"],"type":"object"},"WithdrawalResendRequest":{"additionalProperties":true,"properties":{"connection_id":{"type":"string"},"transaction_id":{"type":"string"}},"required":["connection_id","transaction_id"],"type":"object"},"WithdrawalVerificationRequest":{"additionalProperties":true,"properties":{"account_login_id":{"type":"string","description":"An eligible USD account linked to the customer. Omit to use their selected account."},"amount_usd":{"type":"number","exclusiveMinimum":0},"connection_id":{"type":"string"},"country":{"type":"string","description":"Country code. Defaults to your workspace country, or KE if none is assigned. The country must be permitted for your workspace."},"idempotency_key":{"type":"string","description":"Required here or in Idempotency-Key. The nonempty header takes precedence. Reuse the same key and exact payload across retries."},"operator":{"type":"string","description":"Network code returned by GET /corridors. Required when the selected market has multiple networks; otherwise optional."},"phone_number":{"type":"string"}},"required":["connection_id","amount_usd","phone_number"],"type":"object","description":"Idempotency-Key header or idempotency_key body value is required. Header takes precedence. Unknown fields are ignored. Send only the documented fields."},"TransferDismissRequest":{"type":"object","properties":{"customer_confirmed":{"type":"boolean","const":true}},"required":["customer_confirmed"],"additionalProperties":false}}}}