Home
chevron_right
API Keys
chevron_right
Widget Integration
Base URL
https://api-dev-services.alfredpay.app/api/v1/third-party-service
API Key
alfredpay.4dqd$jKwSpjnPT!J3U!QsL&7TfAQKPJa
This is only for example purposes, you will be assigned an unique API KEY
API Secret
M992ASr4KnQkvI2)LN3qExWnzNuE2F3*
This is only for example purposes, you will be assigned an unique API SECRET

Webhooks

Considerations

must be provided to alfred a WebHook and alfred will send the invoice and then receives an id invoice with its status approved or rejected.

The payment method is embed in the invoice and status withdrawal will be update in the establishment time and could be consult by

Approved Invoice

This webhook allows the approval or rejection of an invoice. When approved, the payment process is executed for the user indicated in "my-info"

HTTP Request
PUT
https://api-dev-services.alfredpay.app/api/v1/third-party-service/invoice/{id}
1. --request PUT
2. --url https://api-dev-services.alfredpay.app/api/v1/third-party-service/invoice/{id}
Input Header
api-key: "YOUR_API_KEY",
api-secret: "YOUR_API_SECRET",
Response
{
"statusCode": 200,
"message": "update invoice/transaction",
"data": true,
  }
Input Body
{
"status": "approved,cancelled", / this value will be reflected as "aproved or cancelled" depending of the case
}

Errors

alfred uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).

Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

HTTPS STATUS CODE SUMMARY
202 - ACCEPTED
Everything worked as expected.
404 - NOT FOUND
The requested resource doesn't exist.

Get Invoice

returns a list of invoices associated with your credentials, which were processed by the widget, contains data relevant to the user's payment methods

HTTP Request
GET
https://api-dev-services.alfredpay.app/api/v1/third-party-service/invoice
1. --request GET
2. --url https://api-dev-services.alfredpay.app/api/v1/third-party-service/invoice
Input Header
api-key: "YOUR_API_KEY",
api-secret: "YOUR_API_SECRET",
Response
202 ACCEPTED
Content-Type: application/json
....
"data": "{
"statusCode": "202",
"message": "list invoice/transaction",
"data": {
"data": [
{
"id": "INVOICE_ID_HERE",
"status_webview": "completed",
"status_invoice": "approved",
"start_time": "TIME_AND_DATE",
"end_time": "TIME_AND_DATE",
"balance": "INVOICE_BALANCE",
"currency": "USDC",
"user": "USER_NAME",
"expire_invoice": false,
"walletpay": "WALLET_ADDRESS",
"memo": "MEMO_MESSAGE",
"network": "STELLAR",
"chain": "STELLAR",
"method": {
"id": "ID_HERE",
"transaction": "TRANSACTION_HERE",
"user": "USER_ID",
"KYC": "TRUE",
"country_withdraw": "MEX",
"cashout": "BANK",
"cash_amount": "100.00",
"currency_pay": "ARS",
"rate": "RATE_TRANSACTION",
"status": "transaction_status",
"time_estimated_payout": "68000",
"time_payout": "2",
"commission": "0",
"KYB": "true",
"date": "TRANSACTION_DATE",
     }
    }
  ]

Errors

alfred uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).

Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

HTTPS STATUS CODE SUMMARY
202 - ACCEPTED
Everything worked as expected.
404 - NOT FOUND
The requested resource doesn't exist.

Considerations

Must be provided to alfred a WebHook, and alfred will send the invoice and then receives an id invoice with status approved or rejected.

The payment method is embedded in the invoice and status withdrawal or deposit, will be update in the establishment time and could be consult by

Consult Transaction

This endpoint allows our partners to obtain quickly and filtered all the invoices for each registered user in my-info thus facilitating the possibility of revoting this information on their platforms.

HTTP Request
GET
https://api-dev-services.alfredpay.app/api/v1/third-party-service/method/user/{username}
1. --request GET
2. --url https://api-dev-services.alfredpay.app/api/v1/third-party-service/method/user/{username}
Input Header
api-key: "YOUR_API_KEY",
api-secret: "YOUR_API_SECRET",
Response
202 ACCEPTED
Content-Type: application/json
....
"data": "{
"statusCode": "202",
"message": "list invoice/transaction",
"data": [
{
"invoiceid": "INVOICE_ID_HERE",
"type": "IN or OUT",
"id": "ID_HERE",
"transaction": "TRANSACTION_HERE",
"user": "USER_NAME",
"kyc": true or false,
"country_withdraw": "MEX",
"cashout": "BANK",
"cash_amount": "100.00",
"currency_pay": "QUAT",
"rate": "RATE_TRANSACTION",
"status": "transaction_status",
"time_estimated_payout": "68000",
"time_payout": "2",
"commission": "0",
"KYB": "true",
"date": "TRANSACTION_DATE",
    }
   }
  ]

Considerations

The username that reflects on the endpoint makes references to the one sent in the endpoint ¨my info¨

Errors

alfred uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).

Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.

HTTPS STATUS CODE SUMMARY
202 - ACCEPTED
Everything worked as expected.
404 - NOT FOUND
The requested resource doesn't exist.