Skip to content

Conversation

@mkurapov
Copy link
Contributor

@mkurapov mkurapov commented Sep 19, 2025

Changes proposed in this pull request

  • Update createOutgoingPaymentFromIncomingPayment mutation to take in data initiatedAt requestId as the CardDetailsInput (instead of signature and expiry)
  • Start storing data initiatedAt requestId in the OutgoingPaymentCardDetails table
  • Publish cardDetails in the outgoing_payment.created webhook
  • Removing unused cardDetails from OutgoingPayment model in Admin API
  • Update how we call createOutgoingPaymentFromIncomingPayment mutation in card-service

Context

Fixes #3656 | RAF-1169

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. type: source Changes business logic pkg: mock-ase pkg: mock-account-service-lib labels Sep 19, 2025
Copy link
Collaborator

@koekiebox koekiebox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of questions regarding card data.

table.dropColumn('signature')

table.uuid('requestId').notNullable()
table.jsonb('data').notNullable()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkurapov is this the TLV data?
If it is, the ASE would need to extract the TLV data in order to retrieve the txn-counter and related TLV data.

Copy link
Contributor Author

@mkurapov mkurapov Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koekiebox data is just JSON for flexibility, and in practice it is

{
    "signature": "", // generate AC response
    "payload": "", // generate AC payload
}

such that the cardholder's ASE can fetch it from the webhook and validate it.

See this Slack thread for example payload

signature: 'test-signature'
data: {
signature: 'test-signature',
payload: 'payload'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the format for payload?

type: object
properties:
data:
type: object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should data not be an ASCII-HEX string?

@github-actions
Copy link

github-actions bot commented Sep 23, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 43.29
  • Iterations/s: 14.43
  • Failed Requests: 0.00% (0 of 2605)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 940 kB 16 kB/s
     data_sent......................: 2.0 MB 33 kB/s
     http_req_blocked...............: avg=6.39µs  min=2.02µs   med=5.25µs   max=574.5µs  p(90)=6.31µs   p(95)=7.05µs  
     http_req_connecting............: avg=586ns   min=0s       med=0s       max=501.26µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=91.75ms min=6.48ms   med=75.8ms   max=543.09ms p(90)=156.49ms p(95)=176.61ms
       { expected_response:true }...: avg=91.75ms min=6.48ms   med=75.8ms   max=543.09ms p(90)=156.49ms p(95)=176.61ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2605
     http_req_receiving.............: avg=93.46µs min=24.95µs  med=80.75µs  max=2.44ms   p(90)=118.91µs p(95)=152.66µs
     http_req_sending...............: avg=34.97µs min=9.14µs   med=27.3µs   max=2.63ms   p(90)=40.29µs  p(95)=54.71µs 
     http_req_tls_handshaking.......: avg=0s      min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=91.62ms min=6.15ms   med=75.68ms  max=543.03ms p(90)=156.39ms p(95)=176.51ms
     http_reqs......................: 2605   43.293234/s
     iteration_duration.............: avg=277ms   min=194.59ms med=263.64ms max=1.04s    p(90)=333.45ms p(95)=364.79ms
     iterations.....................: 868    14.425538/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

# Conflicts:
#	localenv/mock-account-servicing-entity/generated/graphql.ts
#	packages/backend/src/graphql/generated/graphql.schema.json
#	packages/backend/src/graphql/generated/graphql.ts
#	packages/backend/src/graphql/schema.graphql
#	packages/backend/src/open_payments/payment/outgoing/card/model.ts
#	packages/backend/src/open_payments/payment/outgoing/model.ts
#	packages/backend/src/open_payments/payment/outgoing/service.test.ts
#	packages/backend/src/open_payments/payment/outgoing/service.ts
#	packages/card-service/src/graphql/generated/graphql.ts
#	packages/frontend/app/generated/graphql.ts
#	packages/mock-account-service-lib/src/generated/graphql.ts
#	packages/point-of-sale/src/graphql/generated/graphql.ts
#	test/test-lib/src/generated/graphql.ts
@mkurapov mkurapov merged commit 66e44d3 into pos-card-services Sep 23, 2025
28 of 40 checks passed
@mkurapov mkurapov deleted the max/raf-1169 branch September 23, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: source Changes business logic type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants